[PATCH] D50800: [ARM] Use correct jump table sizes
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 28 11:55:45 PDT 2018
efriedma added inline comments.
================
Comment at: lib/Target/ARM/ARMConstantIslandPass.cpp:456
if (GenerateTBB && !STI->genExecuteOnly())
MadeChange |= optimizeThumb2JumpTables();
----------------
praffeck wrote:
> efriedma wrote:
> > I wonder if we should rearrange these shrinking checks... or maybe make it a loop. As-is, this patch only shrinks Thumb1 "far" (bl) branches based on jump tables, and not the Thumb2 b.w.
> Yeah, applying these shrinking checks in a loop seems sensible.
>
> Regarding bl vs b.w: Should I include it in this patch? Or would it be better to introduce a separate patch for replacing unnecessary bl and b.w instructions?
We already have ARMConstantIslands::optimizeThumb2Branches to fix b.w branches; it just doesn't run after optimizeThumb2JumpTables, currently.
Repository:
rL LLVM
https://reviews.llvm.org/D50800
More information about the llvm-commits
mailing list