[llvm-commits] CVS: llvm/include/llvm/Analysis/ValueNumbering.h

Chris Lattner lattner at cs.uiuc.edu
Sat Apr 10 17:33:01 PDT 2004


Changes in directory llvm/include/llvm/Analysis:

ValueNumbering.h updated: 1.4 -> 1.5

---
Log message:

Add an interface to update value numbering


---
Diffs of the changes:  (+10 -1)

Index: llvm/include/llvm/Analysis/ValueNumbering.h
diff -u llvm/include/llvm/Analysis/ValueNumbering.h:1.4 llvm/include/llvm/Analysis/ValueNumbering.h:1.5
--- llvm/include/llvm/Analysis/ValueNumbering.h:1.4	Wed Dec 10 23:05:56 2003
+++ llvm/include/llvm/Analysis/ValueNumbering.h	Sat Apr 10 17:32:09 2004
@@ -28,6 +28,7 @@
 class Value;
 
 struct ValueNumbering {
+  virtual ~ValueNumbering();    // We want to be subclassed
 
   /// getEqualNumberNodes - Return nodes with the same value number as the
   /// specified Value.  This fills in the argument vector with any equal values.
@@ -35,7 +36,15 @@
   virtual void getEqualNumberNodes(Value *V1,
                                    std::vector<Value*> &RetVals) const = 0;
 
-  virtual ~ValueNumbering();    // We want to be subclassed
+  ///===-------------------------------------------------------------------===//
+  /// Interfaces to update value numbering analysis information as the client
+  /// changes the program
+  ///
+
+  /// deleteInstruction - Clients should invoke this method when they delete an
+  /// instruction from the program.  This allows the analysis implementations to
+  /// avoid having dangling pointers in their representation.
+  virtual void deleteInstruction(Instruction *I) {}
 };
 
 extern void BasicValueNumberingStub();





More information about the llvm-commits mailing list