[llvm-commits] [poolalloc] r124877 - /poolalloc/trunk/lib/DSA/AddressTakenAnalysis.cpp
Nick Lewycky
nicholas at mxc.ca
Sat Feb 5 19:02:04 PST 2011
Arushi Aggarwal wrote:
> 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 (U->use_empty())
continue;
Nick
> 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;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list