Rename loop preheaders pass to loop simplify
[oota-llvm.git] / include / llvm / Analysis / ValueNumbering.h
1 //===- llvm/Analysis/ValueNumbering.h - Value #'ing Interface ---*- C++ -*-===//
2 //
3 // This file defines the abstract ValueNumbering interface, which is used as the
4 // common interface used by all clients of value numbering information, and
5 // implemented by all value numbering implementations.
6 //
7 // Implementations of this interface must implement the various virtual methods,
8 // which automatically provides functionality for the entire suite of client
9 // APIs.
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef LLVM_ANALYSIS_VALUE_NUMBERING_H
14 #define LLVM_ANALYSIS_VALUE_NUMBERING_H
15
16 #include <vector>
17 class Value;
18
19 struct ValueNumbering {
20
21   /// getEqualNumberNodes - Return nodes with the same value number as the
22   /// specified Value.  This fills in the argument vector with any equal values.
23   ///
24   virtual void getEqualNumberNodes(Value *V1,
25                                    std::vector<Value*> &RetVals) const = 0;
26
27   virtual ~ValueNumbering();    // We want to be subclassed
28 };
29
30 #endif