summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff options
context:
space:
mode:
authorNemanja Ivanovic <nemanjai@ca.ibm.com>2019-11-07 19:31:00 -0600
committerNemanja Ivanovic <nemanjai@ca.ibm.com>2019-11-07 19:33:15 -0600
commit9af28400d6ff59614dad2584f5de03be2e294151 (patch)
treeaa28115c4e70103f6b86302b2dacaea9983d0056 /llvm/lib/Target/PowerPC/PPCISelLowering.cpp
parent7215b7ef530bff896a1da70c6b062e9259f5fde7 (diff)
downloadbcm5719-llvm-9af28400d6ff59614dad2584f5de03be2e294151.tar.gz
bcm5719-llvm-9af28400d6ff59614dad2584f5de03be2e294151.zip
[PowerPC] Option for enabling absolute jumptables with command line
This option allows the user to specify the use of absolute jumptables instead of relative which is the default on most PPC subtargets. Patch by Kamauu Bridgeman Differential revision: https://reviews.llvm.org/D69108
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCISelLowering.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index 87ba74cf860..a2ffe9e3540 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -119,6 +119,9 @@ cl::desc("don't always align innermost loop to 32 bytes on ppc"), cl::Hidden);
static cl::opt<bool> EnableQuadPrecision("enable-ppc-quad-precision",
cl::desc("enable quad precision float support on ppc"), cl::Hidden);
+static cl::opt<bool> UseAbsoluteJumpTables("ppc-use-absolute-jumptables",
+cl::desc("use absolute jump tables on ppc"), cl::Hidden);
+
STATISTIC(NumTailCalls, "Number of tail calls");
STATISTIC(NumSiblingCalls, "Number of sibling calls");
@@ -2744,6 +2747,8 @@ unsigned PPCTargetLowering::getJumpTableEncoding() const {
}
bool PPCTargetLowering::isJumpTableRelative() const {
+ if (UseAbsoluteJumpTables)
+ return false;
if (Subtarget.isPPC64())
return true;
return TargetLowering::isJumpTableRelative();
OpenPOWER on IntegriCloud