Introduce ImmutableCallSite, useful for contexts where no mutation

is necessary. Inherits from new templated baseclass CallSiteBase<>
which is highly customizable. Base CallSite on it too, in a configuration
that allows full mutation.
Adapt some call sites in analyses to employ ImmutableCallSite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100100 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif
2010-04-01 08:21:08 +00:00
parent 2d7820cb78
commit c8b82ccbcf
6 changed files with 240 additions and 195 deletions

View File

@@ -1717,7 +1717,7 @@ static bool AddressIsTaken(const GlobalValue *GV) {
return true; // Storing addr of GV.
} else if (isa<InvokeInst>(U) || isa<CallInst>(U)) {
// Make sure we are calling the function, not passing the address.
CallSite CS((Instruction*)U);
ImmutableCallSite CS(cast<Instruction>(U));
if (!CS.isCallee(UI))
return true;
} else if (const LoadInst *LI = dyn_cast<LoadInst>(U)) {