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

Gulfem Savrun Yeniceri via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 8 18:28:26 PST 2021


gulfem created this revision.
Herald added a subscriber: hiraditya.
gulfem requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

SwitchToLookupTable optimization generates non-PIC-friendly code,
which requires dynamic relocation as described in
https://bugs.llvm.org/show_bug.cgi?id=45244
This patch adds relative switch lookup tables to make
SwitchToLookupTable optimization PIC friendly.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94355

Files:
  llvm/include/llvm/Transforms/Utils/SimplifyCFGOptions.h
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
  llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp
  llvm/lib/Transforms/Utils/SimplifyCFG.cpp
  llvm/test/Transforms/SimplifyCFG/ARM/switch-to-relative-lookup-table.ll
  llvm/test/Transforms/SimplifyCFG/X86/switch_to_relative_lookup_table.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94355.315562.patch
Type: text/x-patch
Size: 23897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210109/b1875b18/attachment.bin>


More information about the llvm-commits mailing list