aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-10-28 18:05:05 +0000
committerMatthias Braun <matze@braunis.de>2016-10-28 18:05:05 +0000
commit35a024fe0f11f37ed74c059a83a19a8a1dfc59b5 (patch)
treee8e02a88f9309e162ee2d79c6b8952c744510756
parentc4fbbcf9ed664f227cc45bb3b85f684880222314 (diff)
downloadllvm-35a024fe0f11f37ed74c059a83a19a8a1dfc59b5.zip
llvm-35a024fe0f11f37ed74c059a83a19a8a1dfc59b5.tar.gz
llvm-35a024fe0f11f37ed74c059a83a19a8a1dfc59b5.tar.bz2
TargetPassConfig: Move addPass of IPRA RegUsageInfoProp down.
TargetPassConfig::addMachinePasses() does some housekeeping first: Handling the -print-machineinstrs flag and doing an initial printing "After Instruction Selection". There is no reason for RegUsageInfoProp to run before those two steps. llvm-svn: 285422
-rw-r--r--llvm/lib/CodeGen/TargetPassConfig.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index e0f1b52..2798036 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -570,9 +570,6 @@ void TargetPassConfig::addISelPrepare() {
void TargetPassConfig::addMachinePasses() {
AddingMachinePasses = true;
- if (TM->Options.EnableIPRA)
- addPass(createRegUsageInfoPropPass());
-
// Insert a machine instr printer pass after the specified pass.
if (!StringRef(PrintMachineInstrs.getValue()).equals("") &&
!StringRef(PrintMachineInstrs.getValue()).equals("option-unspecified")) {
@@ -588,6 +585,9 @@ void TargetPassConfig::addMachinePasses() {
// Print the instruction selected machine code...
printAndVerify("After Instruction Selection");
+ if (TM->Options.EnableIPRA)
+ addPass(createRegUsageInfoPropPass());
+
// Expand pseudo-instructions emitted by ISel.
addPass(&ExpandISelPseudosID);