mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-22 19:38:40 +00:00
re-enable direct calls, this should just be a performance boost
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22148 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
732c843f0e
commit
04aa46d647
@ -2151,16 +2151,13 @@ pC = pA OR pB
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX we want to re-enable direct branches! crippling them now
|
// build the right kind of call. if we can branch directly, do so:
|
||||||
* to stress-test indirect branches.:
|
|
||||||
//build the right kind of call
|
|
||||||
if (GlobalAddressSDNode *GASD =
|
if (GlobalAddressSDNode *GASD =
|
||||||
dyn_cast<GlobalAddressSDNode>(N.getOperand(1)))
|
dyn_cast<GlobalAddressSDNode>(N.getOperand(1)))
|
||||||
{
|
{
|
||||||
BuildMI(BB, IA64::BRCALL, 1).addGlobalAddress(GASD->getGlobal(),true);
|
BuildMI(BB, IA64::BRCALL, 1).addGlobalAddress(GASD->getGlobal(),true);
|
||||||
IA64Lowering.restoreGP_SP_RP(BB);
|
IA64Lowering.restoreGP_SP_RP(BB);
|
||||||
}
|
} else
|
||||||
^^^^^^^^^^^^^ we want this code one day XXX */
|
|
||||||
if (ExternalSymbolSDNode *ESSDN =
|
if (ExternalSymbolSDNode *ESSDN =
|
||||||
dyn_cast<ExternalSymbolSDNode>(N.getOperand(1)))
|
dyn_cast<ExternalSymbolSDNode>(N.getOperand(1)))
|
||||||
{ // FIXME : currently need this case for correctness, to avoid
|
{ // FIXME : currently need this case for correctness, to avoid
|
||||||
@ -2169,7 +2166,9 @@ pC = pA OR pB
|
|||||||
.addExternalSymbol(ESSDN->getSymbol(), true);
|
.addExternalSymbol(ESSDN->getSymbol(), true);
|
||||||
IA64Lowering.restoreGP_SP_RP(BB);
|
IA64Lowering.restoreGP_SP_RP(BB);
|
||||||
}
|
}
|
||||||
else {
|
else { // otherwise we need to get the function descriptor
|
||||||
|
// load the branch target (function)'s entry point and
|
||||||
|
// GP, then branch
|
||||||
Tmp1 = SelectExpr(N.getOperand(1));
|
Tmp1 = SelectExpr(N.getOperand(1));
|
||||||
|
|
||||||
unsigned targetEntryPoint=MakeReg(MVT::i64);
|
unsigned targetEntryPoint=MakeReg(MVT::i64);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user