summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetPassConfig.cpp
diff options
context:
space:
mode:
authorVolkan Keles <vkeles@apple.com>2018-01-18 01:10:30 +0000
committerVolkan Keles <vkeles@apple.com>2018-01-18 01:10:30 +0000
commit4aa73a649a02c22f0d96157775fb80ef124fc036 (patch)
tree45b805afa2b4595758d1fdad7874ff3a5927626b /llvm/lib/CodeGen/TargetPassConfig.cpp
parentdb6ca05a6b84c79356c22031b6ec13af76dadad0 (diff)
downloadbcm5719-llvm-4aa73a649a02c22f0d96157775fb80ef124fc036.tar.gz
bcm5719-llvm-4aa73a649a02c22f0d96157775fb80ef124fc036.zip
Fix the failure caused by r322773
Do not run GlobalISel if `-fast-isel=0 -global-isel=false`. llvm-svn: 322800
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetPassConfig.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index acdc814c45c..392f41ac438 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -711,16 +711,11 @@ bool TargetPassConfig::addCoreISelPasses() {
TM->setFastISel(true);
// Ask the target for an instruction selector.
- bool EnableGlobalISel = TM->Options.EnableGlobalISel;
// Explicitly enabling fast-isel should override implicitly enabled
// global-isel.
- if (EnableGlobalISel && (EnableGlobalISelOption == cl::BOU_UNSET) &&
- (EnableFastISelOption == cl::BOU_TRUE))
- EnableGlobalISel = false;
- if (EnableGlobalISelOption == cl::BOU_TRUE)
- EnableGlobalISel = true;
-
- if (EnableGlobalISel) {
+ if (EnableGlobalISelOption == cl::BOU_TRUE ||
+ (EnableGlobalISelOption == cl::BOU_UNSET &&
+ TM->Options.EnableGlobalISel && EnableFastISelOption != cl::BOU_TRUE)) {
if (addIRTranslator())
return true;
OpenPOWER on IntegriCloud