mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
simplify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109585 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -126,8 +126,7 @@ bool AAEval::runOnFunction(Function &F) {
|
|||||||
if (I->getType()->isPointerTy()) // Add all pointer instructions.
|
if (I->getType()->isPointerTy()) // Add all pointer instructions.
|
||||||
Pointers.insert(&*I);
|
Pointers.insert(&*I);
|
||||||
Instruction &Inst = *I;
|
Instruction &Inst = *I;
|
||||||
CallSite CS = CallSite::get(&Inst);
|
if (CallSite CS = cast<Value>(&Inst)) {
|
||||||
if (CS) {
|
|
||||||
Value *Callee = CS.getCalledValue();
|
Value *Callee = CS.getCalledValue();
|
||||||
// Skip actual functions for direct function calls.
|
// Skip actual functions for direct function calls.
|
||||||
if (!isa<Function>(Callee) && isInterestingPointer(Callee))
|
if (!isa<Function>(Callee) && isInterestingPointer(Callee))
|
||||||
@ -137,6 +136,7 @@ bool AAEval::runOnFunction(Function &F) {
|
|||||||
AI != AE; ++AI)
|
AI != AE; ++AI)
|
||||||
if (isInterestingPointer(*AI))
|
if (isInterestingPointer(*AI))
|
||||||
Pointers.insert(*AI);
|
Pointers.insert(*AI);
|
||||||
|
CallSites.insert(CS);
|
||||||
} else {
|
} else {
|
||||||
// Consider all operands.
|
// Consider all operands.
|
||||||
for (Instruction::op_iterator OI = Inst.op_begin(), OE = Inst.op_end();
|
for (Instruction::op_iterator OI = Inst.op_begin(), OE = Inst.op_end();
|
||||||
@ -144,8 +144,6 @@ bool AAEval::runOnFunction(Function &F) {
|
|||||||
if (isInterestingPointer(*OI))
|
if (isInterestingPointer(*OI))
|
||||||
Pointers.insert(*OI);
|
Pointers.insert(*OI);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CS.getInstruction()) CallSites.insert(CS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PrintNoAlias || PrintMayAlias || PrintMustAlias ||
|
if (PrintNoAlias || PrintMayAlias || PrintMustAlias ||
|
||||||
|
Reference in New Issue
Block a user