]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/llvm/CodeGen/PseudoSourceValue.h
Import LLVM, at r72732.
[FreeBSD/FreeBSD.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   public:
29     PseudoSourceValue();
30
31     /// dump - Support for debugging, callable in GDB: V->dump()
32     //
33     virtual void dump() const;
34
35     /// print - Implement operator<< on PseudoSourceValue.
36     ///
37     virtual void print(raw_ostream &OS) const;
38
39     /// isConstant - Test whether this PseudoSourceValue has a constant value.
40     ///
41     virtual bool isConstant(const MachineFrameInfo *) const;
42
43     /// classof - Methods for support type inquiry through isa, cast, and
44     /// dyn_cast:
45     ///
46     static inline bool classof(const PseudoSourceValue *) { return true; }
47     static inline bool classof(const Value *V) {
48       return V->getValueID() == PseudoSourceValueVal;
49     }
50
51     /// A pseudo source value referencing a fixed stack frame entry,
52     /// e.g., a spill slot.
53     static const PseudoSourceValue *getFixedStack(int FI);
54
55     /// A source value referencing the area below the stack frame of a function,
56     /// e.g., the argument space.
57     static const PseudoSourceValue *getStack();
58
59     /// A source value referencing the global offset table (or something the
60     /// like).
61     static const PseudoSourceValue *getGOT();
62
63     /// A SV referencing the constant pool
64     static const PseudoSourceValue *getConstantPool();
65
66     /// A SV referencing the jump table
67     static const PseudoSourceValue *getJumpTable();
68   };
69 } // End llvm namespace
70
71 #endif