SIL: add a utility which can manage per-block bitfields and flags efficiently.

It is very efficient: no memory allocation is needed an initialization is at zero cost.
This commit is contained in:
Erik Eckstein
2021-01-20 21:10:28 +01:00
parent d044a02f50
commit 65976fd0c5
8 changed files with 323 additions and 4 deletions

View File

@@ -309,6 +309,8 @@ transferNodesFromList(llvm::ilist_traits<SILBasicBlock> &SrcTraits,
// If splicing blocks not in the same function, update the parent pointers.
for (; First != Last; ++First) {
First->Parent = Parent;
First->index = -1;
First->lastInitializedBitfieldID = 0;
for (auto &II : *First)
II.setDebugScope(ScopeCloner.getOrCreateClonedScope(II.getDebugScope()));
}