LLVM API Documentation

llvm::RegsForValue Struct Reference

Collaboration diagram for llvm::RegsForValue:
[legend]

List of all members.

Public Member Functions

 RegsForValue ()
 RegsForValue (const TargetLowering &tli, const SmallVector< unsigned, 4 > &regs, MVT regvt, MVT valuevt)
 RegsForValue (const TargetLowering &tli, const SmallVector< unsigned, 4 > &regs, const SmallVector< MVT, 4 > &regvts, const SmallVector< MVT, 4 > &valuevts)
 RegsForValue (const TargetLowering &tli, unsigned Reg, const Type *Ty)
void append (const RegsForValue &RHS)
 append - Add the specified values to this one.
SDValue getCopyFromRegs (SelectionDAG &DAG, DebugLoc dl, SDValue &Chain, SDValue *Flag) const
void getCopyToRegs (SDValue Val, SelectionDAG &DAG, DebugLoc dl, SDValue &Chain, SDValue *Flag) const
void AddInlineAsmOperands (unsigned Code, SelectionDAG &DAG, std::vector< SDValue > &Ops) const

Public Attributes

const TargetLowering * TLI
SmallVector< MVT, 4 > ValueVTs
SmallVector< MVT, 4 > RegVTs
SmallVector< unsigned, 4 > Regs


Detailed Description

RegsForValue - This struct represents the registers (physical or virtual) that a particular set of values is assigned, and the type information about the value. The most common situation is to represent one value at a time, but struct or array values are handled element-wise as multiple values. The splitting of aggregates is performed recursively, so that we never have aggregate-typed registers. The values at this point do not necessarily have legal types, so each value may require one or more registers of some legal type.

Definition at line 153 of file SelectionDAGBuild.cpp.


Constructor & Destructor Documentation

llvm::RegsForValue::RegsForValue (  )  [inline]

Definition at line 180 of file SelectionDAGBuild.cpp.

llvm::RegsForValue::RegsForValue ( const TargetLowering &  tli,
const SmallVector< unsigned, 4 > &  regs,
MVT  regvt,
MVT  valuevt 
) [inline]

Definition at line 182 of file SelectionDAGBuild.cpp.

llvm::RegsForValue::RegsForValue ( const TargetLowering &  tli,
const SmallVector< unsigned, 4 > &  regs,
const SmallVector< MVT, 4 > &  regvts,
const SmallVector< MVT, 4 > &  valuevts 
) [inline]

Definition at line 186 of file SelectionDAGBuild.cpp.

llvm::RegsForValue::RegsForValue ( const TargetLowering &  tli,
unsigned  Reg,
const Type *  Ty 
) [inline]


Member Function Documentation

void llvm::RegsForValue::append ( const RegsForValue &  RHS  )  [inline]

append - Add the specified values to this one.

Definition at line 207 of file SelectionDAGBuild.cpp.

References llvm::SmallVectorImpl< T >::begin(), llvm::SmallVectorImpl< T >::end(), Regs, RegVTs, TLI, TLI, and ValueVTs.

SDValue RegsForValue::getCopyFromRegs ( SelectionDAG &  DAG,
DebugLoc  dl,
SDValue &  Chain,
SDValue *  Flag 
) const

getCopyFromRegs - Emit a series of CopyFromReg nodes that copies from this value and returns the result as a ValueVTs value. This uses Chain/Flag as the input and updates them for the output Chain/Flag. If the Flag pointer is NULL, no flag is used.

getCopyFromRegs - Emit a series of CopyFromReg nodes that copies from this value and returns the result as a ValueVT value. This uses Chain/Flag as the input and updates them for the output Chain/Flag. If the Flag pointer is NULL, no flag is used.

Definition at line 4499 of file SelectionDAGBuild.cpp.

