mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
Support external methods
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -70,6 +70,7 @@ bool opt::InlineMethod(BasicBlock::iterator CIIt) {
|
|||||||
|
|
||||||
CallInst *CI = (CallInst*)*CIIt;
|
CallInst *CI = (CallInst*)*CIIt;
|
||||||
const Method *CalledMeth = CI->getCalledMethod();
|
const Method *CalledMeth = CI->getCalledMethod();
|
||||||
|
if (CalledMeth->isExternal()) return false; // Can't inline external method!
|
||||||
Method *CurrentMeth = CI->getParent()->getParent();
|
Method *CurrentMeth = CI->getParent()->getParent();
|
||||||
|
|
||||||
//cerr << "Inlining " << CalledMeth->getName() << " into "
|
//cerr << "Inlining " << CalledMeth->getName() << " into "
|
||||||
|
@ -515,6 +515,7 @@ void SCCP::OperandChangedState(User *U) {
|
|||||||
// to prove whether a value is constant and whether blocks are used.
|
// to prove whether a value is constant and whether blocks are used.
|
||||||
//
|
//
|
||||||
bool opt::DoSCCP(Method *M) {
|
bool opt::DoSCCP(Method *M) {
|
||||||
|
if (M->isExternal()) return false;
|
||||||
SCCP S(M);
|
SCCP S(M);
|
||||||
return S.doSCCP();
|
return S.doSCCP();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user