File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
llvm/lib/Transforms/Scalar Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ using namespace llvm;
45
45
using namespace llvm ::PatternMatch;
46
46
47
47
STATISTIC (NumBlocksElim, " Number of blocks eliminated" );
48
+ STATISTIC (NumPHIsElim, " Number of trivial PHIs eliminated" );
49
+ STATISTIC (NumGEPsElim, " Number of GEPs converted to casts" );
48
50
STATISTIC (NumCmpUses, " Number of uses of Cmp expressions replaced with uses of "
49
51
" sunken Cmps" );
50
52
STATISTIC (NumCastUses, " Number of uses of Cast expressions replaced with uses "
@@ -981,6 +983,7 @@ bool CodeGenPrepare::OptimizeBlock(BasicBlock &BB) {
981
983
if (Value *V = SimplifyInstruction (P)) {
982
984
P->replaceAllUsesWith (V);
983
985
P->eraseFromParent ();
986
+ ++NumPHIsElim;
984
987
}
985
988
} else if (CastInst *CI = dyn_cast<CastInst>(I)) {
986
989
// If the source of the cast is a constant, then this should have
@@ -1020,6 +1023,7 @@ bool CodeGenPrepare::OptimizeBlock(BasicBlock &BB) {
1020
1023
GEPI->getName (), GEPI);
1021
1024
GEPI->replaceAllUsesWith (NC);
1022
1025
GEPI->eraseFromParent ();
1026
+ ++NumGEPsElim;
1023
1027
MadeChange = true ;
1024
1028
BBI = NC;
1025
1029
}
You can’t perform that action at this time.
0 commit comments