PseudoSourceValue.h revision 193323
1193323Sed//===-- llvm/CodeGen/PseudoSourceValue.h ------------------------*- C++ -*-===// 2193323Sed// 3193323Sed// The LLVM Compiler Infrastructure 4193323Sed// 5193323Sed// This file is distributed under the University of Illinois Open Source 6193323Sed// License. See LICENSE.TXT for details. 7193323Sed// 8193323Sed//===----------------------------------------------------------------------===// 9193323Sed// 10193323Sed// This file contains the declaration of the PseudoSourceValue class. 11193323Sed// 12193323Sed//===----------------------------------------------------------------------===// 13193323Sed 14193323Sed#ifndef LLVM_CODEGEN_PSEUDOSOURCEVALUE_H 15193323Sed#define LLVM_CODEGEN_PSEUDOSOURCEVALUE_H 16193323Sed 17193323Sed#include "llvm/Value.h" 18193323Sed 19193323Sednamespace llvm { 20193323Sed class MachineFrameInfo; 21193323Sed class raw_ostream; 22193323Sed 23193323Sed /// PseudoSourceValue - Special value supplied for machine level alias 24193323Sed /// analysis. It indicates that the a memory access references the functions 25193323Sed /// stack frame (e.g., a spill slot), below the stack frame (e.g., argument 26193323Sed /// space), or constant pool. 27193323Sed class PseudoSourceValue : public Value { 28193323Sed public: 29193323Sed PseudoSourceValue(); 30193323Sed 31193323Sed /// dump - Support for debugging, callable in GDB: V->dump() 32193323Sed // 33193323Sed virtual void dump() const; 34193323Sed 35193323Sed /// print - Implement operator<< on PseudoSourceValue. 36193323Sed /// 37193323Sed virtual void print(raw_ostream &OS) const; 38193323Sed 39193323Sed /// isConstant - Test whether this PseudoSourceValue has a constant value. 40193323Sed /// 41193323Sed virtual bool isConstant(const MachineFrameInfo *) const; 42193323Sed 43193323Sed /// classof - Methods for support type inquiry through isa, cast, and 44193323Sed /// dyn_cast: 45193323Sed /// 46193323Sed static inline bool classof(const PseudoSourceValue *) { return true; } 47193323Sed static inline bool classof(const Value *V) { 48193323Sed return V->getValueID() == PseudoSourceValueVal; 49193323Sed } 50193323Sed 51193323Sed /// A pseudo source value referencing a fixed stack frame entry, 52193323Sed /// e.g., a spill slot. 53193323Sed static const PseudoSourceValue *getFixedStack(int FI); 54193323Sed 55193323Sed /// A source value referencing the area below the stack frame of a function, 56193323Sed /// e.g., the argument space. 57193323Sed static const PseudoSourceValue *getStack(); 58193323Sed 59193323Sed /// A source value referencing the global offset table (or something the 60193323Sed /// like). 61193323Sed static const PseudoSourceValue *getGOT(); 62193323Sed 63193323Sed /// A SV referencing the constant pool 64193323Sed static const PseudoSourceValue *getConstantPool(); 65193323Sed 66193323Sed /// A SV referencing the jump table 67193323Sed static const PseudoSourceValue *getJumpTable(); 68193323Sed }; 69193323Sed} // End llvm namespace 70193323Sed 71193323Sed#endif 72