class SwiftErrorValueTracking

Declaration

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

Declared at: llvm/include/llvm/CodeGen/SwiftErrorValueTracking.h:34

Member Variables

private llvm::MachineFunction* MF
private const llvm::Function* Fn
private const llvm::TargetLowering* TLI
private const llvm::TargetInstrInfo* TII
private DenseMap<std::pair<const MachineBasicBlock*, const Value*>, llvm::Register> VRegDefMap
A map from swifterror value in a basic block to the virtual register it is currently represented by.
private DenseMap<std::pair<const MachineBasicBlock*, const Value*>, llvm::Register> VRegUpwardsUse
A list of upward exposed vreg uses that need to be satisfied by either a copy def or a phi node at the beginning of the basic block representing the predecessor(s) swifterror value.
private llvm::DenseMap< PointerIntPair<const Instruction*, 1, bool>, Register> VRegDefUses
A map from instructions that define/use a swifterror value to the virtual register that represents that def/use.
private const llvm::Value* SwiftErrorArg
The swifterror argument of the current function.
private llvm::SwiftErrorValueTracking::SwiftErrorValues SwiftErrorVals
A function can only have a single swifterror argument. And if it does have a swifterror argument, it must be the first entry in SwiftErrorVals.

Method Overview

  • public bool createEntriesInEntryBlock(llvm::DebugLoc DbgLoc)
  • public const llvm::Value * getFunctionArg() const
  • public llvm::Register getOrCreateVReg(const llvm::MachineBasicBlock *, const llvm::Value *)
  • public llvm::Register getOrCreateVRegDefAt(const llvm::Instruction *, const llvm::MachineBasicBlock *, const llvm::Value *)
  • public llvm::Register getOrCreateVRegUseAt(const llvm::Instruction *, const llvm::MachineBasicBlock *, const llvm::Value *)
  • public void preassignVRegs(llvm::MachineBasicBlock * MBB, BasicBlock::const_iterator Begin, BasicBlock::const_iterator End)
  • public void propagateVRegs()
  • public void setCurrentVReg(const llvm::MachineBasicBlock * MBB, const llvm::Value *, llvm::Register)
  • public void setFunction(llvm::MachineFunction & MF)

Methods

bool createEntriesInEntryBlock(
    llvm::DebugLoc DbgLoc)

Description

Create initial definitions of swifterror values in the entry block of the current function.

Declared at: llvm/include/llvm/CodeGen/SwiftErrorValueTracking.h:96

Parameters

llvm::DebugLoc DbgLoc

const llvm::Value* getFunctionArg() const

Description

Get the (unique) function argument that was marked swifterror, or nullptr if this function has no swifterror args.

Declared at: llvm/include/llvm/CodeGen/SwiftErrorValueTracking.h:72

llvm::Register getOrCreateVReg(
    const llvm::MachineBasicBlock*,
    const llvm::Value*)

Description

Get or create the swifterror value virtual register in VRegDefMap for this basic block.

Declared at: llvm/include/llvm/CodeGen/SwiftErrorValueTracking.h:78

Parameters

const llvm::MachineBasicBlock*
const llvm::Value*

llvm::Register getOrCreateVRegDefAt(
    const llvm::Instruction*,
    const llvm::MachineBasicBlock*,
    const llvm::Value*)

Description

Get or create the swifterror value virtual register for a def of a swifterror by an instruction.

Declared at: llvm/include/llvm/CodeGen/SwiftErrorValueTracking.h:86

Parameters

const llvm::Instruction*
const llvm::MachineBasicBlock*
const llvm::Value*

llvm::Register getOrCreateVRegUseAt(
    const llvm::Instruction*,
    const llvm::MachineBasicBlock*,
    const llvm::Value*)

Description

Get or create the swifterror value virtual register for a use of a swifterror by an instruction.

Declared at: llvm/include/llvm/CodeGen/SwiftErrorValueTracking.h:91

Parameters

const llvm::Instruction*
const llvm::MachineBasicBlock*
const llvm::Value*

void preassignVRegs(
    llvm::MachineBasicBlock* MBB,
    BasicBlock::const_iterator Begin,
    BasicBlock::const_iterator End)

Declared at: llvm/include/llvm/CodeGen/SwiftErrorValueTracking.h:102

Parameters

llvm::MachineBasicBlock* MBB
BasicBlock::const_iterator Begin
BasicBlock::const_iterator End

void propagateVRegs()

Description

Propagate assigned swifterror vregs through a function, synthesizing PHI nodes when needed to maintain consistency.

Declared at: llvm/include/llvm/CodeGen/SwiftErrorValueTracking.h:100

void setCurrentVReg(
    const llvm::MachineBasicBlock* MBB,
    const llvm::Value*,
    llvm::Register)

Description

Set the swifterror virtual register in the VRegDefMap for this basic block.

Declared at: llvm/include/llvm/CodeGen/SwiftErrorValueTracking.h:82

Parameters

const llvm::MachineBasicBlock* MBB
const llvm::Value*
llvm::Register

void setFunction(llvm::MachineFunction& MF)

Description

Initialize data structures for specified new function.

Declared at: llvm/include/llvm/CodeGen/SwiftErrorValueTracking.h:68

Parameters

llvm::MachineFunction& MF