[PATCH] D25615: [Thumb-1] Synthesize TBB/TBH instructions to make use of compressed jump tables

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 14 10:58:55 PDT 2016


rengolin added a comment.

Hi James,

Interesting idea! Though, the change is smaller than I was expecting. :)

I haven't looked in great detail, but here are some nits and questions to get you busy while I look at the rest. :)

cheers,
--renato



================
Comment at: lib/Target/ARM/ARMConstantIslandPass.cpp:1987
 /// jumptables when it's possible.
 bool ARMConstantIslands::optimizeThumb2JumpTables() {
   bool MadeChange = false;
----------------
rename?


================
Comment at: lib/Target/ARM/ARMInstrThumb.td:1318
+
+def tTBH_JT : t2PseudoInst<(outs),
+        (ins tGPR:$base, tGPR:$index, i32imm:$jt, i32imm:$pclbl), 0, IIC_Br, []>,
----------------
Why t2Pseudo?


================
Comment at: test/CodeGen/ARM/jump-table-tbh.ll:29
+; T1-NEXT: LJTI
+; T1-NEXT: .short	(.LBB0_7-([[ANCHOR]]+4))/2
+; T1-NEXT: .short	(.LBB0_4-([[ANCHOR]]+4))/2
----------------
I'm worried about the label naming here... Could it change later on?

The only test you really need here is that the first item is the same as the last. Maybe.


Repository:
  rL LLVM

https://reviews.llvm.org/D25615





More information about the llvm-commits mailing list