IR: Add COMDATs to the IR
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 27 Jun 2014 18:19:56 +0000 (18:19 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 27 Jun 2014 18:19:56 +0000 (18:19 +0000)
commitdad0a645a7b392900c9fb34f11815060d03a2233
tree99d27820893e856b1492d86fb612f2a2d147cc99
parent3260478c10b56f9ee81cc415c962356b1153cd1c
IR: Add COMDATs to the IR

This new IR facility allows us to represent the object-file semantic of
a COMDAT group.

COMDATs allow us to tie together sections and make the inclusion of one
dependent on another. This is required to implement features like MS
ABI VFTables and optimizing away certain kinds of initialization in C++.

This functionality is only representable in COFF and ELF, Mach-O has no
similar mechanism.

Differential Revision: http://reviews.llvm.org/D4178

llvm-svn: 211920
56 files changed:
llvm/docs/LangRef.rst
llvm/include/llvm/ADT/UniqueVector.h
llvm/include/llvm/Bitcode/LLVMBitCodes.h
llvm/include/llvm/IR/Comdat.h [new file with mode: 0644]
llvm/include/llvm/IR/GlobalAlias.h
llvm/include/llvm/IR/GlobalObject.h
llvm/include/llvm/IR/GlobalValue.h
llvm/include/llvm/IR/Module.h
llvm/include/llvm/Linker/Linker.h
llvm/lib/AsmParser/LLLexer.cpp
llvm/lib/AsmParser/LLLexer.h
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/AsmParser/LLParser.h
llvm/lib/AsmParser/LLToken.h
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.h
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
llvm/lib/Bitcode/Writer/ValueEnumerator.h
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/AsmWriter.h
llvm/lib/IR/CMakeLists.txt
llvm/lib/IR/Comdat.cpp [new file with mode: 0644]
llvm/lib/IR/Globals.cpp
llvm/lib/IR/Module.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/Linker/LinkModules.cpp
llvm/lib/Transforms/IPO/GlobalDCE.cpp
llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/test/Assembler/invalid-comdat.ll [new file with mode: 0644]
llvm/test/Assembler/invalid-comdat2.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/coff-comdat.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/coff-comdat.s [new file with mode: 0644]
llvm/test/CodeGen/X86/coff-comdat2.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/coff-comdat3.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/elf-comdat.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/elf-comdat2.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/macho-comdat.ll [new file with mode: 0644]
llvm/test/Feature/comdat.ll [new file with mode: 0644]
llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-llvm-metadata.ll
llvm/test/Linker/Inputs/comdat.ll [new file with mode: 0644]
llvm/test/Linker/Inputs/comdat2.ll [new file with mode: 0644]
llvm/test/Linker/Inputs/comdat3.ll [new file with mode: 0644]
llvm/test/Linker/Inputs/comdat4.ll [new file with mode: 0644]
llvm/test/Linker/Inputs/comdat5.ll [new file with mode: 0644]
llvm/test/Linker/comdat.ll [new file with mode: 0644]
llvm/test/Linker/comdat2.ll [new file with mode: 0644]
llvm/test/Linker/comdat3.ll [new file with mode: 0644]
llvm/test/Linker/comdat4.ll [new file with mode: 0644]
llvm/test/Linker/comdat5.ll [new file with mode: 0644]
llvm/test/Linker/comdat6.ll [new file with mode: 0644]
llvm/test/Linker/comdat7.ll [new file with mode: 0644]
llvm/test/Linker/comdat8.ll [new file with mode: 0644]
llvm/test/Verifier/comdat.ll [new file with mode: 0644]
llvm/test/Verifier/comdat2.ll [new file with mode: 0644]