[PATCH] D30333: Split SimplifyCFG to run obscuring switch transforms only during last phase
Joerg Sonnenberger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 9 23:01:59 PST 2017
joerg marked 2 inline comments as done.
joerg added inline comments.
================
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:592
MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3));
MPM.add(createCFGSimplificationPass());
addInstructionCombiningPass(MPM);
----------------
mehdi_amini wrote:
> What about this one?
I don't have a strong opinion on whether it should be done before or after SLP handling. I don't think the code is likely to be vectorised.
================
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:622
addExtensionsToPM(EP_Peephole, MPM);
- MPM.add(createCFGSimplificationPass());
+ MPM.add(createLateCFGSimplificationPass()); // Switches to lookup tables
addInstructionCombiningPass(MPM);
----------------
mehdi_amini wrote:
> The comment is misleading, it seems that the only reason we run the pass here is for this purpose.
Well, we also want to do the usual transformations again after loop unrolling. But at this point, we are also commiting to the the lookup table conversions.
================
Comment at: lib/Transforms/Scalar/SimplifyCFGPass.cpp:256
+ }
+};
}
----------------
mehdi_amini wrote:
> Why two passes instead of a parameter?
Two passes makes it easier to test it on the command line.
https://reviews.llvm.org/D30333
More information about the llvm-commits
mailing list