forked from OSchip/llvm-project
parent
2f0f845534
commit
d64fafd937
|
@ -55,6 +55,11 @@ public:
|
||||||
|
|
||||||
void erase(Value *V) { erase(find(V)); }
|
void erase(Value *V) { erase(find(V)); }
|
||||||
|
|
||||||
|
void eraseIfExists(Value *V) {
|
||||||
|
iterator I = find(V);
|
||||||
|
if (I != end()) erase(I);
|
||||||
|
}
|
||||||
|
|
||||||
/// replaceScalar - When an instruction needs to be modified, this method can
|
/// 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.
|
/// be used to update the scalar map to remove the old and insert the new.
|
||||||
///
|
///
|
||||||
|
@ -65,6 +70,14 @@ public:
|
||||||
erase(I);
|
erase(I);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// copyScalarIfExists - If Old exists in the scalar map, make New point to
|
||||||
|
/// whatever Old did.
|
||||||
|
void copyScalarIfExists(Value *Old, Value *New) {
|
||||||
|
iterator I = find(Old);
|
||||||
|
if (I != end())
|
||||||
|
ValueMap.insert(std::make_pair(New, I->second));
|
||||||
|
}
|
||||||
|
|
||||||
DSNodeHandle &operator[](Value *V) {
|
DSNodeHandle &operator[](Value *V) {
|
||||||
std::pair<iterator,bool> IP =
|
std::pair<iterator,bool> IP =
|
||||||
ValueMap.insert(std::make_pair(V, DSNodeHandle()));
|
ValueMap.insert(std::make_pair(V, DSNodeHandle()));
|
||||||
|
|
|
@ -113,6 +113,11 @@ public:
|
||||||
|
|
||||||
DSGraph &getGlobalsGraph() const { return *GlobalsGraph; }
|
DSGraph &getGlobalsGraph() const { return *GlobalsGraph; }
|
||||||
|
|
||||||
|
/// deleteValue/copyValue - Interfaces to update the DSGraphs in the program.
|
||||||
|
/// These correspond to the interfaces defined in the AliasAnalysis class.
|
||||||
|
void deleteValue(Value *V);
|
||||||
|
void copyValue(Value *From, Value *To);
|
||||||
|
|
||||||
/// print - Print out the analysis results...
|
/// print - Print out the analysis results...
|
||||||
///
|
///
|
||||||
void print(std::ostream &O, const Module *M) const;
|
void print(std::ostream &O, const Module *M) const;
|
||||||
|
@ -175,6 +180,11 @@ public:
|
||||||
|
|
||||||
DSGraph &getGlobalsGraph() const { return *GlobalsGraph; }
|
DSGraph &getGlobalsGraph() const { return *GlobalsGraph; }
|
||||||
|
|
||||||
|
/// deleteValue/copyValue - Interfaces to update the DSGraphs in the program.
|
||||||
|
/// These correspond to the interfaces defined in the AliasAnalysis class.
|
||||||
|
void deleteValue(Value *V);
|
||||||
|
void copyValue(Value *From, Value *To);
|
||||||
|
|
||||||
/// print - Print out the analysis results...
|
/// print - Print out the analysis results...
|
||||||
///
|
///
|
||||||
void print(std::ostream &O, const Module *M) const;
|
void print(std::ostream &O, const Module *M) const;
|
||||||
|
|
Loading…
Reference in New Issue