OSDN Git Service

Clarify a comment.
[android-x86/external-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   class raw_ostream;
22
23   /// PseudoSourceValue - Special value supplied for machine level alias
24   /// analysis. It indicates that the a memory access references the functions
25   /// stack frame (e.g., a spill slot), below the stack frame (e.g., argument
26   /// space), or constant pool.
27   class PseudoSourceValue : public Value {
28   private:
29     /// printCustom - Implement printing for PseudoSourceValue. This is called
30     /// from Value::print or Value's operator<<.
31     ///
32     virtual void printCustom(raw_ostream &O) const;
33
34   public:
35     PseudoSourceValue();
36
37     /// isConstant - Test whether the memory pointed to by this
38     /// PseudoSourceValue has a constant value.
39     ///
40     virtual bool isConstant(const MachineFrameInfo *) const;
41
42     /// classof - Methods for support type inquiry through isa, cast, and
43     /// dyn_cast:
44     ///
45     static inline bool classof(const PseudoSourceValue *) { return true; }
46     static inline bool classof(const Value *V) {
47       return V->getValueID() == PseudoSourceValueVal;
48     }
49
50     /// A pseudo source value referencing a fixed stack frame entry,
51     /// e.g., a spill slot.
52     static const PseudoSourceValue *getFixedStack(int FI);
53
54     /// A pseudo source value referencing the area below the stack frame of
55     /// a function, e.g., the argument space.
56     static const PseudoSourceValue *getStack();
57
58     /// A pseudo source value referencing the global offset table
59     /// (or something the like).
60     static const PseudoSourceValue *getGOT();
61
62     /// A pseudo source value referencing the constant pool. Since constant
63     /// pools are constant, this doesn't need to identify a specific constant
64     /// pool entry.
65     static const PseudoSourceValue *getConstantPool();
66
67     /// A pseudo source value referencing a jump table. Since jump tables are
68     /// constant, this doesn't need to identify a specific jump table.
69     static const PseudoSourceValue *getJumpTable();
70   };
71 } // End llvm namespace
72
73 #endif