Run mem2reg pass even when doing -O0 compiles

This commit is contained in:
Matt Pharr
2011-09-09 09:24:34 -07:00
parent 46d2bad231
commit 785d8a29d3

View File

@@ -193,6 +193,7 @@ Optimize(llvm::Module *module, int optLevel) {
// run absolutely no optimizations, since the front-end needs us to // run absolutely no optimizations, since the front-end needs us to
// take the various __pseudo_* functions it has emitted and turn // take the various __pseudo_* functions it has emitted and turn
// them into something that can actually execute. // them into something that can actually execute.
optPM.add(llvm::createPromoteMemoryToRegisterPass());
optPM.add(CreateGatherScatterFlattenPass()); optPM.add(CreateGatherScatterFlattenPass());
optPM.add(CreateLowerGatherScatterPass()); optPM.add(CreateLowerGatherScatterPass());
optPM.add(CreateLowerMaskedStorePass()); optPM.add(CreateLowerMaskedStorePass());