[PATCH] D32564: AArch64: compress jump tables to minimum size needed to reach destinations

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 09:39:09 PDT 2017


On 27 April 2017 at 05:51, Joerg Sonnenberger via Phabricator
<reviews at reviews.llvm.org> wrote:
> My primary concern here is that it can make it impossible to hand-patch the resulting assembler. I'm not sure if anyone is doing that, but if I have learned one lesson from pkgsrc development and the set of Linux support patches, it is to expect "yes, someone is really doing" as most likely answer. As such, I would hope for some global option to disable the pass.

I don't think that's a use case we'd want to support. Certainly not
based on speculation.

> About putting the jump table into a separate section: that's kind of what GCC is doing. I don't think a jump table has necessarily only one user, but placing it inside the function still looks helpful. That wouldn't conflict with -ffunction-sections or so either.

Helpful how? It seems like a security risk to me, anything we can get
out of .text is one less potential gadget and the only benefit of
putting it there would be if it allowed us to simplify access somehow,
which I don't think it does.

Cheers.

Tim.


More information about the llvm-commits mailing list