|
LLVM
10.0.0
|
#include "llvm/CodeGen/SwiftErrorValueTracking.h"
Public Member Functions | |
| void | setFunction (MachineFunction &MF) |
| Initialize data structures for specified new function. More... | |
| const Value * | getFunctionArg () const |
| Get the (unique) function argument that was marked swifterror, or nullptr if this function has no swifterror args. More... | |
| Register | getOrCreateVReg (const MachineBasicBlock *, const Value *) |
| Get or create the swifterror value virtual register in VRegDefMap for this basic block. More... | |
| void | setCurrentVReg (const MachineBasicBlock *MBB, const Value *, Register) |
| Set the swifterror virtual register in the VRegDefMap for this basic block. More... | |
| Register | getOrCreateVRegDefAt (const Instruction *, const MachineBasicBlock *, const Value *) |
| Get or create the swifterror value virtual register for a def of a swifterror by an instruction. More... | |
| Register | getOrCreateVRegUseAt (const Instruction *, const MachineBasicBlock *, const Value *) |
| Get or create the swifterror value virtual register for a use of a swifterror by an instruction. More... | |
| bool | createEntriesInEntryBlock (DebugLoc DbgLoc) |
| Create initial definitions of swifterror values in the entry block of the current function. More... | |
| void | propagateVRegs () |
| Propagate assigned swifterror vregs through a function, synthesizing PHI nodes when needed to maintain consistency. More... | |
| void | preassignVRegs (MachineBasicBlock *MBB, BasicBlock::const_iterator Begin, BasicBlock::const_iterator End) |
Definition at line 36 of file SwiftErrorValueTracking.h.
Create initial definitions of swifterror values in the entry block of the current function.
Definition at line 115 of file SwiftErrorValueTracking.cpp.
References llvm::MachineFunction::begin(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::SmallVectorBase::empty(), llvm::MCInstrInfo::get(), llvm::MachineFunction::getDataLayout(), llvm::MachineBasicBlock::getFirstNonPHI(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MachineFunction::getRegInfo(), setCurrentVReg(), and llvm::TargetLowering::supportSwiftError().
Referenced by getFunctionArg(), and processDbgDeclares().
Get the (unique) function argument that was marked swifterror, or nullptr if this function has no swifterror args.
Definition at line 74 of file SwiftErrorValueTracking.h.
References createEntriesInEntryBlock(), getOrCreateVReg(), getOrCreateVRegDefAt(), getOrCreateVRegUseAt(), preassignVRegs(), propagateVRegs(), and setCurrentVReg().
| Register SwiftErrorValueTracking::getOrCreateVReg | ( | const MachineBasicBlock * | MBB, |
| const Value * | Val | ||
| ) |
Get or create the swifterror value virtual register in VRegDefMap for this basic block.
Definition at line 26 of file SwiftErrorValueTracking.cpp.
References llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineFunction::getDataLayout(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getRegClassFor(), and llvm::MachineFunction::getRegInfo().
Referenced by getFunctionArg(), getOrCreateVRegUseAt(), and propagateVRegs().
| Register SwiftErrorValueTracking::getOrCreateVRegDefAt | ( | const Instruction * | I, |
| const MachineBasicBlock * | MBB, | ||
| const Value * | Val | ||
| ) |
Get or create the swifterror value virtual register for a def of a swifterror by an instruction.
Definition at line 50 of file SwiftErrorValueTracking.cpp.
References llvm::MachineRegisterInfo::createVirtualRegister(), llvm::MachineFunction::getDataLayout(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MachineFunction::getRegInfo(), I, and setCurrentVReg().
Referenced by getFunctionArg().
| Register SwiftErrorValueTracking::getOrCreateVRegUseAt | ( | const Instruction * | I, |
| const MachineBasicBlock * | MBB, | ||
| const Value * | Val | ||
| ) |
Get or create the swifterror value virtual register for a use of a swifterror by an instruction.
Definition at line 65 of file SwiftErrorValueTracking.cpp.
References getOrCreateVReg(), and I.
Referenced by getFunctionArg().
| void SwiftErrorValueTracking::preassignVRegs | ( | MachineBasicBlock * | MBB, |
| BasicBlock::const_iterator | Begin, | ||
| BasicBlock::const_iterator | End | ||
| ) |
Definition at line 259 of file SwiftErrorValueTracking.cpp.
Referenced by getFunctionArg().
| void SwiftErrorValueTracking::propagateVRegs | ( | ) |
Propagate assigned swifterror vregs through a function, synthesizing PHI nodes when needed to maintain consistency.
Propagate swifterror values through the machine function CFG.
Definition at line 147 of file SwiftErrorValueTracking.cpp.
References llvm::MachineInstrBuilder::addMBB(), llvm::MachineInstrBuilder::addReg(), assert(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::BuildMI(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::SmallVectorBase::empty(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::find_if(), llvm::MCInstrInfo::get(), llvm::MachineFunction::getDataLayout(), llvm::TargetSubtargetInfo::getInstrInfo(), getOrCreateVReg(), llvm::TargetLoweringBase::getPointerTy(), llvm::TargetLoweringBase::getRegClassFor(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), llvm::SmallSet< T, N, C >::insert(), llvm::SmallVectorTemplateBase< T >::push_back(), Register, second, setCurrentVReg(), llvm::SmallVectorBase::size(), and llvm::TargetLowering::supportSwiftError().
Referenced by getFunctionArg().
| void SwiftErrorValueTracking::setCurrentVReg | ( | const MachineBasicBlock * | MBB, |
| const Value * | Val, | ||
| Register | VReg | ||
| ) |
Set the swifterror virtual register in the VRegDefMap for this basic block.
Definition at line 45 of file SwiftErrorValueTracking.cpp.
Referenced by createEntriesInEntryBlock(), getFunctionArg(), getOrCreateVRegDefAt(), and propagateVRegs().
| void SwiftErrorValueTracking::setFunction | ( | MachineFunction & | mf | ) |
Initialize data structures for specified new function.
Set up SwiftErrorVals by going through the function.
If the function has swifterror argument, it will be the first entry.
Definition at line 79 of file SwiftErrorValueTracking.cpp.
References llvm::Function::arg_begin(), llvm::Function::arg_end(), assert(), llvm::SmallVectorImpl< T >::clear(), llvm::MachineFunction::getFunction(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::TargetLowering::supportSwiftError().
Referenced by llvm::SelectionDAGISel::runOnMachineFunction().
1.8.13