[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

Chris Lattner clattner at apple.com
Tue Aug 5 09:29:52 PDT 2008


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



More information about the llvm-commits mailing list