[llvm-commits] CVS: llvm/lib/Analysis/ValueNumbering.cpp

Reid Spencer reid at x10sys.com
Thu Dec 23 13:13:37 PST 2004



Changes in directory llvm/lib/Analysis:

ValueNumbering.cpp updated: 1.11 -> 1.12
---
Log message:

Try to speed up gccld hot spot in BasicVN::getEqualNumberNodes by making
a function call at the core of the loop inline and removing unused 
stack variables from an often called function. This doesn't improve things
much, the real saving will be by reducing the number of calls to this 
function (100K+ when linking kimwitu++).


---
Diffs of the changes:  (+2 -3)

Index: llvm/lib/Analysis/ValueNumbering.cpp
diff -u llvm/lib/Analysis/ValueNumbering.cpp:1.11 llvm/lib/Analysis/ValueNumbering.cpp:1.12
--- llvm/lib/Analysis/ValueNumbering.cpp:1.11	Thu Mar 25 16:56:03 2004
+++ llvm/lib/Analysis/ValueNumbering.cpp	Thu Dec 23 15:13:26 2004
@@ -145,8 +145,7 @@
 }
 
 void BVNImpl::handleBinaryInst(Instruction &I) {
-  Value *LHS = I.getOperand(0), *RHS = I.getOperand(1);
-  Function *F = I.getParent()->getParent();
+  Value *LHS = I.getOperand(0);
   
   for (Value::use_iterator UI = LHS->use_begin(), UE = LHS->use_end();
        UI != UE; ++UI)
@@ -162,7 +161,7 @@
 // using a brute force comparison.  This is useful for instructions with an
 // arbitrary number of arguments.
 //
-static bool IdenticalComplexInst(const Instruction *I1, const Instruction *I2) {
+static inline bool IdenticalComplexInst(const Instruction *I1, const Instruction *I2) {
   assert(I1->getOpcode() == I2->getOpcode());
   // Equal if they are in the same function...
   return I1->getParent()->getParent() == I2->getParent()->getParent() &&






More information about the llvm-commits mailing list