From 04aa46d6473f9d6d52be5e23a976573cd9742f1c Mon Sep 17 00:00:00 2001 From: Duraid Madina Date: Fri, 20 May 2005 11:39:17 +0000 Subject: [PATCH] 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 --- lib/Target/IA64/IA64ISelPattern.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/Target/IA64/IA64ISelPattern.cpp b/lib/Target/IA64/IA64ISelPattern.cpp index 1ea16cce8f4..2e34b36715f 100644 --- a/lib/Target/IA64/IA64ISelPattern.cpp +++ b/lib/Target/IA64/IA64ISelPattern.cpp @@ -2151,16 +2151,13 @@ pC = pA OR pB } } - /* XXX we want to re-enable direct branches! crippling them now - * to stress-test indirect branches.: - //build the right kind of call + // build the right kind of call. if we can branch directly, do so: if (GlobalAddressSDNode *GASD = dyn_cast(N.getOperand(1))) { BuildMI(BB, IA64::BRCALL, 1).addGlobalAddress(GASD->getGlobal(),true); IA64Lowering.restoreGP_SP_RP(BB); - } - ^^^^^^^^^^^^^ we want this code one day XXX */ + } else if (ExternalSymbolSDNode *ESSDN = dyn_cast(N.getOperand(1))) { // FIXME : currently need this case for correctness, to avoid @@ -2169,7 +2166,9 @@ pC = pA OR pB .addExternalSymbol(ESSDN->getSymbol(), true); 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)); unsigned targetEntryPoint=MakeReg(MVT::i64);