[llvm-commits] CVS: llvm/lib/Transforms/Scalar/SCCP.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Nov 14 23:02:56 PST 2004
Changes in directory llvm/lib/Transforms/Scalar:
SCCP.cpp updated: 1.108 -> 1.109
---
Log message:
Count more accurately
---
Diffs of the changes: (+4 -0)
Index: llvm/lib/Transforms/Scalar/SCCP.cpp
diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.108 llvm/lib/Transforms/Scalar/SCCP.cpp:1.109
--- llvm/lib/Transforms/Scalar/SCCP.cpp:1.108 Sun Nov 14 23:45:33 2004
+++ llvm/lib/Transforms/Scalar/SCCP.cpp Mon Nov 15 01:02:42 2004
@@ -44,6 +44,7 @@
//
namespace {
Statistic<> NumInstRemoved("sccp", "Number of instructions removed");
+ Statistic<> NumDeadBlocks ("sccp", "Number of basic blocks unreachable");
class LatticeVal {
enum {
@@ -853,6 +854,8 @@
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB)
if (!ExecutableBBs.count(BB)) {
DEBUG(std::cerr << " BasicBlock Dead:" << *BB);
+ ++NumDeadBlocks;
+
// Delete the instructions backwards, as it has a reduced likelihood of
// having to update as many def-use and use-def chains.
std::vector<Instruction*> Insts;
@@ -866,6 +869,7 @@
I->replaceAllUsesWith(UndefValue::get(I->getType()));
BB->getInstList().erase(I);
MadeChanges = true;
+ ++NumInstRemoved;
}
}
More information about the llvm-commits
mailing list