summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-10 22:32:09 +0000
committerChris Lattner <sabre@nondot.org>2004-04-10 22:32:09 +0000
commitc39546cceb8526b332852bafd0689f6ee4867b11 (patch)
treee457246a0271fa9edb5293459de8a21c40b2e3cb /include
parentd76956d4441e790828571778281671c677078576 (diff)
downloadllvm-c39546cceb8526b332852bafd0689f6ee4867b11.tar.gz
llvm-c39546cceb8526b332852bafd0689f6ee4867b11.tar.bz2
llvm-c39546cceb8526b332852bafd0689f6ee4867b11.tar.xz
Add an interface to update value numbering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/ValueNumbering.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/Analysis/ValueNumbering.h b/include/llvm/Analysis/ValueNumbering.h
index b337a22a67..0ce8336afe 100644
--- a/include/llvm/Analysis/ValueNumbering.h
+++ b/include/llvm/Analysis/ValueNumbering.h
@@ -28,6 +28,7 @@ namespace llvm {
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 @@ struct ValueNumbering {
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();