[llvm-commits] [llvm] r54248 - in /llvm/trunk: include/llvm/Target/TargetOptions.h lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp lib/Target/PowerPC/PPCISelLowering.cpp lib/Target/PowerPC/PPCTargetMachine.cpp lib/Target/TargetMachine.cpp
Evan Cheng
evan.cheng at apple.com
Tue Aug 5 10:43:20 PDT 2008
That's the plan. But Dale is on something more critical right now.
Implementing it should be extremely simple, it just require some
testing. This is what X86 do:
/// getPICJumpTableEntry - Returns the value of the jumptable entry
for the
/// specific basic block.
intptr_t X86JITInfo::getPICJumpTableEntry(intptr_t BB, intptr_t Entry) {
#if defined(X86_64_JIT)
return BB - Entry;
#else
return BB - PICBase;
#endif
}
Evan
On Aug 5, 2008, at 9:29 AM, Chris Lattner wrote:
>
> On Aug 5, 2008, at 12:19 AM, Evan Cheng wrote:
>
>>> TargetOptions is for things that clients of the code generator set
>>> when they want to affect the behavior of codegen.
>>>
>>> In this case, jump tables are never valid in ppc64 JIT mode. Why
>>> not
>>> just have the PPC backend mark BR_JT and BRIND as illegal when in
>>> 64-
>>> bit jit mode? That way no target-indep code changes.
>>
>> The issue is PPCTargetLowering doesn't know it's in JIT mode.
>> PPCTargetMachine::addCodeEmitter would have to toggle something to
>> let
>> it know. It's not exactly clean either.
>>
>> This is a short term workaround. I suspect teaching PPCJITInfo about
>> PIC jumptable is pretty trivial. Once that's done, this whole thing
>> can be reverted.
>
> Are you guys planning to implement it? If not, this will live on for
> a very long time. I'd strongly prefer teaching PPCTargetLowering that
> it is in JIT mode.
>
> -Chris
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list