Go to the documentation of this file.
15 #ifndef LLVM_LIB_IR_SYMBOLTABLELISTTRAITSIMPL_H
16 #define LLVM_LIB_IR_SYMBOLTABLELISTTRAITSIMPL_H
24 template <
typename ParentClass>
31 template <
typename ValueSubClass>
32 template <
typename TPtr>
45 if (OldST == NewST)
return;
48 ListTy &ItemList = getList(getListOwner());
49 if (ItemList.empty())
return;
53 for (
auto I = ItemList.begin();
I != ItemList.end(); ++
I)
55 OldST->removeValueName(
I->getValueName());
60 for (
auto I = ItemList.begin();
I != ItemList.end(); ++
I)
62 NewST->reinsertValue(&*
I);
67 template <
typename ValueSubClass>
69 assert(!V->getParent() &&
"Value already in a container!!");
70 ItemParentClass *Owner = getListOwner();
78 template <
typename ValueSubClass>
81 V->setParent(
nullptr);
84 ST->removeValueName(V->getValueName());
87 template <
typename ValueSubClass>
92 ItemParentClass *NewIP = getListOwner();
96 ItemParentClass *OldIP =
L2.getListOwner();
104 if (NewST != OldST) {
105 for (; first !=
last; ++first) {
106 ValueSubClass &V = *first;
107 bool HasName = V.hasName();
108 if (OldST && HasName)
109 OldST->removeValueName(V.getValueName());
111 if (NewST && HasName)
112 NewST->reinsertValue(&V);
117 for (; first !=
last; ++first)
118 first->setParent(NewIP);
This is an optimization pass for GlobalISel generic memory operations.
void invalidateParentIListOrdering(ParentClass *Parent)
Notify basic blocks when an instruction is inserted.
void removeNodeFromList(ValueSubClass *V)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
@ BasicBlock
Various leaf nodes.
List that automatically updates parent links and symbol tables.
void addNodeToList(ValueSubClass *V)
void setSymTabObject(TPtr *, TPtr)
setSymTabObject - This is called when (f.e.) the parent of a basic block changes.
This class provides a symbol table of name/value pairs.
static bool getSymTab(Value *V, ValueSymbolTable *&ST)
void transferNodesFromList(SymbolTableListTraits &L2, iterator first, iterator last)
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB