[PATCH] Don't build switch lookup tables for dllimport or TLS variables
Hans Wennborg
hans at chromium.org
Thu Jun 19 13:19:07 PDT 2014
Hi rnk, majnemer,
We would previously put dllimport variables in switch lookup tables, which doesn't work because the address cannot be used in a constant initializer. This is basically the same problem that we have in PR19955.
Putting TLS variables in switch tables also desn't work, because the address of such a variable is not constant.
http://reviews.llvm.org/D4220
Files:
include/llvm/IR/Constant.h
lib/IR/Constants.cpp
lib/Transforms/Utils/SimplifyCFG.cpp
test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4220.10655.patch
Type: text/x-patch
Size: 5283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140619/85b7fddc/attachment.bin>
More information about the llvm-commits
mailing list