mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Add a new option, -fast-isel-verbose, that can be used with
-fast-isel-no-abort to get a dump of all unhandled instructions, without an abort. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56021 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3ef2d60e95
commit
293d5f8bc0
@ -60,6 +60,10 @@ static cl::opt<bool>
|
|||||||
EnableFastISel("fast-isel", cl::Hidden,
|
EnableFastISel("fast-isel", cl::Hidden,
|
||||||
cl::desc("Enable the experimental \"fast\" instruction selector"));
|
cl::desc("Enable the experimental \"fast\" instruction selector"));
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
|
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,
|
DisableFastISelAbort("fast-isel-no-abort", cl::Hidden,
|
||||||
cl::desc("Use the SelectionDAGISel when \"fast\" instruction "
|
cl::desc("Use the SelectionDAGISel when \"fast\" instruction "
|
||||||
"selection fails"));
|
"selection fails"));
|
||||||
@ -743,11 +747,11 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF) {
|
|||||||
// feed PHI nodes in successor blocks.
|
// feed PHI nodes in successor blocks.
|
||||||
if (isa<TerminatorInst>(BI))
|
if (isa<TerminatorInst>(BI))
|
||||||
if (!HandlePHINodesInSuccessorBlocksFast(LLVMBB, F)) {
|
if (!HandlePHINodesInSuccessorBlocksFast(LLVMBB, F)) {
|
||||||
if (DisableFastISelAbort)
|
if (EnableFastISelVerbose || !DisableFastISelAbort) {
|
||||||
break;
|
cerr << "FastISel miss: ";
|
||||||
#ifndef NDEBUG
|
|
||||||
BI->dump();
|
BI->dump();
|
||||||
#endif
|
}
|
||||||
|
if (!DisableFastISelAbort)
|
||||||
assert(0 && "FastISel didn't handle a PHI in a successor");
|
assert(0 && "FastISel didn't handle a PHI in a successor");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -771,14 +775,16 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn, MachineFunction &MF) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!DisableFastISelAbort &&
|
// Otherwise, give up on FastISel for the rest of the block.
|
||||||
// For now, don't abort on non-conditional-branch terminators.
|
// For now, be a little lenient about non-branch terminators.
|
||||||
(!isa<TerminatorInst>(BI) || isa<BranchInst>(BI))) {
|
if (!isa<TerminatorInst>(BI) || isa<BranchInst>(BI)) {
|
||||||
|
if (EnableFastISelVerbose || !DisableFastISelAbort) {
|
||||||
|
cerr << "FastISel miss: ";
|
||||||
|
BI->dump();
|
||||||
|
}
|
||||||
|
if (!DisableFastISelAbort)
|
||||||
// The "fast" selector couldn't handle something and bailed.
|
// The "fast" selector couldn't handle something and bailed.
|
||||||
// For the purpose of debugging, just abort.
|
// For the purpose of debugging, just abort.
|
||||||
#ifndef NDEBUG
|
|
||||||
BI->dump();
|
|
||||||
#endif
|
|
||||||
assert(0 && "FastISel didn't select the entire block");
|
assert(0 && "FastISel didn't select the entire block");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user