class FunctionLoweringInfo

Declaration

class FunctionLoweringInfo { /* full declaration omitted */ };

Description

FunctionLoweringInfo - This contains information that is global to a function that is used when lowering a region of the function.

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:52

Member Variables

public const llvm::Function* Fn
public llvm::MachineFunction* MF
public const llvm::TargetLowering* TLI
public llvm::MachineRegisterInfo* RegInfo
public llvm::BranchProbabilityInfo* BPI
public const llvm::LegacyDivergenceAnalysis* DA
public bool CanLowerReturn
CanLowerReturn - true iff the function's return value can be lowered to registers.
public bool SplitCSR
True if part of the CSRs will be handled via explicit copies.
public llvm::Register DemoteRegister
DemoteRegister - if CanLowerReturn is false, DemoteRegister is a vreg allocated to hold a pointer to the hidden sret parameter.
public DenseMap<const llvm::BasicBlock*, llvm::MachineBasicBlock*> MBBMap
MBBMap - A mapping from LLVM basic blocks to their machine code entry.
public DenseMap<const llvm::Value*, llvm::Register> ValueMap
ValueMap - Since we emit code for the function a basic block at a time, we must remember which virtual registers hold the values for cross-basic-block values.
public DenseMap<llvm::Register, const llvm::Value*> VirtReg2Value
VirtReg2Value map is needed by the Divergence Analysis driven instruction selection. It is reverted ValueMap. It is computed in lazy style - on demand. It is used to get the Value corresponding to the live in virtual register and is called from the TargetLowerinInfo::isSDNodeSourceOfDivergence.
public DenseMap<const llvm::Value*, llvm::Register> CatchPadExceptionPointers
Track virtual registers created for exception pointers.
public DenseMap<const llvm::Instruction*, llvm::FunctionLoweringInfo:: StatepointSpillMapTy> StatepointRelocationMaps
public DenseMap<const llvm::AllocaInst*, int> StaticAllocaMap
StaticAllocaMap - Keep track of frame indices for fixed sized allocas in the entry block. This allows the allocas to be efficiently referenced anywhere in the function.
public DenseMap<const llvm::Argument*, int> ByValArgFrameIndexMap
ByValArgFrameIndexMap - Keep track of frame indices for byval arguments.
public SmallVector<llvm::MachineInstr*, 8> ArgDbgValues
ArgDbgValues - A list of DBG_VALUE instructions created during isel for function arguments that are inserted after scheduling is completed.
public llvm::BitVector DescribedArgs
Bitvector with a bit set if corresponding argument is described in ArgDbgValues. Using arg numbers according to Argument numbering.
public DenseMap<llvm::Register, llvm::Register> RegFixups
RegFixups - Registers which need to be replaced after isel is done.
public DenseSet<llvm::Register> RegsWithFixups
public SmallVector<unsigned int, 50> StatepointStackSlots
StatepointStackSlots - A list of temporary stack slots (frame indices) used to spill values at a statepoint. We store them here to enable reuse of the same stack slots across different statepoints in different basic blocks.
public llvm::MachineBasicBlock* MBB
MBB - The current block.
public MachineBasicBlock::iterator InsertPt
MBB - The current insert position inside the current block.
public DenseMap<const llvm::Value*, ISD::NodeType> PreferredExtendType
Record the preferred extend type (ISD::SIGN_EXTEND or ISD::ZERO_EXTEND) for a value.
public SmallPtrSet<const llvm::BasicBlock*, 4> VisitedBBs
VisitedBBs - The set of basic blocks visited thus far by instruction selection.
public std::vector< std::pair<MachineInstr*, unsigned int>> PHINodesToUpdate
PHINodesToUpdate - A list of phi instructions whose operand list will be updated after processing the current basic block. TODO: This isn't per-function state, it's per-basic-block state. But there's no other convenient place for it to live right now.
public unsigned int OrigNumPHINodesToUpdate
public unsigned int ExceptionPointerVirtReg
If the current MBB is a landing pad, the exception pointer and exception selector registers are copied into these virtual registers by SelectionDAGISel::PrepareEHLandingPad().
public unsigned int ExceptionSelectorVirtReg
If the current MBB is a landing pad, the exception pointer and exception selector registers are copied into these virtual registers by SelectionDAGISel::PrepareEHLandingPad().
private IndexedMap< llvm::FunctionLoweringInfo::LiveOutInfo, llvm::VirtReg2IndexFunctor> LiveOutRegInfo
LiveOutRegInfo - Information about live out vregs.

