llvm-6502/lib
Evan Cheng 66ac53165e Change Thumb2 jumptable codegen to one that uses two level jumps:
Before:
      adr r12, #LJTI3_0_0
      ldr pc, [r12, +r0, lsl #2]
LJTI3_0_0:
      .long    LBB3_24
      .long    LBB3_30
      .long    LBB3_31
      .long    LBB3_32

After:
      adr r12, #LJTI3_0_0
      add pc, r12, +r0, lsl #2
LJTI3_0_0:
      b.w    LBB3_24
      b.w    LBB3_30
      b.w    LBB3_31
      b.w    LBB3_32

This has several advantages.
1. This will make it easier to optimize this to a TBB / TBH instruction +
   (smaller) table.
2. This eliminate the need for ugly asm printer hack to force the address
   into thumb addresses (bit 0 is one).
3. Same codegen for pic and non-pic.
4. This eliminate the need to align the table so constantpool island pass
   won't have to over-estimate the size.

Based on my calculation, the later is probably slightly faster as well since
ldr pc with shifter address is very slow. That is, it should be a win as long
as the HW implementation can do a reasonable job of branch predict the second
branch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77024 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-25 00:33:29 +00:00
..
Analysis More migration to raw_ostream, the water has dried up around the iostream hole. 2009-07-25 00:23:56 +00:00
Archive Fix some non-sensical code. 2009-07-13 05:29:34 +00:00
AsmParser Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come. 2009-07-24 23:12:02 +00:00
Bitcode Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come. 2009-07-24 23:12:02 +00:00
CodeGen More migration to raw_ostream, the water has dried up around the iostream hole. 2009-07-25 00:23:56 +00:00
CompilerDriver Delete the temp dir even when '--temp-dir' is specified. 2009-07-11 19:27:07 +00:00
Debugger Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the 2009-07-01 23:13:44 +00:00
ExecutionEngine More migration to raw_ostream, the water has dried up around the iostream hole. 2009-07-25 00:23:56 +00:00
Linker Switch ValueSymbolTable to StringRef based API. 2009-07-23 18:52:12 +00:00
MC Removed the DumpSymbolsandMacros and LoadSymbolsandMacros MCStreamer API as 2009-07-20 20:25:37 +00:00
Support Allow llvm_report_error to accept a Twine. 2009-07-24 07:58:10 +00:00
System Re-committing r76828 with the JIT memory manager changes now that the build 2009-07-23 21:46:56 +00:00
Target Change Thumb2 jumptable codegen to one that uses two level jumps: 2009-07-25 00:33:29 +00:00
Transforms More migration to raw_ostream, the water has dried up around the iostream hole. 2009-07-25 00:23:56 +00:00
VMCore Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come. 2009-07-24 23:12:02 +00:00
Makefile LLVMC doesn't need ENABLE_PIC to build now. 2009-07-04 03:54:54 +00:00