mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-20 14:29:27 +00:00
s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2043 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
87f856c793
commit
dc89f87d52
@ -100,10 +100,10 @@ void CallGraph::addToCallGraph(Function *M) {
|
|||||||
Instruction *I = *II;
|
Instruction *I = *II;
|
||||||
|
|
||||||
if (CallInst *CI = dyn_cast<CallInst>(I)) {
|
if (CallInst *CI = dyn_cast<CallInst>(I)) {
|
||||||
if (CI->getCalledMethod() == 0)
|
if (CI->getCalledFunction() == 0)
|
||||||
Node->addCalledMethod(ExternalNode);
|
Node->addCalledMethod(ExternalNode);
|
||||||
} else if (InvokeInst *II = dyn_cast<InvokeInst>(I)) {
|
} else if (InvokeInst *II = dyn_cast<InvokeInst>(I)) {
|
||||||
if (II->getCalledMethod() == 0)
|
if (II->getCalledFunction() == 0)
|
||||||
Node->addCalledMethod(ExternalNode);
|
Node->addCalledMethod(ExternalNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ bool InlineMethod(BasicBlock::iterator CIIt) {
|
|||||||
assert((*CIIt)->getParent()->getParent() && "Instruction not in method!");
|
assert((*CIIt)->getParent()->getParent() && "Instruction not in method!");
|
||||||
|
|
||||||
CallInst *CI = cast<CallInst>(*CIIt);
|
CallInst *CI = cast<CallInst>(*CIIt);
|
||||||
const Method *CalledMeth = CI->getCalledMethod();
|
const Function *CalledMeth = CI->getCalledFunction();
|
||||||
if (CalledMeth == 0 || // Can't inline external method or indirect call!
|
if (CalledMeth == 0 || // Can't inline external method or indirect call!
|
||||||
CalledMeth->isExternal()) return false;
|
CalledMeth->isExternal()) return false;
|
||||||
|
|
||||||
@ -242,8 +242,8 @@ static inline bool DoMethodInlining(BasicBlock *BB) {
|
|||||||
for (BasicBlock::iterator I = BB->begin(); I != BB->end(); ++I) {
|
for (BasicBlock::iterator I = BB->begin(); I != BB->end(); ++I) {
|
||||||
if (CallInst *CI = dyn_cast<CallInst>(*I)) {
|
if (CallInst *CI = dyn_cast<CallInst>(*I)) {
|
||||||
// Check to see if we should inline this method
|
// Check to see if we should inline this method
|
||||||
Method *M = CI->getCalledMethod();
|
Method *F = CI->getCalledFunction();
|
||||||
if (M && ShouldInlineMethod(CI, M))
|
if (F && ShouldInlineMethod(CI, F))
|
||||||
return InlineMethod(I);
|
return InlineMethod(I);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user