diff options
Diffstat (limited to 'tools/gccas/gccas.cpp')
-rw-r--r-- | tools/gccas/gccas.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp index 3b5342d8e8..235dadf4fa 100644 --- a/tools/gccas/gccas.cpp +++ b/tools/gccas/gccas.cpp @@ -17,6 +17,7 @@ #include "llvm/Transforms/Scalar/DCE.h" #include "llvm/Transforms/Scalar/IndVarSimplify.h" #include "llvm/Transforms/Scalar/InstructionCombining.h" +#include "llvm/Transforms/Scalar/PromoteMemoryToRegister.h" #include "llvm/Bytecode/WriteBytecodePass.h" #include "Support/CommandLine.h" #include <memory> @@ -69,6 +70,7 @@ int main(int argc, char **argv) { PassManager Passes; Passes.add(createDeadInstEliminationPass()); // Remove Dead code/vars Passes.add(createRaiseAllocationsPass()); // call %malloc -> malloc inst + Passes.add(createPromoteMemoryToRegister()); // memory->register promotion Passes.add(createCleanupGCCOutputPass()); // Fix gccisms Passes.add(createIndVarSimplifyPass()); // Simplify indvars if (!StopAtLevelRaise) { |