summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Lamb <christopher.lamb@gmail.com>2007-07-27 07:36:14 +0000
committerChristopher Lamb <christopher.lamb@gmail.com>2007-07-27 07:36:14 +0000
commit14bbb15f07d7910fdac2e19887aac85fec86aafd (patch)
tree4aa5b616b20a5bffd33f940c0cb23ab2501b662f
parent931de40afa20b0f2ef74a1aa5cd80178a6f868a9 (diff)
downloadbcm5719-llvm-14bbb15f07d7910fdac2e19887aac85fec86aafd.tar.gz
bcm5719-llvm-14bbb15f07d7910fdac2e19887aac85fec86aafd.zip
Move subreg lowering pass to be right after regalloc, per feedback.
llvm-svn: 40548
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index 4620abb7211..526c5255fe3 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -72,6 +72,11 @@ LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
if (PrintMachineCode)
PM.add(createMachineFunctionPrinterPass(cerr));
+
+ PM.add(createLowerSubregsPass());
+
+ if (PrintMachineCode) // Print the subreg lowered code
+ PM.add(createMachineFunctionPrinterPass(cerr));
// Run post-ra passes.
if (addPostRegAlloc(PM, Fast) && PrintMachineCode)
@@ -96,8 +101,6 @@ LLVMTargetMachine::addPassesToEmitFile(FunctionPassManager &PM,
if (addPreEmitPass(PM, Fast) && PrintMachineCode)
PM.add(createMachineFunctionPrinterPass(cerr));
-
- PM.add(createLowerSubregsPass());
switch (FileType) {
default:
@@ -178,6 +181,11 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM,
if (PrintMachineCode)
PM.add(createMachineFunctionPrinterPass(cerr));
+
+ PM.add(createLowerSubregsPass());
+
+ if (PrintMachineCode) // Print the subreg lowered code
+ PM.add(createMachineFunctionPrinterPass(cerr));
// Run post-ra passes.
if (addPostRegAlloc(PM, Fast) && PrintMachineCode)
@@ -199,8 +207,6 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM,
if (addPreEmitPass(PM, Fast) && PrintMachineCode)
PM.add(createMachineFunctionPrinterPass(cerr));
-
- PM.add(createLowerSubregsPass());
addCodeEmitter(PM, Fast, PrintEmittedAsm, MCE);
OpenPOWER on IntegriCloud