summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCTargetMachine.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-07-31 18:13:12 +0000
committerDale Johannesen <dalej@apple.com>2008-07-31 18:13:12 +0000
commit7232464bdaae5e6e48986a1e3b9a95fac7aa7bdf (patch)
tree166cb00f2c381ac43ecabcebe51bcb240fcba217 /lib/Target/PowerPC/PPCTargetMachine.cpp
parent75dcf08243d19a40d2e1cc12057bf9c00ca3df3b (diff)
downloadllvm-7232464bdaae5e6e48986a1e3b9a95fac7aa7bdf.tar.gz
llvm-7232464bdaae5e6e48986a1e3b9a95fac7aa7bdf.tar.bz2
llvm-7232464bdaae5e6e48986a1e3b9a95fac7aa7bdf.tar.xz
Add a flag to disable jump table generation (all
switches use the binary search algorithm) for environments that don't support it. PPC64 JIT is such an environment; turn the flag on for that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--lib/Target/PowerPC/PPCTargetMachine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp
index 8fa0809c1a..7c90eca3c4 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -17,6 +17,7 @@
#include "llvm/Module.h"
#include "llvm/PassManager.h"
#include "llvm/Target/TargetMachineRegistry.h"
+#include "llvm/Target/TargetOptions.h"
using namespace llvm;
// Register the targets
@@ -144,6 +145,9 @@ bool PPCTargetMachine::addCodeEmitter(PassManagerBase &PM, bool Fast,
// instructions to materialize arbitrary global variable + function +
// constant pool addresses.
setRelocationModel(Reloc::PIC_);
+ // Temporary workaround for the inability of PPC64 JIT to handle jump
+ // tables.
+ DisableJumpTables = true;
} else {
setRelocationModel(Reloc::Static);
}