llvm-project/llvm/test/LTO/X86
Teresa Johnson 3624bdf60a Restore "[ThinLTO] Prevent exporting of locals used/defined in module level asm"
This restores the rest of r286297 (part was restored in r286475).
Specifically, it restores the part requiring adding a dependency from
the Analysis to Object library (downstream use changed to correctly
model split BitReader vs BitWriter libraries).

Original description of this part of patch follows:

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.

llvm-svn: 286844
2016-11-14 17:12:32 +00:00
..
Inputs Fix auto-upgrade of TBAA tags in Bitcode Reader 2016-09-14 22:29:59 +00:00
attrs.ll
bcsection.ll
cfi_endproc.ll IR: Introduce local_unnamed_addr attribute. 2016-06-14 21:01:22 +00:00
current-section.ll Restore "[ThinLTO] Prevent exporting of locals used/defined in module level asm" 2016-11-14 17:12:32 +00:00
diagnostic-handler-noexit.ll
diagnostic-handler-remarks.ll [LoopVectorize] Don't unconditionally print vectorization diagnostics 2016-04-01 00:34:39 +00:00
disable-verify.ll Refactor the InternalizePass into a helper class, and expose it through a public free function (NFC) 2016-04-13 05:25:08 +00:00
invalid.ll Add writeonly IR attribute 2016-07-04 08:01:29 +00:00
keep-used-puts-during-instcombine.ll
linkonce_odr_func.ll IR: Introduce local_unnamed_addr attribute. 2016-06-14 21:01:22 +00:00
list-symbols.ll
lit.local.cfg
llvm-lto-output.ll
no-undefined-puts-when-implemented.ll
objc-detection-i386.ll Add a libLTO API to query a memory buffer and check if it contains ObjC categories 2016-07-11 23:10:18 +00:00
objc-detection.ll Add a libLTO API to query a memory buffer and check if it contains ObjC categories 2016-07-11 23:10:18 +00:00
parallel.ll
pr25919.ll
private-symbol.ll
remangle_intrinsics.ll Remangle intrinsics names when types are renamed 2016-06-24 15:10:29 +00:00
remangle_intrinsics_tbaa.ll Fix auto-upgrade of TBAA tags in Bitcode Reader 2016-09-14 22:29:59 +00:00
restore-externals.ll
runtime-library.ll
set-merged.ll Revert r265817 2016-04-08 18:15:37 +00:00
stdcall.ll LTO: Use the correct mangler function in LTOCodeGenerator::applyScopeRestrictions(). 2016-10-12 20:12:19 +00:00
strip-debug-info.ll Allow the LTO code generator to strip invalid debug info from the input. 2016-05-09 19:57:15 +00:00
symver-asm.ll
triple-init.ll
unnamed.ll LTO: Don't bother trying to mangle unnamed globals, as they can't be preserved with MustPreserveSymbols. 2016-04-27 23:48:11 +00:00