llvm/test
Teresa Johnson 8e04a1bfa5 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286844 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-14 17:12:32 +00:00
..
Analysis [CostModel][X86] Added mul costs for vXi8 vectors 2016-11-14 15:54:24 +00:00
Assembler IR: Introduce inrange attribute on getelementptr indices. 2016-11-10 22:34:55 +00:00
Bindings [OCaml] Adapt to the new attribute C API. 2016-11-12 03:38:30 +00:00
Bitcode IR: Introduce inrange attribute on getelementptr indices. 2016-11-10 22:34:55 +00:00
BugPoint
CodeGen [Hexagon] Remove unsafe load instructions that affect Stack Slot Coloring 2016-11-14 17:11:00 +00:00
DebugInfo Emit the DW_AT_type for a C++ static member definition 2016-11-08 22:11:38 +00:00
Examples
ExecutionEngine Make this test Windows-only (try to placate buildbots). 2016-11-03 16:43:10 +00:00
Feature
FileCheck
Instrumentation [tsan][llvm] Implement the function attribute to disable TSan checking at run time 2016-11-11 23:01:02 +00:00
Integer
JitListener
LibDriver
Linker
LTO Restore "[ThinLTO] Prevent exporting of locals used/defined in module level asm" 2016-11-14 17:12:32 +00:00
MC [AVX-512] Add suffixless aliases for EVEX encoded vcvtsi2ss/vcvtsi2sd/vcvtusi2ss/vcvtusi2sd. This matches the VEX behavior. 2016-11-14 02:46:58 +00:00
Object Add error handling to getEntry. 2016-11-03 18:05:33 +00:00
ObjectYAML
Other Enable Loop Sink pass for functions that has profile. 2016-11-09 00:58:19 +00:00
SymbolRewriter
TableGen
ThinLTO/X86 Restore "[ThinLTO] Prevent exporting of locals used/defined in module level asm" 2016-11-14 17:12:32 +00:00
tools Revert "llvm-strings: support printing the filename" 2016-11-14 13:09:24 +00:00
Transforms [X86][AVX] Fixed v16i16/v32i8 ADD/SUB costs on AVX1 subtargets 2016-11-14 14:45:16 +00:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt [OCaml] Clear cross-target test deps when building out-of-tree 2016-11-12 14:58:30 +00:00
lit.cfg test: synchronise lit substitutions 2016-11-13 19:37:00 +00:00
lit.site.cfg.in
TestRunner.sh