mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Implement a proper getModRefInfo for va_arg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110458 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -229,6 +229,23 @@ AliasAnalysis::getModRefInfo(const StoreInst *S, const Value *P, unsigned Size)
|
||||
return Mod;
|
||||
}
|
||||
|
||||
AliasAnalysis::ModRefResult
|
||||
AliasAnalysis::getModRefInfo(const VAArgInst *V, const Value *P, unsigned Size) {
|
||||
// If the va_arg address cannot alias the pointer in question, then the
|
||||
// specified memory cannot be accessed by the va_arg.
|
||||
if (!alias(V->getOperand(0), UnknownSize, P, Size))
|
||||
return NoModRef;
|
||||
|
||||
// If the pointer is a pointer to constant memory, then it could not have been
|
||||
// modified by this va_arg.
|
||||
if (pointsToConstantMemory(P))
|
||||
return NoModRef;
|
||||
|
||||
// Otherwise, a va_arg reads and writes.
|
||||
return ModRef;
|
||||
}
|
||||
|
||||
|
||||
AliasAnalysis::ModRefBehavior
|
||||
AliasAnalysis::getIntrinsicModRefBehavior(unsigned iid) {
|
||||
#define GET_INTRINSIC_MODREF_BEHAVIOR
|
||||
|
Reference in New Issue
Block a user