summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
diff options
context:
space:
mode:
authorJonas Hahnfeld <hahnjo@hahnjo.de>2018-06-08 11:17:08 +0000
committerJonas Hahnfeld <hahnjo@hahnjo.de>2018-06-08 11:17:08 +0000
commit3b9cbba9a82bc6755828f2174a235101b16b4380 (patch)
treedcdd250c33df748b9414030b1731f36a33c672d2 /llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
parent1d6254f7e9960bd90a6519face87e6b73c24fa20 (diff)
downloadbcm5719-llvm-3b9cbba9a82bc6755828f2174a235101b16b4380.tar.gz
bcm5719-llvm-3b9cbba9a82bc6755828f2174a235101b16b4380.zip
[CUDA] Fix emission of constant strings in sections
CGM.GetAddrOfConstantCString() sets the adress of the created GlobalValue to unnamed. When emitting the object file LLVM will mark the surrounding section as SHF_MERGE iff the string is nul-terminated and contains no other nuls (see IsNullTerminatedString). This results in problems when saving temporaries because LLVM doesn't set an EntrySize, so reading in the serialized assembly file fails. This never happened for the GPU binaries because they usually contain a nul-character somewhere. Instead this only affected the module ID when compiling relocatable device code. However, this points to a potentially larger problem: If we put a constant string into a named section, we really want the data to end up in that section in the object file. To avoid LLVM merging sections this patch unmarks the GlobalVariable's address as unnamed which also fixes the problem of invalid serialized assembly files when saving temporaries. Differential Revision: https://reviews.llvm.org/D47902 llvm-svn: 334281
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorize.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud