Add a value_type typedef to SmallVector, to make it more compatible with STL adapters.
[oota-llvm.git] / include / llvm / CodeGen / PseudoSourceValue.h
1 //===-- llvm/CodeGen/PseudoSourceValue.h ------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains the declaration of the PseudoSourceValue class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_CODEGEN_PSEUDOSOURCEVALUE_H
15 #define LLVM_CODEGEN_PSEUDOSOURCEVALUE_H
16
17 #include "llvm/Value.h"
18
19 namespace llvm {
20   class MachineFrameInfo;
21
22   /// PseudoSourceValue - Special value supplied for machine level alias
23   /// analysis. It indicates that the a memory access references the functions
24   /// stack frame (e.g., a spill slot), below the stack frame (e.g., argument
25   /// space), or constant pool.
26   class PseudoSourceValue : public Value {
27   public:
28     PseudoSourceValue();
29
30     virtual void print(std::ostream &OS) const;
31
32     /// isConstant - Test whether this PseudoSourceValue has a constant value.
33     ///
34     virtual bool isConstant(const MachineFrameInfo *) const;
35
36     /// classof - Methods for support type inquiry through isa, cast, and
37     /// dyn_cast:
38     ///
39     static inline bool classof(const PseudoSourceValue *) { return true; }
40     static inline bool classof(const Value *V) {
41       return V->getValueID() == PseudoSourceValueVal;
42     }
43
44     /// A pseudo source value referencing a fixed stack frame entry,
45     /// e.g., a spill slot.
46     static const PseudoSourceValue *getFixedStack(int FI);
47
48     /// A source value referencing the area below the stack frame of a function,
49     /// e.g., the argument space.
50     static const PseudoSourceValue *getStack();
51
52     /// A source value referencing the global offset table (or something the
53     /// like).
54     static const PseudoSourceValue *getGOT();
55
56     /// A SV referencing the constant pool
57     static const PseudoSourceValue *getConstantPool();
58
59     /// A SV referencing the jump table
60     static const PseudoSourceValue *getJumpTable();
61   };
62 } // End llvm namespace
63
64 #endif