[PATCH] D43293: [SimplifyCFG] Don't remove preheaders when we need canonical loops.
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 14 19:15:52 PST 2018
skatkov added a comment.
Does it eliminate your regression?
I double the Eli's question: "What passes benefit from having SimplifyCFG keep around empty preheaders?"
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:5747
+ // introduce new backedge, so we can eliminate BB.
bool NeedCanonicalLoop =
+ Options.NeedCanonicalLoop && LoopHeaders &&
It becomes complicated. Could you please re-write it in a more readable way?
I guess lambda with explicit ifs and possible comments may do things cleaner in terms of reading this.
More information about the llvm-commits