[llvm] 3924877 - [IR] Rename `comdat noduplicates` to `comdat nodeduplicate`
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 20 12:47:16 PDT 2021
Author: Fangrui Song
Date: 2021-07-20T12:47:10-07:00
New Revision: 392487793248f53726d2f9591966dbe42a89a17a
URL: https://github.com/llvm/llvm-project/commit/392487793248f53726d2f9591966dbe42a89a17a
DIFF: https://github.com/llvm/llvm-project/commit/392487793248f53726d2f9591966dbe42a89a17a.diff
LOG: [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
Added:
Modified:
llvm/bindings/go/llvm/ir.go
llvm/docs/BitCodeFormat.rst
llvm/docs/LangRef.rst
llvm/include/llvm-c/Comdat.h
llvm/include/llvm/AsmParser/LLToken.h
llvm/include/llvm/IR/Comdat.h
llvm/lib/AsmParser/LLLexer.cpp
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/Comdat.cpp
llvm/lib/Linker/LinkModules.cpp
llvm/lib/Transforms/IPO/Internalize.cpp
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
llvm/test/Bitcode/compatibility-3.6.ll
llvm/test/Bitcode/compatibility-3.7.ll
llvm/test/Bitcode/compatibility-3.8.ll
llvm/test/Bitcode/compatibility-3.9.ll
llvm/test/Bitcode/compatibility-4.0.ll
llvm/test/Bitcode/compatibility-5.0.ll
llvm/test/Bitcode/compatibility-6.0.ll
llvm/test/Bitcode/compatibility.ll
llvm/test/CodeGen/X86/coff-comdat.ll
llvm/test/CodeGen/X86/elf-group.ll
llvm/test/CodeGen/X86/gcc_except_table-multi.ll
llvm/test/Instrumentation/AddressSanitizer/global_metadata_windows.ll
llvm/test/Instrumentation/InstrProfiling/linkage.ll
llvm/test/Instrumentation/SanitizerCoverage/coff-comdat.ll
llvm/test/Instrumentation/SanitizerCoverage/inline-bool-flag.ll
llvm/test/Instrumentation/SanitizerCoverage/interposable-symbol.ll
llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll
llvm/test/Linker/Inputs/comdat3.ll
llvm/test/Linker/comdat4.ll
llvm/test/SymbolRewriter/rewrite.ll
llvm/test/Transforms/Internalize/comdat.ll
Removed:
################################################################################
diff --git a/llvm/bindings/go/llvm/ir.go b/llvm/bindings/go/llvm/ir.go
index 77213eeef46cc..c5060811dd479 100644
--- a/llvm/bindings/go/llvm/ir.go
+++ b/llvm/bindings/go/llvm/ir.go
@@ -290,7 +290,7 @@ const (
AnyComdatSelectionKind ComdatSelectionKind = C.LLVMAnyComdatSelectionKind
ExactMatchComdatSelectionKind ComdatSelectionKind = C.LLVMExactMatchComdatSelectionKind
LargestComdatSelectionKind ComdatSelectionKind = C.LLVMLargestComdatSelectionKind
- NoDuplicatesComdatSelectionKind ComdatSelectionKind = C.LLVMNoDuplicatesComdatSelectionKind
+ NoDeduplicateComdatSelectionKind ComdatSelectionKind = C.LLVMNoDeduplicateComdatSelectionKind
SameSizeComdatSelectionKind ComdatSelectionKind = C.LLVMSameSizeComdatSelectionKind
)
diff --git a/llvm/docs/BitCodeFormat.rst b/llvm/docs/BitCodeFormat.rst
index 830b63f57d7b3..0db2dd12e8b7f 100644
--- a/llvm/docs/BitCodeFormat.rst
+++ b/llvm/docs/BitCodeFormat.rst
@@ -1013,7 +1013,7 @@ The integer codes are mapped to well-known attributes as follows.
* code 9: ``noalias``
* code 10: ``nobuiltin``
* code 11: ``nocapture``
-* code 12: ``noduplicates``
+* code 12: ``nodeduplicate``
* code 13: ``noimplicitfloat``
* code 14: ``noinline``
* code 15: ``nonlazybind``
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index d5303b56247a4..9996568e4d8fb 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -938,8 +938,8 @@ The selection kind must be one of the following:
same data.
``largest``
The linker will choose the section containing the largest COMDAT key.
-``noduplicates``
- The linker requires that only section with this COMDAT key exist.
+``nodeduplicate``
+ No deduplication is performed.
``samesize``
The linker may choose any COMDAT key but the sections must contain the
same amount of data.
diff --git a/llvm/include/llvm-c/Comdat.h b/llvm/include/llvm-c/Comdat.h
index 45b4007695fdc..81cde1107fa45 100644
--- a/llvm/include/llvm-c/Comdat.h
+++ b/llvm/include/llvm-c/Comdat.h
@@ -25,8 +25,7 @@ typedef enum {
///< be the same.
LLVMLargestComdatSelectionKind, ///< The linker will choose the largest
///< COMDAT.
- LLVMNoDuplicatesComdatSelectionKind, ///< No other Module may specify this
- ///< COMDAT.
+ LLVMNoDeduplicateComdatSelectionKind, ///< No deduplication is performed.
LLVMSameSizeComdatSelectionKind ///< The data referenced by the COMDAT must be
///< the same size.
} LLVMComdatSelectionKind;
diff --git a/llvm/include/llvm/AsmParser/LLToken.h b/llvm/include/llvm/AsmParser/LLToken.h
index 50cad74d6974a..aa49c68fe9246 100644
--- a/llvm/include/llvm/AsmParser/LLToken.h
+++ b/llvm/include/llvm/AsmParser/LLToken.h
@@ -261,7 +261,7 @@ enum Kind {
kw_any,
kw_exactmatch,
kw_largest,
- kw_noduplicates,
+ kw_nodeduplicate,
kw_samesize,
kw_eq,
diff --git a/llvm/include/llvm/IR/Comdat.h b/llvm/include/llvm/IR/Comdat.h
index f712a16dd318e..01a047d36455c 100644
--- a/llvm/include/llvm/IR/Comdat.h
+++ b/llvm/include/llvm/IR/Comdat.h
@@ -31,11 +31,11 @@ template <typename ValueTy> class StringMapEntry;
class Comdat {
public:
enum SelectionKind {
- Any, ///< The linker may choose any COMDAT.
- ExactMatch, ///< The data referenced by the COMDAT must be the same.
- Largest, ///< The linker will choose the largest COMDAT.
- NoDuplicates, ///< No other Module may specify this COMDAT.
- SameSize, ///< The data referenced by the COMDAT must be the same size.
+ Any, ///< The linker may choose any COMDAT.
+ ExactMatch, ///< The data referenced by the COMDAT must be the same.
+ Largest, ///< The linker will choose the largest COMDAT.
+ NoDeduplicate, ///< No deduplication is performed.
+ SameSize, ///< The data referenced by the COMDAT must be the same size.
};
Comdat(const Comdat &) = delete;
diff --git a/llvm/lib/AsmParser/LLLexer.cpp b/llvm/lib/AsmParser/LLLexer.cpp
index b062fb81fc8f6..4f72c6f9921a9 100644
--- a/llvm/lib/AsmParser/LLLexer.cpp
+++ b/llvm/lib/AsmParser/LLLexer.cpp
@@ -717,7 +717,7 @@ lltok::Kind LLLexer::LexIdentifier() {
KEYWORD(any);
KEYWORD(exactmatch);
KEYWORD(largest);
- KEYWORD(noduplicates);
+ KEYWORD(nodeduplicate);
KEYWORD(samesize);
KEYWORD(eq); KEYWORD(ne); KEYWORD(slt); KEYWORD(sgt); KEYWORD(sle);
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 1b83d220109c7..799cb03c8c8c5 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -668,8 +668,8 @@ bool LLParser::parseComdat() {
case lltok::kw_largest:
SK = Comdat::Largest;
break;
- case lltok::kw_noduplicates:
- SK = Comdat::NoDuplicates;
+ case lltok::kw_nodeduplicate:
+ SK = Comdat::NoDeduplicate;
break;
case lltok::kw_samesize:
SK = Comdat::SameSize;
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index e16779270e156..d5e366c21f7de 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -1128,7 +1128,7 @@ static Comdat::SelectionKind getDecodedComdatSelectionKind(unsigned Val) {
case bitc::COMDAT_SELECTION_KIND_LARGEST:
return Comdat::Largest;
case bitc::COMDAT_SELECTION_KIND_NO_DUPLICATES:
- return Comdat::NoDuplicates;
+ return Comdat::NoDeduplicate;
case bitc::COMDAT_SELECTION_KIND_SAME_SIZE:
return Comdat::SameSize;
}
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index da3158bcdfa48..0a202c376981a 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1132,7 +1132,7 @@ static unsigned getEncodedComdatSelectionKind(const Comdat &C) {
return bitc::COMDAT_SELECTION_KIND_EXACT_MATCH;
case Comdat::Largest:
return bitc::COMDAT_SELECTION_KIND_LARGEST;
- case Comdat::NoDuplicates:
+ case Comdat::NoDeduplicate:
return bitc::COMDAT_SELECTION_KIND_NO_DUPLICATES;
case Comdat::SameSize:
return bitc::COMDAT_SELECTION_KIND_SAME_SIZE;
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 56fdbc13a2bbf..8d8838f81c7ab 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -532,10 +532,10 @@ static const Comdat *getELFComdat(const GlobalValue *GV) {
return nullptr;
if (C->getSelectionKind() != Comdat::Any &&
- C->getSelectionKind() != Comdat::NoDuplicates)
+ C->getSelectionKind() != Comdat::NoDeduplicate)
report_fatal_error("ELF COMDATs only support SelectionKind::Any and "
- "SelectionKind::NoDuplicates, '" + C->getName() +
- "' cannot be lowered.");
+ "SelectionKind::NoDeduplicate, '" +
+ C->getName() + "' cannot be lowered.");
return C;
}
@@ -1571,7 +1571,7 @@ static int getSelectionForCOFF(const GlobalValue *GV) {
return COFF::IMAGE_COMDAT_SELECT_EXACT_MATCH;
case Comdat::Largest:
return COFF::IMAGE_COMDAT_SELECT_LARGEST;
- case Comdat::NoDuplicates:
+ case Comdat::NoDeduplicate:
return COFF::IMAGE_COMDAT_SELECT_NODUPLICATES;
case Comdat::SameSize:
return COFF::IMAGE_COMDAT_SELECT_SAME_SIZE;
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index ea860338e253c..5adc24e84b005 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -4554,8 +4554,8 @@ void Comdat::print(raw_ostream &ROS, bool /*IsForDebug*/) const {
case Comdat::Largest:
ROS << "largest";
break;
- case Comdat::NoDuplicates:
- ROS << "noduplicates";
+ case Comdat::NoDeduplicate:
+ ROS << "nodeduplicate";
break;
case Comdat::SameSize:
ROS << "samesize";
diff --git a/llvm/lib/IR/Comdat.cpp b/llvm/lib/IR/Comdat.cpp
index c9f715daf4573..1a5d38d17bc0d 100644
--- a/llvm/lib/IR/Comdat.cpp
+++ b/llvm/lib/IR/Comdat.cpp
@@ -47,8 +47,8 @@ LLVMComdatSelectionKind LLVMGetComdatSelectionKind(LLVMComdatRef C) {
return LLVMExactMatchComdatSelectionKind;
case Comdat::Largest:
return LLVMLargestComdatSelectionKind;
- case Comdat::NoDuplicates:
- return LLVMNoDuplicatesComdatSelectionKind;
+ case Comdat::NoDeduplicate:
+ return LLVMNoDeduplicateComdatSelectionKind;
case Comdat::SameSize:
return LLVMSameSizeComdatSelectionKind;
}
@@ -67,8 +67,8 @@ void LLVMSetComdatSelectionKind(LLVMComdatRef C, LLVMComdatSelectionKind kind) {
case LLVMLargestComdatSelectionKind:
Cd->setSelectionKind(Comdat::Largest);
break;
- case LLVMNoDuplicatesComdatSelectionKind:
- Cd->setSelectionKind(Comdat::NoDuplicates);
+ case LLVMNoDeduplicateComdatSelectionKind:
+ Cd->setSelectionKind(Comdat::NoDeduplicate);
break;
case LLVMSameSizeComdatSelectionKind:
Cd->setSelectionKind(Comdat::SameSize);
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 943c2faaf1b11..97d6f8cd80755 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -177,9 +177,9 @@ bool ModuleLinker::computeResultingSelectionKind(StringRef ComdatName,
// Go with Dst.
LinkFromSrc = false;
break;
- case Comdat::SelectionKind::NoDuplicates:
+ case Comdat::SelectionKind::NoDeduplicate:
return emitError("Linking COMDATs named '" + ComdatName +
- "': noduplicates has been violated!");
+ "': nodeduplicate has been violated!");
case Comdat::SelectionKind::ExactMatch:
case Comdat::SelectionKind::Largest:
case Comdat::SelectionKind::SameSize: {
diff --git a/llvm/lib/Transforms/IPO/Internalize.cpp b/llvm/lib/Transforms/IPO/Internalize.cpp
index cf8da0baebe41..db3b4384ce67b 100644
--- a/llvm/lib/Transforms/IPO/Internalize.cpp
+++ b/llvm/lib/Transforms/IPO/Internalize.cpp
@@ -131,14 +131,14 @@ bool InternalizePass::maybeInternalize(
// If a comdat with one member is not externally visible, we can drop it.
// Otherwise, the comdat can be used to establish dependencies among the
// group of sections. Thus we have to keep the comdat but switch it to
- // noduplicates.
- // Note: noduplicates is not necessary for COFF. wasm doesn't support
- // noduplicates.
+ // nodeduplicate.
+ // Note: nodeduplicate is not necessary for COFF. wasm doesn't support
+ // nodeduplicate.
ComdatInfo &Info = ComdatMap.find(C)->second;
if (Info.Size == 1)
GO->setComdat(nullptr);
else if (!IsWasm)
- C->setSelectionKind(Comdat::NoDuplicates);
+ C->setSelectionKind(Comdat::NoDeduplicate);
}
if (GV.hasLocalLinkage())
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index aab2fa29053ca..c2ddba469dea6 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -1919,7 +1919,7 @@ bool ModuleAddressSanitizer::shouldInstrumentGlobal(GlobalVariable *G) const {
switch (C->getSelectionKind()) {
case Comdat::Any:
case Comdat::ExactMatch:
- case Comdat::NoDuplicates:
+ case Comdat::NoDeduplicate:
break;
case Comdat::Largest:
case Comdat::SameSize:
@@ -2106,7 +2106,7 @@ void ModuleAddressSanitizer::SetComdatForGlobalMetadata(
// linkage to internal linkage so that a symbol table entry is emitted. This
// is necessary in order to create the comdat group.
if (TargetTriple.isOSBinFormatCOFF()) {
- C->setSelectionKind(Comdat::NoDuplicates);
+ C->setSelectionKind(Comdat::NoDeduplicate);
if (G->hasPrivateLinkage())
G->setLinkage(GlobalValue::InternalLinkage);
}
diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
index fe15d5f5263b3..0d257bb6bd527 100644
--- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
@@ -862,7 +862,7 @@ InstrProfiling::getOrCreateRegionCounters(InstrProfIncrementInst *Inc) {
// same name marked IMAGE_COMDAT_SELECT_ASSOCIATIVE.
//
// For ELF, when not using COMDAT, put counters, data and values into a
- // noduplicates COMDAT which is lowered to a zero-flag section group. This
+ // nodeduplicate COMDAT which is lowered to a zero-flag section group. This
// allows -z start-stop-gc to discard the entire group when the function is
// discarded.
bool DataReferencedByCode = profDataReferencedByCode(*M);
@@ -877,7 +877,7 @@ InstrProfiling::getOrCreateRegionCounters(InstrProfIncrementInst *Inc) {
: CntsVarName;
Comdat *C = M->getOrInsertComdat(GroupName);
if (!NeedComdat)
- C->setSelectionKind(Comdat::NoDuplicates);
+ C->setSelectionKind(Comdat::NoDeduplicate);
GV->setComdat(C);
}
};
diff --git a/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp b/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
index 1fe1e3d1abee8..dda2424923911 100644
--- a/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
+++ b/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
@@ -83,7 +83,7 @@ Comdat *llvm::getOrCreateFunctionComdat(Function &F, Triple &T) {
// symbols.
Comdat *C = M->getOrInsertComdat(F.getName());
if (T.isOSBinFormatELF() || (T.isOSBinFormatCOFF() && !F.isWeakForLinker()))
- C->setSelectionKind(Comdat::NoDuplicates);
+ C->setSelectionKind(Comdat::NoDeduplicate);
F.setComdat(C);
return C;
}
diff --git a/llvm/test/Bitcode/compatibility-3.6.ll b/llvm/test/Bitcode/compatibility-3.6.ll
index 882f0416e8936..a69db5d95fa3a 100644
--- a/llvm/test/Bitcode/compatibility-3.6.ll
+++ b/llvm/test/Bitcode/compatibility-3.6.ll
@@ -23,8 +23,8 @@ $comdat.exactmatch = comdat exactmatch
; CHECK: $comdat.exactmatch = comdat exactmatch
$comdat.largest = comdat largest
; CHECK: $comdat.largest = comdat largest
-$comdat.noduplicates = comdat noduplicates
-; CHECK: $comdat.noduplicates = comdat noduplicates
+$comdat.noduplicates = comdat nodeduplicate
+; CHECK: $comdat.noduplicates = comdat nodeduplicate
$comdat.samesize = comdat samesize
; CHECK: $comdat.samesize = comdat samesize
diff --git a/llvm/test/Bitcode/compatibility-3.7.ll b/llvm/test/Bitcode/compatibility-3.7.ll
index 65dae1b6a7553..3f3cf29389cf1 100644
--- a/llvm/test/Bitcode/compatibility-3.7.ll
+++ b/llvm/test/Bitcode/compatibility-3.7.ll
@@ -23,8 +23,8 @@ $comdat.exactmatch = comdat exactmatch
; CHECK: $comdat.exactmatch = comdat exactmatch
$comdat.largest = comdat largest
; CHECK: $comdat.largest = comdat largest
-$comdat.noduplicates = comdat noduplicates
-; CHECK: $comdat.noduplicates = comdat noduplicates
+$comdat.noduplicates = comdat nodeduplicate
+; CHECK: $comdat.noduplicates = comdat nodeduplicate
$comdat.samesize = comdat samesize
; CHECK: $comdat.samesize = comdat samesize
diff --git a/llvm/test/Bitcode/compatibility-3.8.ll b/llvm/test/Bitcode/compatibility-3.8.ll
index 51b4740ea42e3..bb25cf35016d3 100644
--- a/llvm/test/Bitcode/compatibility-3.8.ll
+++ b/llvm/test/Bitcode/compatibility-3.8.ll
@@ -22,8 +22,8 @@ $comdat.exactmatch = comdat exactmatch
; CHECK: $comdat.exactmatch = comdat exactmatch
$comdat.largest = comdat largest
; CHECK: $comdat.largest = comdat largest
-$comdat.noduplicates = comdat noduplicates
-; CHECK: $comdat.noduplicates = comdat noduplicates
+$comdat.noduplicates = comdat nodeduplicate
+; CHECK: $comdat.noduplicates = comdat nodeduplicate
$comdat.samesize = comdat samesize
; CHECK: $comdat.samesize = comdat samesize
diff --git a/llvm/test/Bitcode/compatibility-3.9.ll b/llvm/test/Bitcode/compatibility-3.9.ll
index e203e5144c28c..6c0d827f80625 100644
--- a/llvm/test/Bitcode/compatibility-3.9.ll
+++ b/llvm/test/Bitcode/compatibility-3.9.ll
@@ -22,8 +22,8 @@ $comdat.exactmatch = comdat exactmatch
; CHECK: $comdat.exactmatch = comdat exactmatch
$comdat.largest = comdat largest
; CHECK: $comdat.largest = comdat largest
-$comdat.noduplicates = comdat noduplicates
-; CHECK: $comdat.noduplicates = comdat noduplicates
+$comdat.noduplicates = comdat nodeduplicate
+; CHECK: $comdat.noduplicates = comdat nodeduplicate
$comdat.samesize = comdat samesize
; CHECK: $comdat.samesize = comdat samesize
diff --git a/llvm/test/Bitcode/compatibility-4.0.ll b/llvm/test/Bitcode/compatibility-4.0.ll
index b0b65fe75da81..c17ece7f5c899 100644
--- a/llvm/test/Bitcode/compatibility-4.0.ll
+++ b/llvm/test/Bitcode/compatibility-4.0.ll
@@ -22,8 +22,8 @@ $comdat.exactmatch = comdat exactmatch
; CHECK: $comdat.exactmatch = comdat exactmatch
$comdat.largest = comdat largest
; CHECK: $comdat.largest = comdat largest
-$comdat.noduplicates = comdat noduplicates
-; CHECK: $comdat.noduplicates = comdat noduplicates
+$comdat.noduplicates = comdat nodeduplicate
+; CHECK: $comdat.noduplicates = comdat nodeduplicate
$comdat.samesize = comdat samesize
; CHECK: $comdat.samesize = comdat samesize
diff --git a/llvm/test/Bitcode/compatibility-5.0.ll b/llvm/test/Bitcode/compatibility-5.0.ll
index 93916d9ff8902..6da717f053971 100644
--- a/llvm/test/Bitcode/compatibility-5.0.ll
+++ b/llvm/test/Bitcode/compatibility-5.0.ll
@@ -22,8 +22,8 @@ $comdat.exactmatch = comdat exactmatch
; CHECK: $comdat.exactmatch = comdat exactmatch
$comdat.largest = comdat largest
; CHECK: $comdat.largest = comdat largest
-$comdat.noduplicates = comdat noduplicates
-; CHECK: $comdat.noduplicates = comdat noduplicates
+$comdat.noduplicates = comdat nodeduplicate
+; CHECK: $comdat.noduplicates = comdat nodeduplicate
$comdat.samesize = comdat samesize
; CHECK: $comdat.samesize = comdat samesize
diff --git a/llvm/test/Bitcode/compatibility-6.0.ll b/llvm/test/Bitcode/compatibility-6.0.ll
index bd5dfd3457928..467b75abd5a89 100644
--- a/llvm/test/Bitcode/compatibility-6.0.ll
+++ b/llvm/test/Bitcode/compatibility-6.0.ll
@@ -23,8 +23,8 @@ $comdat.exactmatch = comdat exactmatch
; CHECK: $comdat.exactmatch = comdat exactmatch
$comdat.largest = comdat largest
; CHECK: $comdat.largest = comdat largest
-$comdat.noduplicates = comdat noduplicates
-; CHECK: $comdat.noduplicates = comdat noduplicates
+$comdat.noduplicates = comdat nodeduplicate
+; CHECK: $comdat.noduplicates = comdat nodeduplicate
$comdat.samesize = comdat samesize
; CHECK: $comdat.samesize = comdat samesize
diff --git a/llvm/test/Bitcode/compatibility.ll b/llvm/test/Bitcode/compatibility.ll
index d55c558f5d267..c2bfb3a3523d3 100644
--- a/llvm/test/Bitcode/compatibility.ll
+++ b/llvm/test/Bitcode/compatibility.ll
@@ -25,8 +25,8 @@ $comdat.exactmatch = comdat exactmatch
; CHECK: $comdat.exactmatch = comdat exactmatch
$comdat.largest = comdat largest
; CHECK: $comdat.largest = comdat largest
-$comdat.noduplicates = comdat noduplicates
-; CHECK: $comdat.noduplicates = comdat noduplicates
+$comdat.noduplicates = comdat nodeduplicate
+; CHECK: $comdat.noduplicates = comdat nodeduplicate
$comdat.samesize = comdat samesize
; CHECK: $comdat.samesize = comdat samesize
diff --git a/llvm/test/CodeGen/X86/coff-comdat.ll b/llvm/test/CodeGen/X86/coff-comdat.ll
index d1fe27ac81175..99e1d105c8629 100644
--- a/llvm/test/CodeGen/X86/coff-comdat.ll
+++ b/llvm/test/CodeGen/X86/coff-comdat.ll
@@ -18,7 +18,7 @@ define void @f3() comdat($f3) {
ret void
}
-$f4 = comdat noduplicates
+$f4 = comdat nodeduplicate
@v4 = global i32 0, comdat($f4)
define void @f4() comdat($f4) {
ret void
diff --git a/llvm/test/CodeGen/X86/elf-group.ll b/llvm/test/CodeGen/X86/elf-group.ll
index 79fa41e5ba8f1..3aaef0fa49da1 100644
--- a/llvm/test/CodeGen/X86/elf-group.ll
+++ b/llvm/test/CodeGen/X86/elf-group.ll
@@ -1,4 +1,4 @@
-; Checks that comdat with noduplicates kind is lowered to a zero-flag ELF
+; Checks that comdat with nodeduplicate kind is lowered to a zero-flag ELF
; section group.
; RUN: llc < %s -mtriple=x86_64-unknown-linux | FileCheck %s
@@ -6,7 +6,7 @@
; CHECK: .section .text.f2,"axG", at progbits,f1{{$}}
; CHECK: .section .bss.g1,"aGw", at nobits,f1{{$}}
-$f1 = comdat noduplicates
+$f1 = comdat nodeduplicate
define void @f1() comdat {
unreachable
diff --git a/llvm/test/CodeGen/X86/gcc_except_table-multi.ll b/llvm/test/CodeGen/X86/gcc_except_table-multi.ll
index 962050f7a6e67..91390b50187e9 100644
--- a/llvm/test/CodeGen/X86/gcc_except_table-multi.ll
+++ b/llvm/test/CodeGen/X86/gcc_except_table-multi.ll
@@ -53,9 +53,9 @@ eh.resume:
resume { i8*, i32 } %0
}
-;; If the function is in a comdat group with noduplicates kind, the generated
+;; If the function is in a comdat group with nodeduplicate kind, the generated
;; .gcc_except_table should is lowered to a zero-flag ELF section group.
-$zero = comdat noduplicates
+$zero = comdat nodeduplicate
define i32 @zero() uwtable comdat personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
; CHECK-LABEL: zero:
; CHECK: .cfi_endproc
diff --git a/llvm/test/Instrumentation/AddressSanitizer/global_metadata_windows.ll b/llvm/test/Instrumentation/AddressSanitizer/global_metadata_windows.ll
index 87329f939f4e4..026114380743e 100644
--- a/llvm/test/Instrumentation/AddressSanitizer/global_metadata_windows.ll
+++ b/llvm/test/Instrumentation/AddressSanitizer/global_metadata_windows.ll
@@ -12,8 +12,8 @@ target triple = "x86_64-pc-windows-msvc19.0.24215"
$mystr = comdat any
-; CHECK: $dead_global = comdat noduplicates
-; CHECK: $private_str = comdat noduplicates
+; CHECK: $dead_global = comdat nodeduplicate
+; CHECK: $private_str = comdat nodeduplicate
; CHECK: @dead_global = global { i32, [28 x i8] } { i32 42, [28 x i8] zeroinitializer }, comdat, align 32
; CHECK: @private_str = internal constant { [8 x i8], [24 x i8] } { [8 x i8] c"private\00", [24 x i8] zeroinitializer }, comdat, align 32
diff --git a/llvm/test/Instrumentation/InstrProfiling/linkage.ll b/llvm/test/Instrumentation/InstrProfiling/linkage.ll
index b6e3eac402680..bb381afeafbd2 100644
--- a/llvm/test/Instrumentation/InstrProfiling/linkage.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/linkage.ll
@@ -12,10 +12,10 @@
; MACHO: @__llvm_profile_runtime = external global i32
; ELF-NOT: @__llvm_profile_runtime = external global i32
-; ELF: $__profc_foo = comdat noduplicates
-; ELF: $__profc_foo_weak = comdat noduplicates
-; ELF: $"__profc_linkage.ll:foo_internal" = comdat noduplicates
-; ELF: $__profc_foo_inline = comdat noduplicates
+; ELF: $__profc_foo = comdat nodeduplicate
+; ELF: $__profc_foo_weak = comdat nodeduplicate
+; ELF: $"__profc_linkage.ll:foo_internal" = comdat nodeduplicate
+; ELF: $__profc_foo_inline = comdat nodeduplicate
; ELF: $__profc_foo_extern = comdat any
@__profn_foo = private constant [3 x i8] c"foo"
diff --git a/llvm/test/Instrumentation/SanitizerCoverage/coff-comdat.ll b/llvm/test/Instrumentation/SanitizerCoverage/coff-comdat.ll
index b104796a2ebba..c637b853861f2 100644
--- a/llvm/test/Instrumentation/SanitizerCoverage/coff-comdat.ll
+++ b/llvm/test/Instrumentation/SanitizerCoverage/coff-comdat.ll
@@ -20,8 +20,8 @@
; Both new comdats should no duplicates on COFF.
-; CHECK: $foo = comdat noduplicates
-; CHECK: $bar = comdat noduplicates
+; CHECK: $foo = comdat nodeduplicate
+; CHECK: $bar = comdat nodeduplicate
; Tables for 'foo' should be in the 'foo' comdat.
diff --git a/llvm/test/Instrumentation/SanitizerCoverage/inline-bool-flag.ll b/llvm/test/Instrumentation/SanitizerCoverage/inline-bool-flag.ll
index 48a4c60d98b2b..42951f1f09c0a 100644
--- a/llvm/test/Instrumentation/SanitizerCoverage/inline-bool-flag.ll
+++ b/llvm/test/Instrumentation/SanitizerCoverage/inline-bool-flag.ll
@@ -2,7 +2,7 @@
; RUN: opt < %s -sancov -sanitizer-coverage-level=1 -sanitizer-coverage-inline-bool-flag=1 -S -enable-new-pm=0 | FileCheck %s
; RUN: opt < %s -passes='module(sancov-module)' -sanitizer-coverage-level=1 -sanitizer-coverage-inline-bool-flag=1 -S | FileCheck %s
-; CHECK: $foo = comdat noduplicates
+; CHECK: $foo = comdat nodeduplicate
; CHECK: @__sancov_gen_ = private global [1 x i1] zeroinitializer, section "__sancov_bools", comdat($foo), align 1{{$}}
; CHECK: @__start___sancov_bools = extern_weak hidden global i1
; CHECK-NEXT: @__stop___sancov_bools = extern_weak hidden global i1
diff --git a/llvm/test/Instrumentation/SanitizerCoverage/interposable-symbol.ll b/llvm/test/Instrumentation/SanitizerCoverage/interposable-symbol.ll
index ba528873d2813..4e47652ae8cb1 100644
--- a/llvm/test/Instrumentation/SanitizerCoverage/interposable-symbol.ll
+++ b/llvm/test/Instrumentation/SanitizerCoverage/interposable-symbol.ll
@@ -31,8 +31,8 @@ entry:
ret void
}
-; CHECK: $Vanilla = comdat noduplicates
-; ELF: $LinkOnceOdr = comdat noduplicates
+; CHECK: $Vanilla = comdat nodeduplicate
+; ELF: $LinkOnceOdr = comdat nodeduplicate
; COFF: $LinkOnceOdr = comdat any
; CHECK: @__sancov_gen_ = private global [1 x i32] zeroinitializer, section {{.*}}, comdat($Vanilla), align 4{{$}}
; CHECK-NEXT: @__sancov_gen_.1 = private global [1 x i32] zeroinitializer, section {{.*}}, align 4{{$}}
diff --git a/llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll b/llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll
index 4e21374794f59..5df7f31c91faf 100644
--- a/llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll
+++ b/llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll
@@ -6,8 +6,8 @@
; RUN: opt < %s -passes='module(sancov-module)' -sanitizer-coverage-level=4 -sanitizer-coverage-trace-pc-guard -mtriple=x86_64-windows -S | FileCheck %s --check-prefixes=CHECK,COMDAT,WIN
-; COMDAT: $foo = comdat noduplicates
-; COMDAT: $CallViaVptr = comdat noduplicates
+; COMDAT: $foo = comdat nodeduplicate
+; COMDAT: $CallViaVptr = comdat nodeduplicate
; ELF: @__sancov_gen_ = private global [3 x i32] zeroinitializer, section "__sancov_guards", comdat($foo), align 4{{$}}
; ELF-NEXT: @__sancov_gen_.1 = private global [1 x i32] zeroinitializer, section "__sancov_guards", comdat($CallViaVptr), align 4{{$}}
diff --git a/llvm/test/Linker/Inputs/comdat3.ll b/llvm/test/Linker/Inputs/comdat3.ll
index a1b730f216f74..db066c2591f45 100644
--- a/llvm/test/Linker/Inputs/comdat3.ll
+++ b/llvm/test/Linker/Inputs/comdat3.ll
@@ -1,2 +1,2 @@
-$foo = comdat noduplicates
+$foo = comdat nodeduplicate
@foo = global i64 43, comdat($foo)
diff --git a/llvm/test/Linker/comdat4.ll b/llvm/test/Linker/comdat4.ll
index cf7ac5f5d0dd9..c0af43a516b51 100644
--- a/llvm/test/Linker/comdat4.ll
+++ b/llvm/test/Linker/comdat4.ll
@@ -1,5 +1,5 @@
; RUN: not llvm-link %s %p/Inputs/comdat3.ll -S -o - 2>&1 | FileCheck %s
-$foo = comdat noduplicates
+$foo = comdat nodeduplicate
@foo = global i64 43, comdat($foo)
-; CHECK: Linking COMDATs named 'foo': noduplicates has been violated!
+; CHECK: Linking COMDATs named 'foo': nodeduplicate has been violated!
diff --git a/llvm/test/SymbolRewriter/rewrite.ll b/llvm/test/SymbolRewriter/rewrite.ll
index 518ac3a6b0990..0298f18aff39b 100644
--- a/llvm/test/SymbolRewriter/rewrite.ll
+++ b/llvm/test/SymbolRewriter/rewrite.ll
@@ -45,13 +45,13 @@ entry:
$source_comdat_variable = comdat largest
@source_comdat_variable = global i32 32, comdat($source_comdat_variable)
-$source_comdat_variable_1 = comdat noduplicates
+$source_comdat_variable_1 = comdat nodeduplicate
@source_comdat_variable_1 = global i32 64, comdat($source_comdat_variable_1)
; CHECK: $target_comdat_function = comdat any
; CHECK: $target_comdat_function_1 = comdat exactmatch
; CHECK: $target_comdat_variable = comdat largest
-; CHECK: $target_comdat_variable_1 = comdat noduplicates
+; CHECK: $target_comdat_variable_1 = comdat nodeduplicate
; CHECK: @target_variable = external global i32
; CHECK-NOT: @source_variable = external global i32
diff --git a/llvm/test/Transforms/Internalize/comdat.ll b/llvm/test/Transforms/Internalize/comdat.ll
index 041c519ed0c96..c4d8611aa9003 100644
--- a/llvm/test/Transforms/Internalize/comdat.ll
+++ b/llvm/test/Transforms/Internalize/comdat.ll
@@ -13,8 +13,8 @@ $c5 = comdat any
; CHECK: $c1 = comdat any
-;; wasm doesn't support noduplicates.
-; NODUP: $c2 = comdat noduplicates
+;; wasm doesn't support nodeduplicate.
+; NODUP: $c2 = comdat nodeduplicate
; WASM: $c2 = comdat any
; CHECK: $c3 = comdat any
More information about the llvm-commits
mailing list