LLVM API Documentation

llvm::VNInfo Class Reference

#include <LiveInterval.h>

Collaboration diagram for llvm::VNInfo:
[legend]

List of all members.

Public Types

typedef SmallVector< KillInfo, 4 > KillSet

Public Member Functions

 VNInfo ()
 VNInfo (unsigned i, unsigned d, MachineInstr *c)
 VNInfo (unsigned i, const VNInfo &orig)
 VNInfo construtor, copies values from orig, except for the value number.
void copyFrom (VNInfo &src)
 Copy from the parameter into this VNInfo.
unsigned getFlags () const
 Used for copying value number info.
void setFlags (unsigned flags)
MachineInstr * getCopy () const
void setCopy (MachineInstr *c)
unsigned getReg () const
void setReg (unsigned reg)
bool hasPHIKill () const
 Returns true if one or more kills are PHI nodes.
void setHasPHIKill (bool hasKill)
bool hasRedefByEC () const
void setHasRedefByEC (bool hasRedef)
bool isPHIDef () const
void setIsPHIDef (bool phiDef)
bool isUnused () const
 Returns true if this value is unused.
void setIsUnused (bool unused)
bool isDefAccurate () const
 Returns true if the def is accurate.
void setIsDefAccurate (bool defAccurate)

Public Attributes

unsigned id
 The ID number of this value.
unsigned def
 The index of the defining instruction (if isDefAccurate() returns true).
KillSet kills
MachineInstr * copy
unsigned reg

Classes

struct  KillInfo
 Holds information about individual kills. More...


Detailed Description

VNInfo - Value Number Information. This class holds information about a machine level values, including definition and use points.

Care must be taken in interpreting the def index of the value. The following rules apply:

If the isDefAccurate() method returns false then def does not contain the index of the defining MachineInstr, or even (necessarily) to a MachineInstr at all. In general such a def index is not meaningful and should not be used. The exception is that, for values originally defined by PHI instructions, after PHI elimination def will contain the index of the MBB in which the PHI originally existed. This can be used to insert code (spills or copies) which deals with the value, which will be live in to the block.

Definition at line 53 of file LiveInterval.h.


Member Typedef Documentation

Definition at line 83 of file LiveInterval.h.


Constructor & Destructor Documentation

llvm::VNInfo::VNInfo (  )  [inline]

Definition at line 93 of file LiveInterval.h.

llvm::VNInfo::VNInfo ( unsigned  i,
unsigned  d,
MachineInstr *  c 
) [inline]

VNInfo constructor. d is presumed to point to the actual defining instr. If it doesn't setIsDefAccurate(false) should be called after construction.

Definition at line 99 of file LiveInterval.h.

llvm::VNInfo::VNInfo ( unsigned  i,
const VNInfo &  orig 
) [inline]

VNInfo construtor, copies values from orig, except for the value number.

Definition at line 103 of file LiveInterval.h.


Member Function Documentation

void llvm::VNInfo::copyFrom ( VNInfo &  src  )  [inline]

Copy from the parameter into this VNInfo.

Definition at line 108 of file LiveInterval.h.

References cr, def, flags, and kills.

Referenced by llvm::LiveInterval::MergeValueNumberInto().

unsigned llvm::VNInfo::getFlags (  )  const [inline]

Used for copying value number info.

Definition at line 116 of file LiveInterval.h.

void llvm::VNInfo::setFlags ( unsigned  flags  )  [inline]

Definition at line 117 of file LiveInterval.h.

MachineInstr* llvm::VNInfo::getCopy (  )  const [inline]

For a register interval, if this VN was definied by a copy instr getCopy() returns a pointer to it, otherwise returns 0. For a stack interval the behaviour of this method is undefined.

Definition at line 122 of file LiveInterval.h.

Referenced by llvm::LiveIntervals::getVNInfoSourceReg().

void llvm::VNInfo::setCopy ( MachineInstr *  c  )  [inline]

For a register interval, set the copy member. This method should not be called on stack intervals as it may lead to undefined behavior.

Definition at line 126 of file LiveInterval.h.

unsigned llvm::VNInfo::getReg (  )  const [inline]

For a stack interval, returns the reg which this stack interval was defined from. For a register interval the behaviour of this method is undefined.

Definition at line 131 of file LiveInterval.h.

void llvm::VNInfo::setReg ( unsigned  reg  )  [inline]

For a stack interval, set the defining register. This method should not be called on register intervals as it may lead to undefined behaviour.

Definition at line 135 of file LiveInterval.h.

bool llvm::VNInfo::hasPHIKill (  )  const [inline]

Returns true if one or more kills are PHI nodes.

Definition at line 138 of file LiveInterval.h.

Referenced by llvm::LiveIntervals::addIntervalsForSpills(), and llvm::LiveInterval::print().

void llvm::VNInfo::setHasPHIKill ( bool  hasKill  )  [inline]

Definition at line 139 of file LiveInterval.h.

Referenced by llvm::LiveIntervals::addLiveRangeToEndOfBlock().

bool llvm::VNInfo::hasRedefByEC (  )  const [inline]

Returns true if this value is re-defined by an early clobber somewhere during the live range.

Definition at line 148 of file LiveInterval.h.

void llvm::VNInfo::setHasRedefByEC ( bool  hasRedef  )  [inline]

Definition at line 149 of file LiveInterval.h.

bool llvm::VNInfo::isPHIDef (  )  const [inline]

Returns true if this value is defined by a PHI instruction (or was, PHI instrucions may have been eliminated).

Definition at line 158 of file LiveInterval.h.

void llvm::VNInfo::setIsPHIDef ( bool  phiDef  )  [inline]

Definition at line 159 of file LiveInterval.h.

bool llvm::VNInfo::isUnused (  )  const [inline]

void llvm::VNInfo::setIsUnused ( bool  unused  )  [inline]

bool llvm::VNInfo::isDefAccurate (  )  const [inline]

void llvm::VNInfo::setIsDefAccurate ( bool  defAccurate  )  [inline]

Definition at line 177 of file LiveInterval.h.

Referenced by llvm::LiveInterval::getNextValue().


Member Data Documentation

Definition at line 65 of file LiveInterval.h.

Definition at line 66 of file LiveInterval.h.


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