summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetPassConfig.cpp
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2016-08-26 22:32:59 +0000
committerQuentin Colombet <qcolombet@apple.com>2016-08-26 22:32:59 +0000
commit0de43b225fe6a4438025b5d2a1ff33a10647f082 (patch)
tree92667fefd364fcdf347c85878d06888c17263bb3 /llvm/lib/CodeGen/TargetPassConfig.cpp
parent1d0cb6f1070e2e3526bc59ad4dc824b149e580af (diff)
downloadbcm5719-llvm-0de43b225fe6a4438025b5d2a1ff33a10647f082.tar.gz
bcm5719-llvm-0de43b225fe6a4438025b5d2a1ff33a10647f082.zip
[TargetPassConfig] Add a target hook to know what GlobalISel should do on error.
By default, this hook tells GlobalISel to abort (report a fatal error) when it encounters an error. The alternative will be to fall back on SDISel. This fall back will be removed when the bring-up of GlobalISel is over. llvm-svn: 279879
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetPassConfig.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index 94ee30264dd..88b94f51928 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -98,6 +98,12 @@ PrintMachineInstrs("print-machineinstrs", cl::ValueOptional,
cl::desc("Print machine instrs"),
cl::value_desc("pass-name"), cl::init("option-unspecified"));
+static cl::opt<bool> EnableGlobalISelAbort(
+ "global-isel-abort", cl::Hidden,
+ cl::desc("Enable abort calls when \"global\" instruction selection "
+ "fails to lower/select an instruction"),
+ cl::init(true));
+
// Temporary option to allow experimenting with MachineScheduler as a post-RA
// scheduler. Targets can "properly" enable this with
// substitutePass(&PostRASchedulerID, &PostMachineSchedulerID).
@@ -888,3 +894,10 @@ void TargetPassConfig::addBlockPlacement() {
addPass(&MachineBlockPlacementStatsID);
}
}
+
+//===---------------------------------------------------------------------===//
+/// GlobalISel Configuration
+//===---------------------------------------------------------------------===//
+bool TargetPassConfig::isGlobalISelAbortEnabled() const {
+ return EnableGlobalISelAbort;
+}
OpenPOWER on IntegriCloud