mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
b24eb8c6c3
Summary: This patch uses the same approach added for inline asm in r285513 to similarly prevent promotion/renaming of locals used or defined in module level asm. All static global values defined in normal IR and used in module level asm should be included on either the llvm.used or llvm.compiler.used global. The former were already being flagged as NoRename in the summary, and I've simply added llvm.compiler.used values to this handling. Module level asm may also contain defs of values. We need to prevent export of any refs to local values defined in module level asm (e.g. a ref in normal IR), since that also requires renaming/promotion of the local. To do that, the summary index builder looks at all values in the module level asm string that are not marked Weak or Global, which is exactly the set of locals that are defined. A summary is created for each of these local defs and flagged as NoRename. This required adding handling to the BitcodeWriter to look at GV declarations to see if they have a summary (rather than skipping them all). Finally, added an assert to IRObjectFile::CollectAsmUndefinedRefs to ensure that an MCAsmParser is available, otherwise the module asm parse would silently fail. Initialized the asm parser in the opt tool for use in testing this fix. Fixes PR30610. Reviewers: mehdi_amini Subscribers: johanengelen, krasin, llvm-commits Differential Revision: https://reviews.llvm.org/D26146 llvm-svn: 286297 |
||
---|---|---|
.. | ||
Inputs | ||
attrs.ll | ||
bcsection.ll | ||
cfi_endproc.ll | ||
current-section.ll | ||
diagnostic-handler-noexit.ll | ||
diagnostic-handler-remarks.ll | ||
disable-verify.ll | ||
invalid.ll | ||
keep-used-puts-during-instcombine.ll | ||
linkonce_odr_func.ll | ||
list-symbols.ll | ||
lit.local.cfg | ||
llvm-lto-output.ll | ||
no-undefined-puts-when-implemented.ll | ||
objc-detection-i386.ll | ||
objc-detection.ll | ||
parallel.ll | ||
pr25919.ll | ||
private-symbol.ll | ||
remangle_intrinsics_tbaa.ll | ||
remangle_intrinsics.ll | ||
restore-externals.ll | ||
runtime-library.ll | ||
set-merged.ll | ||
stdcall.ll | ||
strip-debug-info.ll | ||
symver-asm.ll | ||
triple-init.ll | ||
unnamed.ll |