References llvm::ISD::AssertSext, llvm::ISD::AssertZext, llvm::SmallVectorImpl< T >::begin(), llvm::SmallVectorImpl< T >::clear(), llvm::APInt::countLeadingOnes(), llvm::TargetRegisterInfo::FirstVirtualRegister, getCopyFromParts(), llvm::SelectionDAG::getCopyFromReg(), llvm::SelectionDAG::getFunctionLoweringInfo(), llvm::SelectionDAG::getNode(), llvm::TargetLowering::getNumRegisters(), llvm::MVT::getSizeInBits(), llvm::SDValue::getValue(), llvm::SelectionDAG::getValueType(), llvm::SelectionDAG::getVTList(), llvm::MVT::i1, llvm::MVT::i16, llvm::MVT::i32, llvm::MVT::i8, llvm::MVT::isInteger(), llvm::MVT::isVector(), llvm::TargetRegisterInfo::isVirtualRegister(), llvm::FunctionLoweringInfo::LiveOutInfo::KnownZero, llvm::FunctionLoweringInfo::LiveOutRegInfo, llvm::ISD::MERGE_VALUES, llvm::FunctionLoweringInfo::LiveOutInfo::NumSignBits, llvm::MVT::Other, Regs, RegVTs, llvm::SmallVectorImpl< T >::resize(), TLI, and Values.

void RegsForValue::getCopyToRegs ( SDValue  Val,
SelectionDAG &  DAG,
DebugLoc  dl,
SDValue &  Chain,
SDValue *  Flag 
) const

getCopyToRegs - Emit a series of CopyToReg nodes that copies the specified value into the registers specified by this object. This uses Chain/Flag as the input and updates them for the output Chain/Flag. If the Flag pointer is NULL, no flag is used.

getCopyToRegs - Emit a series of CopyToReg nodes that copies the specified value into the registers specified by this object. This uses Chain/Flag as the input and updates them for the output Chain/Flag. If the Flag pointer is NULL, no flag is used.

Definition at line 4582 of file SelectionDAGBuild.cpp.

References getCopyToParts(), llvm::SelectionDAG::getCopyToReg(), llvm::SelectionDAG::getNode(), llvm::TargetLowering::getNumRegisters(), llvm::SDValue::getResNo(), llvm::SDValue::getValue(), llvm::MVT::Other, Regs, RegVTs, llvm::SmallVectorImpl< T >::size(), TLI, and llvm::ISD::TokenFactor.

void RegsForValue::AddInlineAsmOperands ( unsigned  Code,
SelectionDAG &  DAG,
std::vector< SDValue > &  Ops 
) const

AddInlineAsmOperands - Add this value to the specified inlineasm node operand list. This adds the code marker and includes the number of values added into it.

AddInlineAsmOperands - Add this value to the specified inlineasm node operand list. This adds the code marker and includes the number of values added into it.

Definition at line 4629 of file SelectionDAGBuild.cpp.

References llvm::TargetLowering::getNumRegisters(), llvm::TargetLowering::getPointerTy(), llvm::SelectionDAG::getRegister(), llvm::SelectionDAG::getTargetConstant(), llvm::SelectionDAG::getTargetLoweringInfo(), Regs, RegVTs, llvm::SmallVectorImpl< T >::size(), and TLI.


Member Data Documentation

TLI - The TargetLowering object.

Definition at line 156 of file SelectionDAGBuild.cpp.

Referenced by AddInlineAsmOperands(), append(), getCopyFromRegs(), and getCopyToRegs().

ValueVTs - The value types of the values, which may not be legal, and may need be promoted or synthesized from one or more registers.

Definition at line 161 of file SelectionDAGBuild.cpp.

Referenced by append().

RegVTs - The value types of the registers. This is the same size as ValueVTs and it records, for each value, what the type of the assigned register or registers are. (Individual values are never synthesized from more than one type of register.)

With virtual registers, the contents of RegVTs is redundant with TLI's getRegisterType member function, however when with physical registers it is necessary to have a separate record of the types.

Definition at line 172 of file SelectionDAGBuild.cpp.

Referenced by AddInlineAsmOperands(), append(), getCopyFromRegs(), and getCopyToRegs().

Regs - This list holds the registers assigned to the values. Each legal or promoted value requires one register, and each expanded value requires multiple registers.

Definition at line 178 of file SelectionDAGBuild.cpp.

Referenced by AddInlineAsmOperands(), append(), getCopyFromRegs(), and getCopyToRegs().


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