[llvm-commits] [poolalloc] r124877 - /poolalloc/trunk/lib/DSA/AddressTakenAnalysis.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Fri Feb 4 09:51:48 PST 2011
Author: aggarwa4
Date: Fri Feb 4 11:51:48 2011
New Revision: 124877
URL: http://llvm.org/viewvc/llvm-project?rev=124877&view=rev
Log:
Do not care about users, that are never used.
Modified:
poolalloc/trunk/lib/DSA/AddressTakenAnalysis.cpp
Modified: poolalloc/trunk/lib/DSA/AddressTakenAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/AddressTakenAnalysis.cpp?rev=124877&r1=124876&r2=124877&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/AddressTakenAnalysis.cpp (original)
+++ poolalloc/trunk/lib/DSA/AddressTakenAnalysis.cpp Fri Feb 4 11:51:48 2011
@@ -39,6 +39,8 @@
static bool isAddressTaken(Value* V) {
for (Value::use_iterator I = V->use_begin(), E = V->use_end(); I != E; ++I) {
User *U = *I;
+ if(U->getNumUses() == 0)
+ continue;
if (!isa<CallInst>(U) && !isa<InvokeInst>(U)) {
if(isa<GlobalAlias>(U)) {
if(isAddressTaken(U))
@@ -53,9 +55,8 @@
// are never used
} else {
llvm::CallSite CS(cast<Instruction>(U));
- if (!CS.isCallee(I)) {
+ if (!CS.isCallee(I))
return true;
- }
}
}
return false;
More information about the llvm-commits
mailing list