[llvm-commits] CVS: llvm/include/llvm/Analysis/DSGraph.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Oct 2 01:25:01 PDT 2002
Changes in directory llvm/include/llvm/Analysis:
DSGraph.h updated: 1.1 -> 1.2
---
Log message:
* Implement fully general merging of array subscripts on demand! This
does not handle the initial pointer index case yet though.
---
Diffs of the changes:
Index: llvm/include/llvm/Analysis/DSGraph.h
diff -u llvm/include/llvm/Analysis/DSGraph.h:1.1 llvm/include/llvm/Analysis/DSGraph.h:1.2
--- llvm/include/llvm/Analysis/DSGraph.h:1.1 Tue Oct 1 23:58:12 2002
+++ llvm/include/llvm/Analysis/DSGraph.h Wed Oct 2 01:24:29 2002
@@ -209,6 +209,18 @@
///
void mergeWith(const DSNodeHandle &NH, unsigned Offset);
+ /// mergeIndexes - If we discover that two indexes are equivalent and must be
+ /// merged, this function is used to do the dirty work.
+ ///
+ void mergeIndexes(unsigned idx1, unsigned idx2) {
+ assert(idx1 < getSize() && idx2 < getSize() && "Indexes out of range!");
+ signed char MV1 = MergeMap[idx1];
+ signed char MV2 = MergeMap[idx2];
+ if (MV1 != MV2)
+ mergeMappedValues(MV1, MV2);
+ }
+
+
/// addGlobal - Add an entry for a global value to the Globals list. This
/// also marks the node with the 'G' flag if it does not already have it.
///
More information about the llvm-commits
mailing list