mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-21 12:38:45 +00:00
add a statistic for # times fastisel fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97738 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
39c75f2e90
commit
c19ae9d91d
@ -56,9 +56,12 @@
|
|||||||
#include "llvm/Support/MathExtras.h"
|
#include "llvm/Support/MathExtras.h"
|
||||||
#include "llvm/Support/Timer.h"
|
#include "llvm/Support/Timer.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
|
#include "llvm/ADT/Statistic.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
STATISTIC(NumFastIselFailures, "Number of instructions fast isel failed on");
|
||||||
|
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
EnableFastISelVerbose("fast-isel-verbose", cl::Hidden,
|
EnableFastISelVerbose("fast-isel-verbose", cl::Hidden,
|
||||||
cl::desc("Enable verbose messages in the \"fast\" "
|
cl::desc("Enable verbose messages in the \"fast\" "
|
||||||
@ -930,6 +933,7 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn,
|
|||||||
// feed PHI nodes in successor blocks.
|
// feed PHI nodes in successor blocks.
|
||||||
if (isa<TerminatorInst>(BI))
|
if (isa<TerminatorInst>(BI))
|
||||||
if (!HandlePHINodesInSuccessorBlocksFast(LLVMBB, FastIS)) {
|
if (!HandlePHINodesInSuccessorBlocksFast(LLVMBB, FastIS)) {
|
||||||
|
++NumFastIselFailures;
|
||||||
ResetDebugLoc(SDB, FastIS);
|
ResetDebugLoc(SDB, FastIS);
|
||||||
if (EnableFastISelVerbose || EnableFastISelAbort) {
|
if (EnableFastISelVerbose || EnableFastISelAbort) {
|
||||||
dbgs() << "FastISel miss: ";
|
dbgs() << "FastISel miss: ";
|
||||||
@ -954,6 +958,7 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn,
|
|||||||
|
|
||||||
// Then handle certain instructions as single-LLVM-Instruction blocks.
|
// Then handle certain instructions as single-LLVM-Instruction blocks.
|
||||||
if (isa<CallInst>(BI)) {
|
if (isa<CallInst>(BI)) {
|
||||||
|
++NumFastIselFailures;
|
||||||
if (EnableFastISelVerbose || EnableFastISelAbort) {
|
if (EnableFastISelVerbose || EnableFastISelAbort) {
|
||||||
dbgs() << "FastISel missed call: ";
|
dbgs() << "FastISel missed call: ";
|
||||||
BI->dump();
|
BI->dump();
|
||||||
@ -983,6 +988,7 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn,
|
|||||||
// Otherwise, give up on FastISel for the rest of the block.
|
// Otherwise, give up on FastISel for the rest of the block.
|
||||||
// For now, be a little lenient about non-branch terminators.
|
// For now, be a little lenient about non-branch terminators.
|
||||||
if (!isa<TerminatorInst>(BI) || isa<BranchInst>(BI)) {
|
if (!isa<TerminatorInst>(BI) || isa<BranchInst>(BI)) {
|
||||||
|
++NumFastIselFailures;
|
||||||
if (EnableFastISelVerbose || EnableFastISelAbort) {
|
if (EnableFastISelVerbose || EnableFastISelAbort) {
|
||||||
dbgs() << "FastISel miss: ";
|
dbgs() << "FastISel miss: ";
|
||||||
BI->dump();
|
BI->dump();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user