Run an instcombine pass after inlining but before scalarrepl. This allows instcombine to clean up the code, which makes more code suitable for SRoA.This helps C++ code in particular, e.g. speeding up tramp3d by 31%.
Index: llvm-backend.cpp =================================================================== --- llvm-backend.cpp (revision 122440) +++ llvm-backend.cpp (working copy) @@ -245,6 +245,7 @@ } PM->add(createTailDuplicationPass()); // Simplify cfg by copying code + PM->add(createInstructionCombiningPass()); // Cleanup for scalarrepl. PM->add(createCFGSimplificationPass()); // Merge & remove BBs PM->add(createScalarReplAggregatesPass()); // Break up aggregate allocas PM->add(createInstructionCombiningPass()); // Combine silly seq's _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits