Skip to content
Merged
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5242,6 +5242,7 @@ bool MemProfContextDisambiguation::applyImport(Module &M) {
assert(AI != FS->allocs().end());
auto &AllocNode = *(AI++);

#ifndef NDEBUG
// Sanity check that the MIB stack ids match between the summary and
// instruction metadata.
auto MIBIter = AllocNode.MIBs.begin();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we refactor this out to a static helper? I think it should be straightforward since the only live ins for this region are AllocNode and MemProfMD as far as I can tell.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. There were a couple of other live in variables. I also updated one of the methods to take a const to enable using const for the new helper.

Expand Down Expand Up @@ -5276,6 +5277,7 @@ bool MemProfContextDisambiguation::applyImport(Module &M) {
}
MIBIter++;
}
#endif

// Perform cloning if not yet done.
CloneFuncIfNeeded(/*NumClones=*/AllocNode.Versions.size());
Expand Down
Loading