[PATCH] D94355: [SimplifyCFG] Add relative switch lookup tables

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 30 01:26:24 PST 2021


lebedev.ri added a comment.

In D94355#2531504 <https://reviews.llvm.org/D94355#2531504>, @gulfem wrote:

> In D94355#2530225 <https://reviews.llvm.org/D94355#2530225>, @lebedev.ri wrote:
>
>> Can you please add an explanation to the patch's description as to why
>> we don't want to instead convert non-relative/relative LUT's elsewhere,
>> please.
>
> @mcgrathr gave some explanation to that:
>
>>> Many backends generate PIC-friendly jump tables. This is about generating IR initializers that translate to the same kind of backend assembly expressions as those backends use for their jump tables.
>
> I also want to add to that:
> This task specifically tries make switch-to-lookup tables PIC-friendly, but it does not necessarily try to make all the jump tables PIC-friendly.
> There is also another work going on to generate PIC-friendly vtables.
> Therefore, converting non-relative lookup tables to relative tables elsewhere can be explored as a separate task.

Personally, i read that as non-answer,
because this just reiterates that it can be done elsewhere,
and doesn't answer my question as to why that isn't the path taken.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94355/new/

https://reviews.llvm.org/D94355



More information about the cfe-commits mailing list