From 785d8a29d35ecf624e9d049ed68ad2e59e59584e Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Fri, 9 Sep 2011 09:24:34 -0700 Subject: [PATCH] Run mem2reg pass even when doing -O0 compiles --- opt.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/opt.cpp b/opt.cpp index 7dfa38d1..63bea4da 100644 --- a/opt.cpp +++ b/opt.cpp @@ -193,6 +193,7 @@ Optimize(llvm::Module *module, int optLevel) { // run absolutely no optimizations, since the front-end needs us to // take the various __pseudo_* functions it has emitted and turn // them into something that can actually execute. + optPM.add(llvm::createPromoteMemoryToRegisterPass()); optPM.add(CreateGatherScatterFlattenPass()); optPM.add(CreateLowerGatherScatterPass()); optPM.add(CreateLowerMaskedStorePass());