summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
diff options
context:
space:
mode:
authorHiroshi Inoue <inouehrs@jp.ibm.com>2017-06-27 04:52:17 +0000
committerHiroshi Inoue <inouehrs@jp.ibm.com>2017-06-27 04:52:17 +0000
commit5102028f63b585bab42b2641bc9fcce71bb6ca99 (patch)
tree53c0a87d96609d44a6cb6fb09d46385c08a439f6 /llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
parent53b82b3df96f3cfba2027522a172ac9fcc65dcda (diff)
downloadbcm5719-llvm-5102028f63b585bab42b2641bc9fcce71bb6ca99.tar.gz
bcm5719-llvm-5102028f63b585bab42b2641bc9fcce71bb6ca99.zip
[PowerPC] set optimization level in SelectionDAGISel
PowerPC backend does not pass the current optimization level to SelectionDAGISel and so SelectionDAGISel works with the default optimization level regardless of the current optimization level. This patch makes the PowerPC backend set the optimization level correctly. Differential Revision: https://reviews.llvm.org/D34615 llvm-svn: 306367
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index a88a6541e8d..f6bef33fd13 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -352,7 +352,7 @@ bool PPCPassConfig::addILPOpts() {
bool PPCPassConfig::addInstSelector() {
// Install an instruction selector.
- addPass(createPPCISelDag(getPPCTargetMachine()));
+ addPass(createPPCISelDag(getPPCTargetMachine(), getOptLevel()));
#ifndef NDEBUG
if (!DisableCTRLoops && getOptLevel() != CodeGenOpt::None)
OpenPOWER on IntegriCloud