summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ValueNumbering.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-12-23 21:13:26 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-12-23 21:13:26 +0000
commit454a8afc6d3d0516c9946b60e815243c5a85d025 (patch)
tree56d9d4a567330c3de4642c66f90c23176f650e5b /llvm/lib/Analysis/ValueNumbering.cpp
parent0a54a58c6350aca4a15e7eb49e12e631c5a4c07f (diff)
downloadbcm5719-llvm-454a8afc6d3d0516c9946b60e815243c5a85d025.tar.gz
bcm5719-llvm-454a8afc6d3d0516c9946b60e815243c5a85d025.zip
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++). llvm-svn: 19119
Diffstat (limited to 'llvm/lib/Analysis/ValueNumbering.cpp')
-rw-r--r--llvm/lib/Analysis/ValueNumbering.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ValueNumbering.cpp b/llvm/lib/Analysis/ValueNumbering.cpp
index 49b75bd6acc..2e1174b69e7 100644
--- a/llvm/lib/Analysis/ValueNumbering.cpp
+++ b/llvm/lib/Analysis/ValueNumbering.cpp
@@ -145,8 +145,7 @@ static inline bool isIdenticalBinaryInst(const Instruction &I1,
}
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 @@ void BVNImpl::handleBinaryInst(Instruction &I) {
// 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() &&
OpenPOWER on IntegriCloud