struct RegsForValue
Declaration
struct RegsForValue { /* full declaration omitted */ };
Description
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.
Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:832
Member Variables
- public SmallVector<llvm::EVT, 4> ValueVTs
- The value types of the values, which may not be legal, and may need be promoted or synthesized from one or more registers.
- public SmallVector<llvm::MVT, 4> RegVTs
- 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.
- public SmallVector<unsigned int, 4> 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.
- public SmallVector<unsigned int, 4> RegCount
- This list holds the number of registers for each value.
- public Optional<CallingConv::ID> CallConv
- Records if this value needs to be treated in an ABI dependant manner, different to normal type legalization.
Method Overview
- public void AddInlineAsmOperands(unsigned int Code, bool HasMatching, unsigned int MatchingIdx, const llvm::SDLoc & dl, llvm::SelectionDAG & DAG, std::vector<SDValue> & Ops) const
- public RegsForValue()
- public RegsForValue(const SmallVector<unsigned int, 4> & regs, llvm::MVT regvt, llvm::EVT valuevt, Optional<CallingConv::ID> CC = None)
- public RegsForValue(llvm::LLVMContext & Context, const llvm::TargetLowering & TLI, const llvm::DataLayout & DL, unsigned int Reg, llvm::Type * Ty, Optional<CallingConv::ID> CC)
- public void append(const llvm::RegsForValue & RHS)
- public llvm::SDValue getCopyFromRegs(llvm::SelectionDAG & DAG, llvm::FunctionLoweringInfo & FuncInfo, const llvm::SDLoc & dl, llvm::SDValue & Chain, llvm::SDValue * Flag, const llvm::Value * V = nullptr) const
- public void getCopyToRegs(llvm::SDValue Val, llvm::SelectionDAG & DAG, const llvm::SDLoc & dl, llvm::SDValue & Chain, llvm::SDValue * Flag, const llvm::Value * V = nullptr, ISD::NodeType PreferredExtendType = ISD::ANY_EXTEND) const
- public SmallVector<std::pair<unsigned int, unsigned int>, 4> getRegsAndSizes() const
- public bool isABIMangled() const
- public bool occupiesMultipleRegs() const
Methods
¶void AddInlineAsmOperands(
unsigned int Code,
bool HasMatching,
unsigned int MatchingIdx,
const llvm::SDLoc& dl,
llvm::SelectionDAG& DAG,
std::vector<SDValue>& Ops) const
void AddInlineAsmOperands(
unsigned int Code,
bool HasMatching,
unsigned int MatchingIdx,
const llvm::SDLoc& dl,
llvm::SelectionDAG& DAG,
std::vector<SDValue>& Ops) const
Description
Add this value to the specified inlineasm node operand list. This adds the code marker, matching input operand index (if applicable), and includes the number of values added into it.
Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:898
Parameters
- unsigned int Code
- bool HasMatching
- unsigned int MatchingIdx
- const llvm::SDLoc& dl
- llvm::SelectionDAG& DAG
- std::vector<SDValue>& Ops
¶RegsForValue()
RegsForValue()
Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:859
¶RegsForValue(
const SmallVector<unsigned int, 4>& regs,
llvm::MVT regvt,
llvm::EVT valuevt,
Optional<CallingConv::ID> CC = None)
RegsForValue(
const SmallVector<unsigned int, 4>& regs,
llvm::MVT regvt,
llvm::EVT valuevt,
Optional<CallingConv::ID> CC = None)
Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:860
Parameters
- const SmallVector<unsigned int, 4>& regs
- llvm::MVT regvt
- llvm::EVT valuevt
- Optional<CallingConv::ID> CC = None
¶RegsForValue(llvm::LLVMContext& Context,
const llvm::TargetLowering& TLI,
const llvm::DataLayout& DL,
unsigned int Reg,
llvm::Type* Ty,
Optional<CallingConv::ID> CC)
RegsForValue(llvm::LLVMContext& Context,
const llvm::TargetLowering& TLI,
const llvm::DataLayout& DL,
unsigned int Reg,
llvm::Type* Ty,
Optional<CallingConv::ID> CC)
Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:862
Parameters
- llvm::LLVMContext& Context
- const llvm::TargetLowering& TLI
- const llvm::DataLayout& DL
- unsigned int Reg
- llvm::Type* Ty
- Optional<CallingConv::ID> CC
¶void append(const llvm::RegsForValue& RHS)
void append(const llvm::RegsForValue& RHS)
Description
Add the specified values to this one.
Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:871
Parameters
- const llvm::RegsForValue& RHS
¶llvm::SDValue getCopyFromRegs(
llvm::SelectionDAG& DAG,
llvm::FunctionLoweringInfo& FuncInfo,
const llvm::SDLoc& dl,
llvm::SDValue& Chain,
llvm::SDValue* Flag,
const llvm::Value* V = nullptr) const
llvm::SDValue getCopyFromRegs(
llvm::SelectionDAG& DAG,
llvm::FunctionLoweringInfo& FuncInfo,
const llvm::SDLoc& dl,
llvm::SDValue& Chain,
llvm::SDValue* Flag,
const llvm::Value* V = nullptr) const
Description
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.
Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:882
Parameters
- llvm::SelectionDAG& DAG
- llvm::FunctionLoweringInfo& FuncInfo
- const llvm::SDLoc& dl
- llvm::SDValue& Chain
- llvm::SDValue* Flag
- const llvm::Value* V = nullptr
¶void getCopyToRegs(
llvm::SDValue Val,
llvm::SelectionDAG& DAG,
const llvm::SDLoc& dl,
llvm::SDValue& Chain,
llvm::SDValue* Flag,
const llvm::Value* V = nullptr,
ISD::NodeType PreferredExtendType =
ISD::ANY_EXTEND) const
void getCopyToRegs(
llvm::SDValue Val,
llvm::SelectionDAG& DAG,
const llvm::SDLoc& dl,
llvm::SDValue& Chain,
llvm::SDValue* Flag,
const llvm::Value* V = nullptr,
ISD::NodeType PreferredExtendType =
ISD::ANY_EXTEND) const
Description
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 nullptr, no flag is used. If V is not nullptr, then it is used in printing better diagnostic messages on error.
Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:891
Parameters
- llvm::SDValue Val
- llvm::SelectionDAG& DAG
- const llvm::SDLoc& dl
- llvm::SDValue& Chain
- llvm::SDValue* Flag
- const llvm::Value* V = nullptr
- ISD::NodeType PreferredExtendType = ISD::ANY_EXTEND
¶SmallVector<std::pair<unsigned int, unsigned int>,
4>
getRegsAndSizes() const
SmallVector<std::pair<unsigned int, unsigned int>,
4>
getRegsAndSizes() const
Description
Return a list of registers and their sizes.
Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:908
¶bool isABIMangled() const
bool isABIMangled() const
Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:866
¶bool occupiesMultipleRegs() const
bool occupiesMultipleRegs() const
Description
Check if the total RegCount is greater than one.
Declared at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h:903