diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-12-17 09:39:49 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-12-17 09:39:49 +0000 |
commit | 04149f7ffd033773adfe85e4acf3f560e29bd47d (patch) | |
tree | 69544150a5eb39de609a017553b043d80a924888 /lib/CodeGen/LLVMTargetMachine.cpp | |
parent | 90b5d04772cabd20812dd478beb65f3fd6571b9e (diff) |
Revert 91280-91283, 91286-91289, 91291, 91293, 91295-91296. It apparently introduced a non-deterministic behavior in the optimizer somewhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91598 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | lib/CodeGen/LLVMTargetMachine.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp index 297dd31676..cae32d3361 100644 --- a/lib/CodeGen/LLVMTargetMachine.cpp +++ b/lib/CodeGen/LLVMTargetMachine.cpp @@ -31,6 +31,10 @@ namespace llvm { bool EnableFastISel; } +static cl::opt<bool> X1("x1"); +static cl::opt<bool> X2("x2"); +static cl::opt<bool> X3("x3"); +static cl::opt<bool> X4("x4"); static cl::opt<bool> DisablePostRA("disable-post-ra", cl::Hidden, cl::desc("Disable Post Regalloc")); static cl::opt<bool> DisableBranchFold("disable-branch-fold", cl::Hidden, @@ -239,6 +243,11 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, PM.add(createGVNPass(/*NoPRE=*/false, /*NoLoads=*/true)); } + if (X1) + PM.add(createPrintFunctionPass("\n\n" + "*** Before LSR ***\n", + &errs())); + // Run loop strength reduction before anything else. if (OptLevel != CodeGenOpt::None && !DisableLSR) { PM.add(createLoopStrengthReducePass(getTargetLowering())); @@ -246,6 +255,11 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, PM.add(createPrintFunctionPass("\n\n*** Code after LSR ***\n", &errs())); } + if (X2) + PM.add(createPrintFunctionPass("\n\n" + "*** After LSR ***\n", + &errs())); + // Turn exception handling constructs into something the code generators can // handle. switch (getMCAsmInfo()->getExceptionHandlingType()) @@ -268,9 +282,19 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, // Make sure that no unreachable blocks are instruction selected. PM.add(createUnreachableBlockEliminationPass()); + if (X3) + PM.add(createPrintFunctionPass("\n\n" + "*** Before CGP ***\n", + &errs())); + if (OptLevel != CodeGenOpt::None && !DisableCGP) PM.add(createCodeGenPreparePass(getTargetLowering())); + if (X4) + PM.add(createPrintFunctionPass("\n\n" + "*** After CGP ***\n", + &errs())); + PM.add(createStackProtectorPass(getTargetLowering())); if (PrintISelInput) |