summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-09-09 23:05:00 +0000
committerDan Gohman <gohman@apple.com>2008-09-09 23:05:00 +0000
commit4344a5d0d7b280f0b891e0e6a4413b059d9080b3 (patch)
treec71f090dc7487efe42dfee178a384386c05f35ed /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent4b88702ac3fac540b970e2d92f3dcc5071f16a84 (diff)
downloadllvm-4344a5d0d7b280f0b891e0e6a4413b059d9080b3.tar.gz
llvm-4344a5d0d7b280f0b891e0e6a4413b059d9080b3.tar.bz2
llvm-4344a5d0d7b280f0b891e0e6a4413b059d9080b3.tar.xz
Change -fast-isel-no-abort to -fast-isel-abort, which now defaults
to being off by default. Also, add assertion checks to check that the various fast-isel-related command-line options are only used when -fast-isel itself is enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56029 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 070bd7084e..acc2c050a0 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -64,9 +64,8 @@ EnableFastISelVerbose("fast-isel-verbose", cl::Hidden,
cl::desc("Enable verbose messages in the experimental \"fast\" "
"instruction selector"));
static cl::opt<bool>
-DisableFastISelAbort("fast-isel-no-abort", cl::Hidden,
- cl::desc("Use the SelectionDAGISel when \"fast\" instruction "
- "selection fails"));
+EnableFastISelAbort("fast-isel-abort", cl::Hidden,
+ cl::desc("Enable abort calls when \"fast\" instruction fails"));
static cl::opt<bool>
SchedLiveInCopies("schedule-livein-copies",
cl::desc("Schedule copies of livein registers"),
@@ -287,6 +286,12 @@ void SelectionDAGISel::getAnalysisUsage(AnalysisUsage &AU) const {
}
bool SelectionDAGISel::runOnFunction(Function &Fn) {
+ // Do some sanity-checking on the command-line options.
+ assert((!EnableFastISelVerbose || EnableFastISel) &&
+ "-fast-isel-verbose requires -fast-isel");
+ assert((!EnableFastISelAbort || EnableFastISel) &&
+ "-fast-isel-abort requires -fast-isel");
+
// Get alias analysis for load/store combining.
AA = &getAnalysis<AliasAnalysis>();
@@ -747,11 +752,11 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF) {
// feed PHI nodes in successor blocks.
if (isa<TerminatorInst>(BI))
if (!HandlePHINodesInSuccessorBlocksFast(LLVMBB, F)) {
- if (EnableFastISelVerbose || !DisableFastISelAbort) {
+ if (EnableFastISelVerbose || EnableFastISelAbort) {
cerr << "FastISel miss: ";
BI->dump();
}
- if (!DisableFastISelAbort)
+ if (EnableFastISelAbort)
assert(0 && "FastISel didn't handle a PHI in a successor");
}
@@ -778,11 +783,11 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF) {
// 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)) {
- if (EnableFastISelVerbose || !DisableFastISelAbort) {
+ if (EnableFastISelVerbose || EnableFastISelAbort) {
cerr << "FastISel miss: ";
BI->dump();
}
- if (!DisableFastISelAbort)
+ if (EnableFastISelAbort)
// The "fast" selector couldn't handle something and bailed.
// For the purpose of debugging, just abort.
assert(0 && "FastISel didn't select the entire block");