Skip to content

[Bitcode] Use DenseSet instead of std::set (NFC) #105851

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4628,7 +4628,7 @@ void IndexBitcodeWriter::writeCombinedGlobalValueSummary() {
NameVals.clear();
};

std::set<GlobalValue::GUID> DefOrUseGUIDs;
DenseSet<GlobalValue::GUID> DefOrUseGUIDs;
forEachSummary([&](GVInfo I, bool IsAliasee) {
GlobalValueSummary *S = I.second;
assert(S);
Expand Down Expand Up @@ -4777,7 +4777,7 @@ void IndexBitcodeWriter::writeCombinedGlobalValueSummary() {

if (!Index.cfiFunctionDefs().empty()) {
for (auto &S : Index.cfiFunctionDefs()) {
if (DefOrUseGUIDs.count(
if (DefOrUseGUIDs.contains(
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(S)))) {
NameVals.push_back(StrtabBuilder.add(S));
NameVals.push_back(S.size());
Expand All @@ -4791,7 +4791,7 @@ void IndexBitcodeWriter::writeCombinedGlobalValueSummary() {

if (!Index.cfiFunctionDecls().empty()) {
for (auto &S : Index.cfiFunctionDecls()) {
if (DefOrUseGUIDs.count(
if (DefOrUseGUIDs.contains(
GlobalValue::getGUID(GlobalValue::dropLLVMManglingEscape(S)))) {
NameVals.push_back(StrtabBuilder.add(S));
NameVals.push_back(S.size());
Expand Down
Loading