diff options
author | Dan Gohman <gohman@apple.com> | 2008-10-28 20:35:31 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-10-28 20:35:31 +0000 |
commit | 2275105edbee89df8f5a68655ee75c9a5f169dbb (patch) | |
tree | 34bbb9d9dde7055b02799cdb1ccb31166d63a205 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 19bd0adf0d914aa3eb568280a36ee4f5851116d9 (diff) |
Take Chris' suggestion and define EnableFastISelVerbose and
EnableFastISelAbort variables for Release mode instead of
using ifdefs in the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58350 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index f502247680..7702b3d5e9 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -63,6 +63,9 @@ EnableFastISelVerbose("fast-isel-verbose", cl::Hidden, static cl::opt<bool> EnableFastISelAbort("fast-isel-abort", cl::Hidden, cl::desc("Enable abort calls when \"fast\" instruction fails")); +#else +static const bool EnableFastISelVerbose = false, + EnableFastISelAbort = false; #endif static cl::opt<bool> SchedLiveInCopies("schedule-livein-copies", @@ -703,10 +706,8 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, for (Function::arg_iterator I = Fn.arg_begin(), E = Fn.arg_end(); I != E; ++I, ++j) if (Fn.paramHasAttr(j, Attribute::ByVal)) { -#ifndef NDEBUG if (EnableFastISelVerbose || EnableFastISelAbort) cerr << "FastISel skips entry block due to byval argument\n"; -#endif SuppressFastISel = true; break; } @@ -770,14 +771,12 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, // feed PHI nodes in successor blocks. if (isa<TerminatorInst>(BI)) if (!HandlePHINodesInSuccessorBlocksFast(LLVMBB, FastIS)) { -#ifndef NDEBUG if (EnableFastISelVerbose || EnableFastISelAbort) { cerr << "FastISel miss: "; BI->dump(); } if (EnableFastISelAbort) assert(0 && "FastISel didn't handle a PHI in a successor"); -#endif break; } @@ -791,12 +790,10 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, // Then handle certain instructions as single-LLVM-Instruction blocks. if (isa<CallInst>(BI)) { -#ifndef NDEBUG if (EnableFastISelVerbose || EnableFastISelAbort) { cerr << "FastISel missed call: "; BI->dump(); } -#endif if (BI->getType() != Type::VoidTy) { unsigned &R = FuncInfo->ValueMap[BI]; @@ -811,7 +808,6 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, continue; } -#ifndef NDEBUG // Otherwise, give up on FastISel for the rest of the block. // For now, be a little lenient about non-branch terminators. if (!isa<TerminatorInst>(BI) || isa<BranchInst>(BI)) { @@ -824,7 +820,6 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF, // For the purpose of debugging, just abort. assert(0 && "FastISel didn't select the entire block"); } -#endif break; } } |