summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LibCallAliasAnalysis.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-03 21:48:53 +0000
committerDan Gohman <gohman@apple.com>2010-08-03 21:48:53 +0000
commit5442c71f2ef77c2c1b5ed0555e70332f463a1520 (patch)
treea4acbb3ad56e509982db3b1d3282d1352c3099ad /llvm/lib/Analysis/LibCallAliasAnalysis.cpp
parentf568b074dbf0c1e8950d2786873a32e5c4baa5c4 (diff)
downloadbcm5719-llvm-5442c71f2ef77c2c1b5ed0555e70332f463a1520.tar.gz
bcm5719-llvm-5442c71f2ef77c2c1b5ed0555e70332f463a1520.zip
Thread const correctness through a bunch of AliasAnalysis interfaces and
eliminate several const_casts. Make CallSite implicitly convertible to ImmutableCallSite. Rename the getModRefBehavior for intrinsic IDs to getIntrinsicModRefBehavior to avoid overload ambiguity with CallSite, which happens to be implicitly convertible to bool. llvm-svn: 110155
Diffstat (limited to 'llvm/lib/Analysis/LibCallAliasAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/LibCallAliasAnalysis.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/LibCallAliasAnalysis.cpp b/llvm/lib/Analysis/LibCallAliasAnalysis.cpp
index 9dca93f9e76..7f51202ecb5 100644
--- a/llvm/lib/Analysis/LibCallAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/LibCallAliasAnalysis.cpp
@@ -43,7 +43,7 @@ void LibCallAliasAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {
/// vs the specified pointer/size.
AliasAnalysis::ModRefResult
LibCallAliasAnalysis::AnalyzeLibCallDetails(const LibCallFunctionInfo *FI,
- CallSite CS, Value *P,
+ ImmutableCallSite CS, const Value *P,
unsigned Size) {
// If we have a function, check to see what kind of mod/ref effects it
// has. Start by including any info globally known about the function.
@@ -117,13 +117,14 @@ LibCallAliasAnalysis::AnalyzeLibCallDetails(const LibCallFunctionInfo *FI,
// specified memory object.
//
AliasAnalysis::ModRefResult
-LibCallAliasAnalysis::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
+LibCallAliasAnalysis::getModRefInfo(ImmutableCallSite CS,
+ const Value *P, unsigned Size) {
ModRefResult MRInfo = ModRef;
// If this is a direct call to a function that LCI knows about, get the
// information about the runtime function.
if (LCI) {
- if (Function *F = CS.getCalledFunction()) {
+ if (const Function *F = CS.getCalledFunction()) {
if (const LibCallFunctionInfo *FI = LCI->getFunctionInfo(F)) {
MRInfo = ModRefResult(MRInfo & AnalyzeLibCallDetails(FI, CS, P, Size));
if (MRInfo == NoModRef) return NoModRef;
OpenPOWER on IntegriCloud