[all-commits] [llvm/llvm-project] 392487: [IR] Rename `comdat noduplicates` to `comdat noded...

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Jul 20 12:47:25 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 392487793248f53726d2f9591966dbe42a89a17a
      https://github.com/llvm/llvm-project/commit/392487793248f53726d2f9591966dbe42a89a17a
  Author: Fangrui Song <i at maskray.me>
  Date:   2021-07-20 (Tue, 20 Jul 2021)

  Changed paths:
    M llvm/bindings/go/llvm/ir.go
    M llvm/docs/BitCodeFormat.rst
    M llvm/docs/LangRef.rst
    M llvm/include/llvm-c/Comdat.h
    M llvm/include/llvm/AsmParser/LLToken.h
    M llvm/include/llvm/IR/Comdat.h
    M llvm/lib/AsmParser/LLLexer.cpp
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/lib/IR/AsmWriter.cpp
    M llvm/lib/IR/Comdat.cpp
    M llvm/lib/Linker/LinkModules.cpp
    M llvm/lib/Transforms/IPO/Internalize.cpp
    M llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
    M llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
    M llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
    M llvm/test/Bitcode/compatibility-3.6.ll
    M llvm/test/Bitcode/compatibility-3.7.ll
    M llvm/test/Bitcode/compatibility-3.8.ll
    M llvm/test/Bitcode/compatibility-3.9.ll
    M llvm/test/Bitcode/compatibility-4.0.ll
    M llvm/test/Bitcode/compatibility-5.0.ll
    M llvm/test/Bitcode/compatibility-6.0.ll
    M llvm/test/Bitcode/compatibility.ll
    M llvm/test/CodeGen/X86/coff-comdat.ll
    M llvm/test/CodeGen/X86/elf-group.ll
    M llvm/test/CodeGen/X86/gcc_except_table-multi.ll
    M llvm/test/Instrumentation/AddressSanitizer/global_metadata_windows.ll
    M llvm/test/Instrumentation/InstrProfiling/linkage.ll
    M llvm/test/Instrumentation/SanitizerCoverage/coff-comdat.ll
    M llvm/test/Instrumentation/SanitizerCoverage/inline-bool-flag.ll
    M llvm/test/Instrumentation/SanitizerCoverage/interposable-symbol.ll
    M llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll
    M llvm/test/Linker/Inputs/comdat3.ll
    M llvm/test/Linker/comdat4.ll
    M llvm/test/SymbolRewriter/rewrite.ll
    M llvm/test/Transforms/Internalize/comdat.ll

  Log Message:
  -----------
  [IR] Rename `comdat noduplicates` to `comdat nodeduplicate`

In the textual format, `noduplicates` means no COMDAT/section group
deduplication is performed. Therefore, if both sets of sections are retained, and
they happen to define strong external symbols with the same names,
there will be a duplicate definition linker error.

In PE/COFF, the selection kind lowers to `IMAGE_COMDAT_SELECT_NODUPLICATES`.
The name describes the corollary instead of the immediate semantics.  The name
can cause confusion to other binary formats (ELF, wasm) which have implemented/
want to implement the "no deduplication" selection kind. Rename it to be clearer.

Reviewed By: rnk

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




More information about the All-commits mailing list