mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Add a method useful for updating DSA
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11636 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6559615fc4
commit
bbdfe40ba7
@ -54,6 +54,15 @@ public:
|
||||
|
||||
void erase(Value *V) { erase(find(V)); }
|
||||
|
||||
/// replaceScalar - When an instruction needs to be modified, this method can
|
||||
/// be used to update the scalar map to remove the old and insert the new.
|
||||
void replaceScalar(Value *Old, Value *New) {
|
||||
iterator I = find(Old);
|
||||
assert(I != end() && "Old value is not in the map!");
|
||||
ValueMap.insert(std::make_pair(New, I->second));
|
||||
erase(I);
|
||||
}
|
||||
|
||||
DSNodeHandle &operator[](Value *V) {
|
||||
std::pair<iterator,bool> IP =
|
||||
ValueMap.insert(std::make_pair(V, DSNodeHandle()));
|
||||
|
@ -54,6 +54,15 @@ public:
|
||||
|
||||
void erase(Value *V) { erase(find(V)); }
|
||||
|
||||
/// replaceScalar - When an instruction needs to be modified, this method can
|
||||
/// be used to update the scalar map to remove the old and insert the new.
|
||||
void replaceScalar(Value *Old, Value *New) {
|
||||
iterator I = find(Old);
|
||||
assert(I != end() && "Old value is not in the map!");
|
||||
ValueMap.insert(std::make_pair(New, I->second));
|
||||
erase(I);
|
||||
}
|
||||
|
||||
DSNodeHandle &operator[](Value *V) {
|
||||
std::pair<iterator,bool> IP =
|
||||
ValueMap.insert(std::make_pair(V, DSNodeHandle()));
|
||||
|
Loading…
Reference in New Issue
Block a user