The author mentioned correctness and performance as criteria. (Recall approximate computing?)
An Execution #DAG of #codelet is built (in the first edition), which is subsequently simplified by simplifier, using transpose or arithmetic technique. (Is DAG an AST?)
genfft schedules instructions for given simplified #DAG.