summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitc31eb205c18ab0703b0df49739a1e431ad22386d (patch)
treec7fe588f029057a8273d52fd48dc28d85396beb8 /llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
parente5b40a9112de2bdbb9ac3ab360f0b0a50d06752b (diff)
downloadbcm5719-llvm-c31eb205c18ab0703b0df49739a1e431ad22386d.tar.gz
bcm5719-llvm-c31eb205c18ab0703b0df49739a1e431ad22386d.zip
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. llvm-svn: 54248
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index 8fa0809c1a7..7c90eca3c44 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud