LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
llvm::PseudoSourceValue Class Reference

#include <PseudoSourceValue.h>

Inheritance diagram for llvm::PseudoSourceValue:
Inheritance graph
[legend]
Collaboration diagram for llvm::PseudoSourceValue:
Collaboration graph
[legend]

Public Member Functions

 PseudoSourceValue (enum ValueTy Subclass=PseudoSourceValueVal)
 
virtual bool isConstant (const MachineFrameInfo *) const
 
virtual bool isAliased (const MachineFrameInfo *) const
 
virtual bool mayAlias (const MachineFrameInfo *) const
 
- Public Member Functions inherited from llvm::Value
virtual ~Value ()
 
void dump () const
 dump - Support for debugging, callable in GDB: V->dump() More...
 
void print (raw_ostream &O, AssemblyAnnotationWriter *AAW=0) const
 
TypegetType () const
 
LLVMContextgetContext () const
 All values hold a context through their type. More...
 
bool hasName () const
 
ValueNamegetValueName () const
 
void setValueName (ValueName *VN)
 
StringRef getName () const
 
void setName (const Twine &Name)
 
void takeName (Value *V)
 
void replaceAllUsesWith (Value *V)
 
bool use_empty () const
 
use_iterator use_begin ()
 
const_use_iterator use_begin () const
 
use_iterator use_end ()
 
const_use_iterator use_end () const
 
Useruse_back ()
 
const Useruse_back () const
 
bool hasOneUse () const
 
bool hasNUses (unsigned N) const
 
bool hasNUsesOrMore (unsigned N) const
 
bool isUsedInBasicBlock (const BasicBlock *BB) const
 
unsigned getNumUses () const
 
void addUse (Use &U)
 
unsigned getValueID () const
 
unsigned getRawSubclassOptionalData () const
 
void clearSubclassOptionalData ()
 
bool hasSameSubclassOptionalData (const Value *V) const
 
void intersectOptionalDataWith (const Value *V)
 
bool hasValueHandle () const
 
ValuestripPointerCasts ()
 Strips off any unneeded pointer casts, all-zero GEPs and aliases from the specified value, returning the original uncasted value. More...
 
const ValuestripPointerCasts () const
 
ValuestripPointerCastsNoFollowAliases ()
 Strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. More...
 
const ValuestripPointerCastsNoFollowAliases () const
 
ValuestripInBoundsConstantOffsets ()
 Strips off unneeded pointer casts and all-constant GEPs from the specified value, returning the original pointer value. More...
 
const ValuestripInBoundsConstantOffsets () const
 
ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset)
 Strips like stripInBoundsConstantOffsets but also accumulates the constant offset stripped. More...
 
const ValuestripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const
 
ValuestripInBoundsOffsets ()
 Strips off unneeded pointer casts and any in-bounds offsets from the specified value, returning the original pointer value. More...
 
const ValuestripInBoundsOffsets () const
 
bool isDereferenceablePointer () const
 
ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB)
 
const ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const
 
void mutateType (Type *Ty)
 

Static Public Member Functions

static bool classof (const Value *V)
 
static const PseudoSourceValuegetFixedStack (int FI)
 
static const PseudoSourceValuegetStack ()
 
static const PseudoSourceValuegetGOT ()
 
static const PseudoSourceValuegetConstantPool ()
 
static const PseudoSourceValuegetJumpTable ()
 

Additional Inherited Members

- Public Types inherited from llvm::Value
enum  ValueTy {
  ArgumentVal, BasicBlockVal, FunctionVal, GlobalAliasVal,
  GlobalVariableVal, UndefValueVal, BlockAddressVal, ConstantExprVal,
  ConstantAggregateZeroVal, ConstantDataArrayVal, ConstantDataVectorVal, ConstantIntVal,
  ConstantFPVal, ConstantArrayVal, ConstantStructVal, ConstantVectorVal,
  ConstantPointerNullVal, MDNodeVal, MDStringVal, InlineAsmVal,
  PseudoSourceValueVal, FixedStackPseudoSourceValueVal, InstructionVal, ConstantFirstVal = FunctionVal,
  ConstantLastVal = ConstantPointerNullVal
}
 
typedef value_use_iterator< Useruse_iterator
 
typedef value_use_iterator
< const User
const_use_iterator
 
- Static Public Attributes inherited from llvm::Value
static const unsigned MaximumAlignment = 1u << 29
 
- Protected Member Functions inherited from llvm::Value
 Value (Type *Ty, unsigned scid)
 
unsigned short getSubclassDataFromValue () const
 
void setValueSubclassData (unsigned short D)
 
- Protected Attributes inherited from llvm::Value
unsigned char SubclassOptionalData: 7
 

Detailed Description

PseudoSourceValue - Special value supplied for machine level alias analysis. It indicates that a memory access references the functions stack frame (e.g., a spill slot), below the stack frame (e.g., argument space), or constant pool.

Definition at line 27 of file PseudoSourceValue.h.

Constructor & Destructor Documentation

PseudoSourceValue::PseudoSourceValue ( enum ValueTy  Subclass = PseudoSourceValueVal)
explicit

Definition at line 65 of file PseudoSourceValue.cpp.

Member Function Documentation

static bool llvm::PseudoSourceValue::classof ( const Value V)
inlinestatic

classof - Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 53 of file PseudoSourceValue.h.

References llvm::Value::FixedStackPseudoSourceValueVal, llvm::Value::getValueID(), and llvm::Value::PseudoSourceValueVal.

const PseudoSourceValue * PseudoSourceValue::getConstantPool ( )
static

A pseudo source value referencing the constant pool. Since constant pools are constant, this doesn't need to identify a specific constant pool entry.

Definition at line 51 of file PseudoSourceValue.cpp.

Referenced by isAliased(), isConstant(), and mayAlias().

const PseudoSourceValue * PseudoSourceValue::getFixedStack ( int  FI)
static

A pseudo source value referencing a fixed stack frame entry, e.g., a spill slot.

Definition at line 73 of file PseudoSourceValue.cpp.

Referenced by llvm::addFrameReference(), llvm::HexagonInstrInfo::loadRegFromStackSlot(), and llvm::HexagonInstrInfo::storeRegToStackSlot().

const PseudoSourceValue * PseudoSourceValue::getGOT ( )
static

A pseudo source value referencing the global offset table (or something the like).

Definition at line 47 of file PseudoSourceValue.cpp.

Referenced by isAliased(), isConstant(), and mayAlias().

const PseudoSourceValue * PseudoSourceValue::getJumpTable ( )
static

A pseudo source value referencing a jump table. Since jump tables are constant, this doesn't need to identify a specific jump table.

Definition at line 49 of file PseudoSourceValue.cpp.

Referenced by isAliased(), isConstant(), and mayAlias().

const PseudoSourceValue * PseudoSourceValue::getStack ( )
static

A pseudo source value referencing the area below the stack frame of a function, e.g., the argument space.

Definition at line 45 of file PseudoSourceValue.cpp.

Referenced by isAliased(), and isConstant().

bool PseudoSourceValue::isAliased ( const MachineFrameInfo MFI) const
virtual

isAliased - Test whether the memory pointed to by this PseudoSourceValue may also be pointed to by an LLVM IR Value.

Reimplemented in llvm::FixedStackPseudoSourceValue, and llvm::MipsCallEntry.

Definition at line 92 of file PseudoSourceValue.cpp.

References getConstantPool(), getGOT(), getJumpTable(), getStack(), and llvm_unreachable.

bool PseudoSourceValue::isConstant ( const MachineFrameInfo ) const
virtual

isConstant - Test whether the memory pointed to by this PseudoSourceValue has a constant value.

Reimplemented in llvm::FixedStackPseudoSourceValue, and llvm::MipsCallEntry.

Definition at line 82 of file PseudoSourceValue.cpp.

References getConstantPool(), getGOT(), getJumpTable(), getStack(), and llvm_unreachable.

bool PseudoSourceValue::mayAlias ( const MachineFrameInfo MFI) const
virtual

mayAlias - Return true if the memory pointed to by this PseudoSourceValue can ever alias an LLVM IR Value.

Reimplemented in llvm::FixedStackPseudoSourceValue, and llvm::MipsCallEntry.

Definition at line 101 of file PseudoSourceValue.cpp.

References getConstantPool(), getGOT(), and getJumpTable().


The documentation for this class was generated from the following files: