diff options
author | Gabor Greif <ggreif@gmail.com> | 2009-03-24 19:28:39 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2009-03-24 19:28:39 +0000 |
commit | f73e319751bf112e137b3c52d03ca6c872c103e4 (patch) | |
tree | e8d9a1b8e7f3f5e332905da394708e6c82ebe76d /lib/Analysis/AliasAnalysisEvaluator.cpp | |
parent | a0e6969bbe1c4de13b0c4635df03c354c3993ef7 (diff) | |
download | external_llvm-f73e319751bf112e137b3c52d03ca6c872c103e4.zip external_llvm-f73e319751bf112e137b3c52d03ca6c872c103e4.tar.gz external_llvm-f73e319751bf112e137b3c52d03ca6c872c103e4.tar.bz2 |
simplify logic and get rid of the assumption that operand 0 is the callee
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/AliasAnalysisEvaluator.cpp')
-rw-r--r-- | lib/Analysis/AliasAnalysisEvaluator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/AliasAnalysisEvaluator.cpp b/lib/Analysis/AliasAnalysisEvaluator.cpp index c7a86d3..07820e3 100644 --- a/lib/Analysis/AliasAnalysisEvaluator.cpp +++ b/lib/Analysis/AliasAnalysisEvaluator.cpp @@ -123,14 +123,14 @@ bool AAEval::runOnFunction(Function &F) { Pointers.insert(&*I); Instruction &Inst = *I; User::op_iterator OI = Inst.op_begin(); - if ((isa<InvokeInst>(Inst) || isa<CallInst>(Inst)) && - isa<Function>(Inst.getOperand(0))) + CallSite CS = CallSite::get(&Inst); + if (CS.getInstruction() && + isa<Function>(CS.getCalledValue())) ++OI; // Skip actual functions for direct function calls. for (; OI != Inst.op_end(); ++OI) if (isa<PointerType>((*OI)->getType()) && !isa<ConstantPointerNull>(*OI)) Pointers.insert(*OI); - CallSite CS = CallSite::get(&*I); if (CS.getInstruction()) CallSites.insert(CS); } |