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

Gulfem Savrun Yeniceri via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 17:19:52 PST 2021


gulfem marked an inline comment as done.
gulfem added a comment.

>   if (IsRelative)
>     GenRelative
>   else 
>     GenAbsolute
>
> looks pretty ad-hoc, as-if some abstraction is missing.

Based on @hans 's feedback, I added a new enumeration kind called `RelOffsetArrayKind`, and remove `IsRelative` flag.
This separates the `lookup table` and `relative lookup table` IR generation.
Do you think this helps for the abstraction?
I feel like if it might be better if we can generate the relative lookup table in the first place instead of generating it in a separate pass.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94355



More information about the llvm-commits mailing list