make AliasAnalysis know that VAArg writes memory. This is extremely conservative and should be fixed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22267 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Lenharth 2005-06-20 15:24:23 +00:00
parent e3e1739b7d
commit 14f1703ae3

View File

@ -37,6 +37,7 @@ namespace llvm {
class LoadInst;
class StoreInst;
class VAArgInst;
class TargetData;
class AliasAnalysis {
@ -254,8 +255,12 @@ public:
ModRefResult getModRefInfo(InvokeInst *I, Value *P, unsigned Size) {
return getModRefInfo(CallSite(I), P, Size);
}
ModRefResult getModRefInfo(VAArgInst* I, Value* P, unsigned Size) {
return AliasAnalysis::Mod;
}
ModRefResult getModRefInfo(Instruction *I, Value *P, unsigned Size) {
switch (I->getOpcode()) {
case Instruction::VAArg: return getModRefInfo((VAArgInst*)I, P, Size);
case Instruction::Load: return getModRefInfo((LoadInst*)I, P, Size);
case Instruction::Store: return getModRefInfo((StoreInst*)I, P, Size);
case Instruction::Call: return getModRefInfo((CallInst*)I, P, Size);