[PATCH] D24462: [ARM] Don't convert switches to lookup tables of pointers with ROPI/RWPI

Oliver Stannard via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 09:14:18 PDT 2016


olista01 created this revision.
olista01 added reviewers: rengolin, srhines, t.p.northover, weimingz.
olista01 added a subscriber: llvm-commits.
olista01 set the repository for this revision to rL LLVM.
Herald added subscribers: samparker, rengolin, aemerson.

With the ROPI and RWPI relocation models we can't always have pointers
to global data or functions in constant data, so don't try to convert
switches into lookup tables if the type of the PHI is a pointer type. We
can still safely emit lookup tables of any non-pointer type.

Repository:
  rL LLVM

https://reviews.llvm.org/D24462

Files:
  include/llvm/Analysis/TargetTransformInfo.h
  include/llvm/Analysis/TargetTransformInfoImpl.h
  lib/Analysis/TargetTransformInfo.cpp
  lib/Target/ARM/ARMTargetTransformInfo.h
  lib/Transforms/Utils/SimplifyCFG.cpp
  test/Transforms/SimplifyCFG/ARM/switch-to-lookup-table.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24462.71018.patch
Type: text/x-patch
Size: 7998 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160912/86245c50/attachment-0001.bin>


More information about the llvm-commits mailing list