summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>2019-09-30 07:29:54 +0000
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>2019-09-30 07:29:54 +0000
commite794c049b3e281121722069c74def5163ecf927b (patch)
tree00e7b3cec4b998099aff275753b324beebba2044 /llvm/lib
parent5951e3f81340e54b2c80fc5d3c2c452bc442f5c6 (diff)
downloadbcm5719-llvm-e794c049b3e281121722069c74def5163ecf927b.tar.gz
bcm5719-llvm-e794c049b3e281121722069c74def5163ecf927b.zip
[SystemZ] Add SystemZPostRewrite in addPostRegAlloc() instead at -O0.
SystemZPostRewrite needs to be run before (it may emit COPYs) the Post-RA pseudo pass also at -O0, so it should be added in addPostRegAlloc(). Review: Ulrich Weigand llvm-svn: 373182
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp b/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
index bf8c24e50f5..20865037fe3 100644
--- a/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
@@ -184,6 +184,7 @@ public:
bool addInstSelector() override;
bool addILPOpts() override;
void addPostRewrite() override;
+ void addPostRegAlloc() override;
void addPreSched2() override;
void addPreEmitPass() override;
};
@@ -217,12 +218,14 @@ void SystemZPassConfig::addPostRewrite() {
addPass(createSystemZPostRewritePass(getSystemZTargetMachine()));
}
-void SystemZPassConfig::addPreSched2() {
+void SystemZPassConfig::addPostRegAlloc() {
// PostRewrite needs to be run at -O0 also (in which case addPostRewrite()
// is not called).
if (getOptLevel() == CodeGenOpt::None)
addPass(createSystemZPostRewritePass(getSystemZTargetMachine()));
+}
+void SystemZPassConfig::addPreSched2() {
if (getOptLevel() != CodeGenOpt::None)
addPass(&IfConverterID);
}
OpenPOWER on IntegriCloud