mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-13 08:26:02 +00:00
[FastISel] Collect statistics about failing intrinsic calls.
Add more instruction-specific statistics about failing intrinsic calls during FastISel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210556 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -141,6 +141,25 @@ STATISTIC(NumFastIselFailShuffleVector,"Fast isel fails on ShuffleVector");
|
|||||||
STATISTIC(NumFastIselFailExtractValue,"Fast isel fails on ExtractValue");
|
STATISTIC(NumFastIselFailExtractValue,"Fast isel fails on ExtractValue");
|
||||||
STATISTIC(NumFastIselFailInsertValue,"Fast isel fails on InsertValue");
|
STATISTIC(NumFastIselFailInsertValue,"Fast isel fails on InsertValue");
|
||||||
STATISTIC(NumFastIselFailLandingPad,"Fast isel fails on LandingPad");
|
STATISTIC(NumFastIselFailLandingPad,"Fast isel fails on LandingPad");
|
||||||
|
|
||||||
|
// Intrinsic instructions...
|
||||||
|
STATISTIC(NumFastIselFailIntrinsicCall, "Fast isel fails on Intrinsic call");
|
||||||
|
STATISTIC(NumFastIselFailSAddWithOverflow,
|
||||||
|
"Fast isel fails on sadd.with.overflow");
|
||||||
|
STATISTIC(NumFastIselFailUAddWithOverflow,
|
||||||
|
"Fast isel fails on uadd.with.overflow");
|
||||||
|
STATISTIC(NumFastIselFailSSubWithOverflow,
|
||||||
|
"Fast isel fails on ssub.with.overflow");
|
||||||
|
STATISTIC(NumFastIselFailUSubWithOverflow,
|
||||||
|
"Fast isel fails on usub.with.overflow");
|
||||||
|
STATISTIC(NumFastIselFailSMulWithOverflow,
|
||||||
|
"Fast isel fails on smul.with.overflow");
|
||||||
|
STATISTIC(NumFastIselFailUMulWithOverflow,
|
||||||
|
"Fast isel fails on umul.with.overflow");
|
||||||
|
STATISTIC(NumFastIselFailFrameaddress, "Fast isel fails on Frameaddress");
|
||||||
|
STATISTIC(NumFastIselFailSqrt, "Fast isel fails on sqrt call");
|
||||||
|
STATISTIC(NumFastIselFailStackMap, "Fast isel fails on StackMap call");
|
||||||
|
STATISTIC(NumFastIselFailPatchPoint, "Fast isel fails on PatchPoint call");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
@@ -974,7 +993,37 @@ static void collectFailStats(const Instruction *I) {
|
|||||||
case Instruction::FCmp: NumFastIselFailFCmp++; return;
|
case Instruction::FCmp: NumFastIselFailFCmp++; return;
|
||||||
case Instruction::PHI: NumFastIselFailPHI++; return;
|
case Instruction::PHI: NumFastIselFailPHI++; return;
|
||||||
case Instruction::Select: NumFastIselFailSelect++; return;
|
case Instruction::Select: NumFastIselFailSelect++; return;
|
||||||
case Instruction::Call: NumFastIselFailCall++; return;
|
case Instruction::Call: {
|
||||||
|
if (auto const *Intrinsic = dyn_cast<IntrinsicInst>(I)) {
|
||||||
|
switch (Intrinsic->getIntrinsicID()) {
|
||||||
|
default:
|
||||||
|
NumFastIselFailIntrinsicCall++; return;
|
||||||
|
case Intrinsic::sadd_with_overflow:
|
||||||
|
NumFastIselFailSAddWithOverflow++; return;
|
||||||
|
case Intrinsic::uadd_with_overflow:
|
||||||
|
NumFastIselFailUAddWithOverflow++; return;
|
||||||
|
case Intrinsic::ssub_with_overflow:
|
||||||
|
NumFastIselFailSSubWithOverflow++; return;
|
||||||
|
case Intrinsic::usub_with_overflow:
|
||||||
|
NumFastIselFailUSubWithOverflow++; return;
|
||||||
|
case Intrinsic::smul_with_overflow:
|
||||||
|
NumFastIselFailSMulWithOverflow++; return;
|
||||||
|
case Intrinsic::umul_with_overflow:
|
||||||
|
NumFastIselFailUMulWithOverflow++; return;
|
||||||
|
case Intrinsic::frameaddress:
|
||||||
|
NumFastIselFailFrameaddress++; return;
|
||||||
|
case Intrinsic::sqrt:
|
||||||
|
NumFastIselFailSqrt++; return;
|
||||||
|
case Intrinsic::experimental_stackmap:
|
||||||
|
NumFastIselFailStackMap++; return;
|
||||||
|
case Intrinsic::experimental_patchpoint_void: // fall-through
|
||||||
|
case Intrinsic::experimental_patchpoint_i64:
|
||||||
|
NumFastIselFailPatchPoint++; return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
NumFastIselFailCall++;
|
||||||
|
return;
|
||||||
|
}
|
||||||
case Instruction::Shl: NumFastIselFailShl++; return;
|
case Instruction::Shl: NumFastIselFailShl++; return;
|
||||||
case Instruction::LShr: NumFastIselFailLShr++; return;
|
case Instruction::LShr: NumFastIselFailLShr++; return;
|
||||||
case Instruction::AShr: NumFastIselFailAShr++; return;
|
case Instruction::AShr: NumFastIselFailAShr++; return;
|
||||||
|
Reference in New Issue
Block a user