[llvm] r309921 - Fix the ppc jit tests.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 2 21:52:46 PDT 2017
Author: rafael
Date: Wed Aug 2 21:52:45 2017
New Revision: 309921
URL: http://llvm.org/viewvc/llvm-project?rev=309921&view=rev
Log:
Fix the ppc jit tests.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp?rev=309921&r1=309920&r2=309921&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetMachine.cpp Wed Aug 2 21:52:45 2017
@@ -209,10 +209,11 @@ static Reloc::Model getEffectiveRelocMod
}
static CodeModel::Model getEffectiveCodeModel(const Triple &TT,
- Optional<CodeModel::Model> CM) {
+ Optional<CodeModel::Model> CM,
+ bool JIT) {
if (CM)
return *CM;
- if (!TT.isOSDarwin() &&
+ if (!TT.isOSDarwin() && !JIT &&
(TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le))
return CodeModel::Medium;
return CodeModel::Small;
@@ -231,7 +232,7 @@ PPCTargetMachine::PPCTargetMachine(const
: LLVMTargetMachine(T, getDataLayoutString(TT), TT, CPU,
computeFSAdditions(FS, OL, TT), Options,
getEffectiveRelocModel(TT, RM),
- getEffectiveCodeModel(TT, CM), OL),
+ getEffectiveCodeModel(TT, CM, JIT), OL),
TLOF(createTLOF(getTargetTriple())),
TargetABI(computeTargetABI(TT, Options)) {
initAsmInfo();
More information about the llvm-commits
mailing list