diff options
author | Quentin Colombet <qcolombet@apple.com> | 2016-08-31 18:43:04 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2016-08-31 18:43:04 +0000 |
commit | 1c06a73a7c300105e9f685d4388e0f2d6c0021a1 (patch) | |
tree | f88004ff5777f3c2ad6f8246c22ae064769a2d99 /llvm/lib/CodeGen/TargetPassConfig.cpp | |
parent | 612cd1fdd64cc7593b38115abd0e1bfb6f552b9d (diff) | |
download | bcm5719-llvm-1c06a73a7c300105e9f685d4388e0f2d6c0021a1.tar.gz bcm5719-llvm-1c06a73a7c300105e9f685d4388e0f2d6c0021a1.zip |
[TargetPassConfig] Add a hook to tell whether GlobalISel should warm on fallback.
Thanks to this patch, we know have a way to easly see if GlobalISel
failed.
llvm-svn: 280273
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetPassConfig.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index 88b94f51928..1244681592b 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -98,11 +98,13 @@ PrintMachineInstrs("print-machineinstrs", cl::ValueOptional, cl::desc("Print machine instrs"), cl::value_desc("pass-name"), cl::init("option-unspecified")); -static cl::opt<bool> EnableGlobalISelAbort( +static cl::opt<int> EnableGlobalISelAbort( "global-isel-abort", cl::Hidden, cl::desc("Enable abort calls when \"global\" instruction selection " - "fails to lower/select an instruction"), - cl::init(true)); + "fails to lower/select an instruction: 0 disable the abort, " + "1 enable the abort, and " + "2 disable the abort but emit a diagnostic on failure"), + cl::init(1)); // Temporary option to allow experimenting with MachineScheduler as a post-RA // scheduler. Targets can "properly" enable this with @@ -899,5 +901,9 @@ void TargetPassConfig::addBlockPlacement() { /// GlobalISel Configuration //===---------------------------------------------------------------------===// bool TargetPassConfig::isGlobalISelAbortEnabled() const { - return EnableGlobalISelAbort; + return EnableGlobalISelAbort == 1; +} + +bool TargetPassConfig::reportDiagnosticWhenGlobalISelFallback() const { + return EnableGlobalISelAbort == 2; } |