Method Overview

Methods

void AddLiveOutRegInfo(
    llvm::Register Reg,
    unsigned int NumSignBits,
    const llvm::KnownBits& Known)

Description

AddLiveOutRegInfo - Adds LiveOutInfo for a register.

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:239

Parameters

llvm::Register Reg
unsigned int NumSignBits
const llvm::KnownBits& Known

void ComputePHILiveOutRegInfo(
    const llvm::PHINode*)

Description

ComputePHILiveOutRegInfo - Compute LiveOutInfo for a PHI's destination register based on the LiveOutInfo of its operands.

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:254

Parameters

const llvm::PHINode*

llvm::Register CreateReg(llvm::MVT VT,
                         bool isDivergent = false)

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:202

Parameters

llvm::MVT VT
bool isDivergent = false

llvm::Register CreateRegs(const llvm::Value* V)

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:204

Parameters

const llvm::Value* V

llvm::Register CreateRegs(
    llvm::Type* Ty,
    bool isDivergent = false)

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:206

Parameters

llvm::Type* Ty
bool isDivergent = false

const llvm::FunctionLoweringInfo::LiveOutInfo*
GetLiveOutRegInfo(llvm::Register Reg)

Description

GetLiveOutRegInfo - Gets LiveOutInfo for a register, returning NULL if the register is a PHI destination and the PHI's LiveOutInfo is not valid.

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:220

Parameters

llvm::Register Reg

const llvm::FunctionLoweringInfo::LiveOutInfo*
GetLiveOutRegInfo(llvm::Register Reg,
                  unsigned int BitWidth)

Description

GetLiveOutRegInfo - Gets LiveOutInfo for a register, returning NULL if the register is a PHI destination and the PHI's LiveOutInfo is not valid. If the register's LiveOutInfo is for a smaller bit width, it is extended to the larger bit width by zero extension. The bit width must be no smaller than the LiveOutInfo's existing bit width.

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:236

Parameters

llvm::Register Reg
unsigned int BitWidth

llvm::Register InitializeRegForValue(
    const llvm::Value* V)

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:208

Parameters

const llvm::Value* V

void InvalidatePHILiveOutRegInfo(
    const llvm::PHINode* PN)

Description

InvalidatePHILiveOutRegInfo - Invalidates a PHI's LiveOutInfo, to be called when a block is visited before all of its predecessors.

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:258

Parameters

const llvm::PHINode* PN

void clear()

Description

clear - Clear out all the function-specific state. This returns this FunctionLoweringInfo to an empty state, ready to be used for a different function.

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:194

int getArgumentFrameIndex(const llvm::Argument* A)

Description

getArgumentFrameIndex - Get frame index for the byval argument.

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:277

Parameters

const llvm::Argument* A

llvm::Register getCatchPadExceptionPointerVReg(
    const llvm::Value* CPI,
    const llvm::TargetRegisterClass* RC)

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:279

Parameters

const llvm::Value* CPI
const llvm::TargetRegisterClass* RC

const llvm::Value* getValueFromVirtualReg(
    llvm::Register Vreg)

Description

This method is called from TargetLowerinInfo::isSDNodeSourceOfDivergence to get the Value corresponding to the live-in virtual register.

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:88

Parameters

llvm::Register Vreg

bool isExportedInst(const llvm::Value* V) const

Description

isExportedInst - Return true if the specified value is an instruction exported from its block.

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:198

Parameters

const llvm::Value* V

void set(const llvm::Function& Fn,
         llvm::MachineFunction& MF,
         llvm::SelectionDAG* DAG)

Description

set - Initialize this FunctionLoweringInfo with the given Function and its associated MachineFunction.

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:189

Parameters

const llvm::Function& Fn
llvm::MachineFunction& MF
llvm::SelectionDAG* DAG

void setArgumentFrameIndex(
    const llvm::Argument* A,
    int FI)

Description

setArgumentFrameIndex - Record frame index for the byval argument.

Declared at: llvm/include/llvm/CodeGen/FunctionLoweringInfo.h:274

Parameters

const llvm::Argument* A
int FI