From: Mehdi Amini Date: Sat, 28 Feb 2015 19:34:54 +0000 (+0000) Subject: Fixup for recent -fast-isel-abort change: code didn't match description X-Git-Tag: android-x86-7.1-r4~51097 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8d25e3a83205918688ecec526b6d41f61b6f4500;p=android-x86%2Fexternal-llvm.git Fixup for recent -fast-isel-abort change: code didn't match description Level 1 should abort for all instructions but call/terminators/args. Instead it was aborting only if the level was > 2 From: Mehdi Amini git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230861 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 3506de08f61..d015b0b0dd0 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -1282,16 +1282,19 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) { continue; } + bool ShouldAbort = EnableFastISelAbort; if (EnableFastISelVerbose || EnableFastISelAbort) { if (isa(Inst)) { // Use a different message for terminator misses. dbgs() << "FastISel missed terminator: "; + // Don't abort unless for terminator unless the level is really high + ShouldAbort = (EnableFastISelAbort > 2); } else { dbgs() << "FastISel miss: "; } Inst->dump(); } - if (EnableFastISelAbort > 2) + if (ShouldAbort) // FastISel selector couldn't handle something and bailed. // For the purpose of debugging, just abort. llvm_unreachable("FastISel didn't select the entire block");