mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110155 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user