]> granicus.if.org Git - llvm/commit
Add !associated metadata.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 17 Mar 2017 22:17:24 +0000 (22:17 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 17 Mar 2017 22:17:24 +0000 (22:17 +0000)
commitdf808fe21572ca997ddd77a80d189b65742d02ea
tree19ffcc710264f1de5ab2b5e55568131e29af4983
parent87552d6290872a325d51f6137a6121d145ff5ec3
Add !associated metadata.

This is an ELF-specific thing that adds SHF_LINK_ORDER to the global's section
pointing to the metadata argument's section. The effect of that is a reverse dependency
between sections for the linker GC.

!associated does not change the behavior of global-dce. The global
may also need to be added to llvm.compiler.used.

Since SHF_LINK_ORDER is per-section, !associated effectively enables
fdata-sections for the affected globals, the same as comdats do.

Differential Revision: https://reviews.llvm.org/D29104

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298157 91177308-0d34-0410-b5e6-96231b3b80d8
docs/LangRef.rst
include/llvm/IR/LLVMContext.h
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
lib/IR/LLVMContext.cpp
test/CodeGen/X86/elf-associated.ll [new file with mode: 0644]
test/ThinLTO/X86/lazyload_metadata.ll