[llvm-commits] [poolalloc] r130268 - /poolalloc/trunk/lib/DSA/AddressTakenAnalysis.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Tue Apr 26 17:39:15 PDT 2011
Author: aggarwa4
Date: Tue Apr 26 19:39:15 2011
New Revision: 130268
URL: http://llvm.org/viewvc/llvm-project?rev=130268&view=rev
Log:
If the use is never used, dont count this as address
taken. CallInst/InvokeInst/StoreInst which are
relavant without subsequent uses of result, have
already been checked.
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=130268&r1=130267&r2=130268&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/AddressTakenAnalysis.cpp (original)
+++ poolalloc/trunk/lib/DSA/AddressTakenAnalysis.cpp Tue Apr 26 19:39:15 2011
@@ -42,6 +42,8 @@
if(isa<StoreInst>(U))
return true;
if (!isa<CallInst>(U) && !isa<InvokeInst>(U)) {
+ if(U->use_empty())
+ continue;
if(isa<GlobalAlias>(U)) {
if(isAddressTaken(U))
return true;
@@ -53,7 +55,6 @@
}
}
}
-
return true;
}
More information about the llvm-commits
mailing list