class FastISel
Declaration
class FastISel { /* full declaration omitted */ };
Description
This is a fast-path instruction selection class that generates poor code and doesn't support illegal types or non-trivial lowering, but runs quickly.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:66
Member Variables
- protected DenseMap<const llvm::Value*, unsigned int> LocalValueMap
- protected llvm::FunctionLoweringInfo& FuncInfo
- protected llvm::MachineFunction* MF
- protected llvm::MachineRegisterInfo& MRI
- protected llvm::MachineFrameInfo& MFI
- protected llvm::MachineConstantPool& MCP
- protected llvm::DebugLoc DbgLoc
- protected const llvm::TargetMachine& TM
- protected const llvm::DataLayout& DL
- protected const llvm::TargetInstrInfo& TII
- protected const llvm::TargetLowering& TLI
- protected const llvm::TargetRegisterInfo& TRI
- protected const llvm::TargetLibraryInfo* LibInfo
- protected bool SkipTargetIndependentISel
- protected llvm::MachineInstr* LastLocalValue
- The position of the last instruction for materializing constants for use in the current block. It resets to EmitStartPt when it makes sense (for example, it's usually profitable to avoid function calls between the definition and the use)
- protected llvm::MachineInstr* EmitStartPt
- The top most instruction in the current block that is allowed for emitting local variables. LastLocalValue resets to EmitStartPt when it makes sense (for example, on function calls)
- protected MachineBasicBlock::iterator LastFlushPoint
- Last local value flush point. On a subsequent flush, no local value will sink past this point.
Method Overview
- protected FastISel(llvm::FunctionLoweringInfo & FuncInfo, const llvm::TargetLibraryInfo * LibInfo, bool SkipTargetIndependentISel = false)
- protected bool canFoldAddIntoGEP(const llvm::User * GEP, const llvm::Value * Add)
- protected unsigned int constrainOperandRegClass(const llvm::MCInstrDesc & II, unsigned int Op, unsigned int OpNum)
- protected llvm::MachineMemOperand * createMachineMemOperandFor(const llvm::Instruction * I) const
- protected unsigned int createResultReg(const llvm::TargetRegisterClass * RC)
- public llvm::FastISel::SavePoint enterLocalValueArea()
- protected void fastEmitBranch(llvm::MachineBasicBlock * MSucc, const llvm::DebugLoc & DbgLoc)
- protected unsigned int fastEmitInst_(unsigned int MachineInstOpcode, const llvm::TargetRegisterClass * RC)
- protected unsigned int fastEmitInst_extractsubreg(llvm::MVT RetVT, unsigned int Op0, bool Op0IsKill, uint32_t Idx)
- protected unsigned int fastEmitInst_f(unsigned int MachineInstOpcode, const llvm::TargetRegisterClass * RC, const llvm::ConstantFP * FPImm)
- protected unsigned int fastEmitInst_i(unsigned int MachineInstOpcode, const llvm::TargetRegisterClass * RC, uint64_t Imm)
- protected unsigned int fastEmitInst_r(unsigned int MachineInstOpcode, const llvm::TargetRegisterClass * RC, unsigned int Op0, bool Op0IsKill)
- protected unsigned int fastEmitInst_ri(unsigned int MachineInstOpcode, const llvm::TargetRegisterClass * RC, unsigned int Op0, bool Op0IsKill, uint64_t Imm)
- protected unsigned int fastEmitInst_rii(unsigned int MachineInstOpcode, const llvm::TargetRegisterClass * RC, unsigned int Op0, bool Op0IsKill, uint64_t Imm1, uint64_t Imm2)
- protected unsigned int fastEmitInst_rr(unsigned int MachineInstOpcode, const llvm::TargetRegisterClass * RC, unsigned int Op0, bool Op0IsKill, unsigned int Op1, bool Op1IsKill)
- protected unsigned int fastEmitInst_rri(unsigned int MachineInstOpcode, const llvm::TargetRegisterClass * RC, unsigned int Op0, bool Op0IsKill, unsigned int Op1, bool Op1IsKill, uint64_t Imm)
- protected unsigned int fastEmitInst_rrr(unsigned int MachineInstOpcode, const llvm::TargetRegisterClass * RC, unsigned int Op0, bool Op0IsKill, unsigned int Op1, bool Op1IsKill, unsigned int Op2, bool Op2IsKill)
- protected unsigned int fastEmitZExtFromI1(llvm::MVT VT, unsigned int Op0, bool Op0IsKill)
- protected virtual unsigned int fastEmit_(llvm::MVT VT, llvm::MVT RetVT, unsigned int Opcode)
- protected virtual unsigned int fastEmit_f(llvm::MVT VT, llvm::MVT RetVT, unsigned int Opcode, const llvm::ConstantFP * FPImm)
- protected virtual unsigned int fastEmit_i(llvm::MVT VT, llvm::MVT RetVT, unsigned int Opcode, uint64_t Imm)
- protected virtual unsigned int fastEmit_r(llvm::MVT VT, llvm::MVT RetVT, unsigned int Opcode, unsigned int Op0, bool Op0IsKill)
- protected virtual unsigned int fastEmit_ri(llvm::MVT VT, llvm::MVT RetVT, unsigned int Opcode, unsigned int Op0, bool Op0IsKill, uint64_t Imm)
- protected unsigned int fastEmit_ri_(llvm::MVT VT, unsigned int Opcode, unsigned int Op0, bool Op0IsKill, uint64_t Imm, llvm::MVT ImmType)
- protected virtual unsigned int fastEmit_rr(llvm::MVT VT, llvm::MVT RetVT, unsigned int Opcode, unsigned int Op0, bool Op0IsKill, unsigned int Op1, bool Op1IsKill)
- protected virtual bool fastLowerArguments()
- protected virtual bool fastLowerCall(llvm::FastISel::CallLoweringInfo & CLI)
- protected virtual bool fastLowerIntrinsicCall(const llvm::IntrinsicInst * II)
- protected virtual unsigned int fastMaterializeAlloca(const llvm::AllocaInst * C)
- protected virtual unsigned int fastMaterializeConstant(const llvm::Constant * C)
- protected virtual unsigned int fastMaterializeFloatZero(const llvm::ConstantFP * CF)
- protected virtual bool fastSelectInstruction(const llvm::Instruction * I)
- public void finishBasicBlock()
- protected void finishCondBranch(const llvm::BasicBlock * BranchBB, llvm::MachineBasicBlock * TrueMBB, llvm::MachineBasicBlock * FalseMBB)
- public llvm::DebugLoc getCurDebugLoc() const
- public llvm::MachineInstr * getLastLocalValue()
- public std::pair<unsigned int, bool> getRegForGEPIndex(const llvm::Value * Idx)
- public unsigned int getRegForValue(const llvm::Value * V)
- protected bool hasTrivialKill(const llvm::Value * V)
- protected bool isCommutativeIntrinsic(const llvm::IntrinsicInst * II)
- public void leaveLocalValueArea(llvm::FastISel::SavePoint Old)
- public unsigned int lookUpRegForValue(const llvm::Value * V)
- public bool lowerArguments()
- protected bool lowerCall(const llvm::CallInst * I)
- protected bool lowerCallTo(llvm::FastISel::CallLoweringInfo & CLI)
- protected bool lowerCallTo(const llvm::CallInst * CI, const char * SymName, unsigned int NumArgs)
- protected bool lowerCallTo(const llvm::CallInst * CI, llvm::MCSymbol * Symbol, unsigned int NumArgs)
- protected CmpInst::Predicate optimizeCmpPredicate(const llvm::CmpInst * CI) const
- public void recomputeInsertPt()
- public void removeDeadCode(MachineBasicBlock::iterator I, MachineBasicBlock::iterator E)
- protected bool selectBinaryOp(const llvm::User * I, unsigned int ISDOpcode)
- protected bool selectBitCast(const llvm::User * I)
- protected bool selectCall(const llvm::User * I)
- protected bool selectCast(const llvm::User * I, unsigned int Opcode)
- protected bool selectExtractValue(const llvm::User * U)
- protected bool selectFNeg(const llvm::User * I, const llvm::Value * In)
- protected bool selectGetElementPtr(const llvm::User * I)
- protected bool selectInsertValue(const llvm::User * I)
- public bool selectInstruction(const llvm::Instruction * I)
- protected bool selectIntrinsicCall(const llvm::IntrinsicInst * II)
- public bool selectOperator(const llvm::User * I, unsigned int Opcode)
- protected bool selectPatchpoint(const llvm::CallInst * I)
- protected bool selectStackmap(const llvm::CallInst * I)
- protected bool selectXRayCustomEvent(const llvm::CallInst * II)
- protected bool selectXRayTypedEvent(const llvm::CallInst * II)
- public void setLastLocalValue(llvm::MachineInstr * I)
- protected bool shouldOptForSize(const llvm::MachineFunction * MF) const
- public void startNewBlock()
- public bool tryToFoldLoad(const llvm::LoadInst * LI, const llvm::Instruction * FoldInst)
- public virtual bool tryToFoldLoadIntoMI(llvm::MachineInstr *, unsigned int, const llvm::LoadInst *)
- protected void updateValueMap(const llvm::Value * I, unsigned int Reg, unsigned int NumRegs = 1)
- public virtual ~FastISel()
Methods
¶FastISel(llvm::FunctionLoweringInfo& FuncInfo,
const llvm::TargetLibraryInfo* LibInfo,
bool SkipTargetIndependentISel = false)
FastISel(llvm::FunctionLoweringInfo& FuncInfo,
const llvm::TargetLibraryInfo* LibInfo,
bool SkipTargetIndependentISel = false)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:330
Parameters
- llvm::FunctionLoweringInfo& FuncInfo
- const llvm::TargetLibraryInfo* LibInfo
- bool SkipTargetIndependentISel = false
¶bool canFoldAddIntoGEP(const llvm::User* GEP,
const llvm::Value* Add)
bool canFoldAddIntoGEP(const llvm::User* GEP,
const llvm::Value* Add)
Description
Check if \c Add is an add that can be safely folded into \c GEP. \c Add can be folded into \c GEP if: - \c Add is an add, - \c Add's size matches \c GEP's, - \c Add is in the same basic block as \c GEP, and - \c Add has a constant operand.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:499
Parameters
- const llvm::User* GEP
- const llvm::Value* Add
¶unsigned int constrainOperandRegClass(
const llvm::MCInstrDesc& II,
unsigned int Op,
unsigned int OpNum)
unsigned int constrainOperandRegClass(
const llvm::MCInstrDesc& II,
unsigned int Op,
unsigned int OpNum)
Description
Try to constrain Op so that it is usable by argument OpNum of the provided MCInstrDesc. If this fails, create a new virtual register in the correct class and COPY the value there.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:476
Parameters
- const llvm::MCInstrDesc& II
- unsigned int Op
- unsigned int OpNum
¶llvm::MachineMemOperand*
createMachineMemOperandFor(
const llvm::Instruction* I) const
llvm::MachineMemOperand*
createMachineMemOperandFor(
const llvm::Instruction* I) const
Description
Create a machine mem operand from the given instruction.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:505
Parameters
- const llvm::Instruction* I
¶unsigned int createResultReg(
const llvm::TargetRegisterClass* RC)
unsigned int createResultReg(
const llvm::TargetRegisterClass* RC)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:471
Parameters
- const llvm::TargetRegisterClass* RC
¶llvm::FastISel::SavePoint enterLocalValueArea()
llvm::FastISel::SavePoint enterLocalValueArea()
Description
Prepare InsertPt to begin inserting instructions into the local value area and return the old insert position.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:324
¶void fastEmitBranch(
llvm::MachineBasicBlock* MSucc,
const llvm::DebugLoc& DbgLoc)
void fastEmitBranch(
llvm::MachineBasicBlock* MSucc,
const llvm::DebugLoc& DbgLoc)
Description
Emit an unconditional branch to the given block, unless it is the immediate (fall-through) successor, and update the CFG.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:455
Parameters
- llvm::MachineBasicBlock* MSucc
- const llvm::DebugLoc& DbgLoc
¶unsigned int fastEmitInst_(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC)
unsigned int fastEmitInst_(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC)
Description
Emit a MachineInstr with no operands and a result register in the given register class.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:392
Parameters
- unsigned int MachineInstOpcode
- const llvm::TargetRegisterClass* RC
¶unsigned int fastEmitInst_extractsubreg(
llvm::MVT RetVT,
unsigned int Op0,
bool Op0IsKill,
uint32_t Idx)
unsigned int fastEmitInst_extractsubreg(
llvm::MVT RetVT,
unsigned int Op0,
bool Op0IsKill,
uint32_t Idx)
Description
Emit a MachineInstr for an extract_subreg from a specified index of a superregister to a specified type.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:446
Parameters
- llvm::MVT RetVT
- unsigned int Op0
- bool Op0IsKill
- uint32_t Idx
¶unsigned int fastEmitInst_f(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
const llvm::ConstantFP* FPImm)
unsigned int fastEmitInst_f(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
const llvm::ConstantFP* FPImm)
Description
Emit a MachineInstr with a floating point immediate, and a result register in the given register class.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:428
Parameters
- unsigned int MachineInstOpcode
- const llvm::TargetRegisterClass* RC
- const llvm::ConstantFP* FPImm
¶unsigned int fastEmitInst_i(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
uint64_t Imm)
unsigned int fastEmitInst_i(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
uint64_t Imm)
Description
Emit a MachineInstr with a single immediate operand, and a result register in the given register class.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:441
Parameters
- unsigned int MachineInstOpcode
- const llvm::TargetRegisterClass* RC
- uint64_t Imm
¶unsigned int fastEmitInst_r(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
unsigned int Op0,
bool Op0IsKill)
unsigned int fastEmitInst_r(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
unsigned int Op0,
bool Op0IsKill)
Description
Emit a MachineInstr with one register operand and a result register in the given register class.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:397
Parameters
- unsigned int MachineInstOpcode
- const llvm::TargetRegisterClass* RC
- unsigned int Op0
- bool Op0IsKill
¶unsigned int fastEmitInst_ri(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
unsigned int Op0,
bool Op0IsKill,
uint64_t Imm)
unsigned int fastEmitInst_ri(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
unsigned int Op0,
bool Op0IsKill,
uint64_t Imm)
Description
Emit a MachineInstr with a register operand, an immediate, and a result register in the given register class.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:416
Parameters
- unsigned int MachineInstOpcode
- const llvm::TargetRegisterClass* RC
- unsigned int Op0
- bool Op0IsKill
- uint64_t Imm
¶unsigned int fastEmitInst_rii(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
unsigned int Op0,
bool Op0IsKill,
uint64_t Imm1,
uint64_t Imm2)
unsigned int fastEmitInst_rii(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
unsigned int Op0,
bool Op0IsKill,
uint64_t Imm1,
uint64_t Imm2)
Description
Emit a MachineInstr with one register operand and two immediate operands.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:422
Parameters
- unsigned int MachineInstOpcode
- const llvm::TargetRegisterClass* RC
- unsigned int Op0
- bool Op0IsKill
- uint64_t Imm1
- uint64_t Imm2
¶unsigned int fastEmitInst_rr(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
unsigned int Op0,
bool Op0IsKill,
unsigned int Op1,
bool Op1IsKill)
unsigned int fastEmitInst_rr(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
unsigned int Op0,
bool Op0IsKill,
unsigned int Op1,
bool Op1IsKill)
Description
Emit a MachineInstr with two register operands and a result register in the given register class.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:403
Parameters
- unsigned int MachineInstOpcode
- const llvm::TargetRegisterClass* RC
- unsigned int Op0
- bool Op0IsKill
- unsigned int Op1
- bool Op1IsKill
¶unsigned int fastEmitInst_rri(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
unsigned int Op0,
bool Op0IsKill,
unsigned int Op1,
bool Op1IsKill,
uint64_t Imm)
unsigned int fastEmitInst_rri(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
unsigned int Op0,
bool Op0IsKill,
unsigned int Op1,
bool Op1IsKill,
uint64_t Imm)
Description
Emit a MachineInstr with two register operands, an immediate, and a result register in the given register class.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:434
Parameters
- unsigned int MachineInstOpcode
- const llvm::TargetRegisterClass* RC
- unsigned int Op0
- bool Op0IsKill
- unsigned int Op1
- bool Op1IsKill
- uint64_t Imm
¶unsigned int fastEmitInst_rrr(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
unsigned int Op0,
bool Op0IsKill,
unsigned int Op1,
bool Op1IsKill,
unsigned int Op2,
bool Op2IsKill)
unsigned int fastEmitInst_rrr(
unsigned int MachineInstOpcode,
const llvm::TargetRegisterClass* RC,
unsigned int Op0,
bool Op0IsKill,
unsigned int Op1,
bool Op1IsKill,
unsigned int Op2,
bool Op2IsKill)
Description
Emit a MachineInstr with three register operands and a result register in the given register class.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:409
Parameters
- unsigned int MachineInstOpcode
- const llvm::TargetRegisterClass* RC
- unsigned int Op0
- bool Op0IsKill
- unsigned int Op1
- bool Op1IsKill
- unsigned int Op2
- bool Op2IsKill
¶unsigned int fastEmitZExtFromI1(llvm::MVT VT,
unsigned int Op0,
bool Op0IsKill)
unsigned int fastEmitZExtFromI1(llvm::MVT VT,
unsigned int Op0,
bool Op0IsKill)
Description
Emit MachineInstrs to compute the value of Op with all but the least significant bit set to zero.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:451
Parameters
- llvm::MVT VT
- unsigned int Op0
- bool Op0IsKill
¶virtual unsigned int fastEmit_(
llvm::MVT VT,
llvm::MVT RetVT,
unsigned int Opcode)
virtual unsigned int fastEmit_(
llvm::MVT VT,
llvm::MVT RetVT,
unsigned int Opcode)
Description
This method is called by target-independent code to request that an instruction with the given type and opcode be emitted.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:354
Parameters
¶virtual unsigned int fastEmit_f(
llvm::MVT VT,
llvm::MVT RetVT,
unsigned int Opcode,
const llvm::ConstantFP* FPImm)
virtual unsigned int fastEmit_f(
llvm::MVT VT,
llvm::MVT RetVT,
unsigned int Opcode,
const llvm::ConstantFP* FPImm)
Description
This method is called by target-independent code to request that an instruction with the given type, opcode, and floating-point immediate operand be emitted.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:387
Parameters
- llvm::MVT VT
- llvm::MVT RetVT
- unsigned int Opcode
- const llvm::ConstantFP* FPImm
¶virtual unsigned int fastEmit_i(
llvm::MVT VT,
llvm::MVT RetVT,
unsigned int Opcode,
uint64_t Imm)
virtual unsigned int fastEmit_i(
llvm::MVT VT,
llvm::MVT RetVT,
unsigned int Opcode,
uint64_t Imm)
Description
This method is called by target-independent code to request that an instruction with the given type, opcode, and immediate operand be emitted.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:382
Parameters
¶virtual unsigned int fastEmit_r(
llvm::MVT VT,
llvm::MVT RetVT,
unsigned int Opcode,
unsigned int Op0,
bool Op0IsKill)
virtual unsigned int fastEmit_r(
llvm::MVT VT,
llvm::MVT RetVT,
unsigned int Opcode,
unsigned int Op0,
bool Op0IsKill)
Description
This method is called by target-independent code to request that an instruction with the given type, opcode, and register operand be emitted.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:358
Parameters
¶virtual unsigned int fastEmit_ri(
llvm::MVT VT,
llvm::MVT RetVT,
unsigned int Opcode,
unsigned int Op0,
bool Op0IsKill,
uint64_t Imm)
virtual unsigned int fastEmit_ri(
llvm::MVT VT,
llvm::MVT RetVT,
unsigned int Opcode,
unsigned int Op0,
bool Op0IsKill,
uint64_t Imm)
Description
This method is called by target-independent code to request that an instruction with the given type, opcode, and register and immediate operands be emitted.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:369
Parameters
¶unsigned int fastEmit_ri_(llvm::MVT VT,
unsigned int Opcode,
unsigned int Op0,
bool Op0IsKill,
uint64_t Imm,
llvm::MVT ImmType)
unsigned int fastEmit_ri_(llvm::MVT VT,
unsigned int Opcode,
unsigned int Op0,
bool Op0IsKill,
uint64_t Imm,
llvm::MVT ImmType)
Description
This method is a wrapper of fastEmit_ri. It first tries to emit an instruction with an immediate operand using fastEmit_ri. If that fails, it materializes the immediate into a register and try fastEmit_rr instead.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:377
Parameters
¶virtual unsigned int fastEmit_rr(
llvm::MVT VT,
llvm::MVT RetVT,
unsigned int Opcode,
unsigned int Op0,
bool Op0IsKill,
unsigned int Op1,
bool Op1IsKill)
virtual unsigned int fastEmit_rr(
llvm::MVT VT,
llvm::MVT RetVT,
unsigned int Opcode,
unsigned int Op0,
bool Op0IsKill,
unsigned int Op1,
bool Op1IsKill)
Description
This method is called by target-independent code to request that an instruction with the given type, opcode, and register operands be emitted.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:363
Parameters
- llvm::MVT VT
- llvm::MVT RetVT
- unsigned int Opcode
- unsigned int Op0
- bool Op0IsKill
- unsigned int Op1
- bool Op1IsKill
¶virtual bool fastLowerArguments()
virtual bool fastLowerArguments()
Description
This method is called by target-independent code to do target- specific argument lowering. It returns true if it was successful.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:342
¶virtual bool fastLowerCall(
llvm::FastISel::CallLoweringInfo& CLI)
virtual bool fastLowerCall(
llvm::FastISel::CallLoweringInfo& CLI)
Description
This method is called by target-independent code to do target- specific call lowering. It returns true if it was successful.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:346
Parameters
¶virtual bool fastLowerIntrinsicCall(
const llvm::IntrinsicInst* II)
virtual bool fastLowerIntrinsicCall(
const llvm::IntrinsicInst* II)
Description
This method is called by target-independent code to do target- specific intrinsic lowering. It returns true if it was successful.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:350
Parameters
- const llvm::IntrinsicInst* II
¶virtual unsigned int fastMaterializeAlloca(
const llvm::AllocaInst* C)
virtual unsigned int fastMaterializeAlloca(
const llvm::AllocaInst* C)
Description
Emit an alloca address in a register using target-specific logic.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:484
Parameters
- const llvm::AllocaInst* C
¶virtual unsigned int fastMaterializeConstant(
const llvm::Constant* C)
virtual unsigned int fastMaterializeConstant(
const llvm::Constant* C)
Description
Emit a constant in a register using target-specific logic, such as constant pool loads.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:481
Parameters
- const llvm::Constant* C
¶virtual unsigned int fastMaterializeFloatZero(
const llvm::ConstantFP* CF)
virtual unsigned int fastMaterializeFloatZero(
const llvm::ConstantFP* CF)
Description
Emit the floating-point constant +0.0 in a register using target- specific logic.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:488
Parameters
- const llvm::ConstantFP* CF
¶virtual bool fastSelectInstruction(
const llvm::Instruction* I)
virtual bool fastSelectInstruction(
const llvm::Instruction* I)
Description
This method is called by target-independent code when the normal FastISel process fails to select an instruction. This gives targets a chance to emit code for anything that doesn't fit into FastISel's framework. It returns true if it was successful.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:338
Parameters
- const llvm::Instruction* I
¶void finishBasicBlock()
void finishBasicBlock()
Description
Flush the local value map and sink local values if possible.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:251
¶void finishCondBranch(
const llvm::BasicBlock* BranchBB,
llvm::MachineBasicBlock* TrueMBB,
llvm::MachineBasicBlock* FalseMBB)
void finishCondBranch(
const llvm::BasicBlock* BranchBB,
llvm::MachineBasicBlock* TrueMBB,
llvm::MachineBasicBlock* FalseMBB)
Description
Emit an unconditional branch to \p FalseMBB, obtains the branch weight and adds TrueMBB and FalseMBB to the successor list.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:459
Parameters
- const llvm::BasicBlock* BranchBB
- llvm::MachineBasicBlock* TrueMBB
- llvm::MachineBasicBlock* FalseMBB
¶llvm::DebugLoc getCurDebugLoc() const
llvm::DebugLoc getCurDebugLoc() const
Description
Return current debug location information.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:254
¶llvm::MachineInstr* getLastLocalValue()
llvm::MachineInstr* getLastLocalValue()
Description
Return the position of the last instruction emitted for materializing constants for use in the current block.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:237
¶std::pair<unsigned int, bool> getRegForGEPIndex(
const llvm::Value* Idx)
std::pair<unsigned int, bool> getRegForGEPIndex(
const llvm::Value* Idx)
Description
This is a wrapper around getRegForValue that also takes care of truncating or sign-extending the given getelementptr index value.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:282
Parameters
- const llvm::Value* Idx
¶unsigned int getRegForValue(const llvm::Value* V)
unsigned int getRegForValue(const llvm::Value* V)
Description
Create a virtual register and arrange for it to be assigned the value for the given LLVM value.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:273
Parameters
- const llvm::Value* V
¶bool hasTrivialKill(const llvm::Value* V)
bool hasTrivialKill(const llvm::Value* V)
Description
Test whether the given value has exactly one use.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:502
Parameters
- const llvm::Value* V
¶bool isCommutativeIntrinsic(
const llvm::IntrinsicInst* II)
bool isCommutativeIntrinsic(
const llvm::IntrinsicInst* II)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:514
Parameters
- const llvm::IntrinsicInst* II
¶void leaveLocalValueArea(
llvm::FastISel::SavePoint Old)
void leaveLocalValueArea(
llvm::FastISel::SavePoint Old)
Description
Reset InsertPt to the given old insert position.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:327
Parameters
¶unsigned int lookUpRegForValue(
const llvm::Value* V)
unsigned int lookUpRegForValue(
const llvm::Value* V)
Description
Look up the value to see if its value is already cached in a register. It may be defined by instructions across blocks or defined locally.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:278
Parameters
- const llvm::Value* V
¶bool lowerArguments()
bool lowerArguments()
Description
Do "fast" instruction selection for function arguments and append the machine instructions to the current block. Returns true when successful.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:259
¶bool lowerCall(const llvm::CallInst* I)
bool lowerCall(const llvm::CallInst* I)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:526
Parameters
- const llvm::CallInst* I
¶bool lowerCallTo(
llvm::FastISel::CallLoweringInfo& CLI)
bool lowerCallTo(
llvm::FastISel::CallLoweringInfo& CLI)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:512
Parameters
¶bool lowerCallTo(const llvm::CallInst* CI,
const char* SymName,
unsigned int NumArgs)
bool lowerCallTo(const llvm::CallInst* CI,
const char* SymName,
unsigned int NumArgs)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:510
Parameters
- const llvm::CallInst* CI
- const char* SymName
- unsigned int NumArgs
¶bool lowerCallTo(const llvm::CallInst* CI,
llvm::MCSymbol* Symbol,
unsigned int NumArgs)
bool lowerCallTo(const llvm::CallInst* CI,
llvm::MCSymbol* Symbol,
unsigned int NumArgs)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:509
Parameters
- const llvm::CallInst* CI
- llvm::MCSymbol* Symbol
- unsigned int NumArgs
¶CmpInst::Predicate optimizeCmpPredicate(
const llvm::CmpInst* CI) const
CmpInst::Predicate optimizeCmpPredicate(
const llvm::CmpInst* CI) const
Declared at: llvm/include/llvm/CodeGen/FastISel.h:507
Parameters
- const llvm::CmpInst* CI
¶void recomputeInsertPt()
void recomputeInsertPt()
Description
Reset InsertPt to prepare for inserting instructions into the current block.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:311
¶void removeDeadCode(MachineBasicBlock::iterator I,
MachineBasicBlock::iterator E)
void removeDeadCode(MachineBasicBlock::iterator I,
MachineBasicBlock::iterator E)
Description
Remove all dead instructions between the I and E.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:314
Parameters
¶bool selectBinaryOp(const llvm::User* I,
unsigned int ISDOpcode)
bool selectBinaryOp(const llvm::User* I,
unsigned int ISDOpcode)
Description
Select and emit code for a binary operator instruction, which has an opcode which directly corresponds to the given ISD opcode.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:529
Parameters
- const llvm::User* I
- unsigned int ISDOpcode
¶bool selectBitCast(const llvm::User* I)
bool selectBitCast(const llvm::User* I)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:536
Parameters
- const llvm::User* I
¶bool selectCall(const llvm::User* I)
bool selectCall(const llvm::User* I)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:534
Parameters
- const llvm::User* I
¶bool selectCast(const llvm::User* I,
unsigned int Opcode)
bool selectCast(const llvm::User* I,
unsigned int Opcode)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:537
Parameters
- const llvm::User* I
- unsigned int Opcode
¶bool selectExtractValue(const llvm::User* U)
bool selectExtractValue(const llvm::User* U)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:538
Parameters
- const llvm::User* U
¶bool selectFNeg(const llvm::User* I,
const llvm::Value* In)
bool selectFNeg(const llvm::User* I,
const llvm::Value* In)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:530
Parameters
- const llvm::User* I
- const llvm::Value* In
¶bool selectGetElementPtr(const llvm::User* I)
bool selectGetElementPtr(const llvm::User* I)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:531
Parameters
- const llvm::User* I
¶bool selectInsertValue(const llvm::User* I)
bool selectInsertValue(const llvm::User* I)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:539
Parameters
- const llvm::User* I
¶bool selectInstruction(const llvm::Instruction* I)
bool selectInstruction(const llvm::Instruction* I)
Description
Do "fast" instruction selection for the given LLVM IR instruction and append the generated machine instructions to the current block. Returns true if selection was successful.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:264
Parameters
- const llvm::Instruction* I
¶bool selectIntrinsicCall(
const llvm::IntrinsicInst* II)
bool selectIntrinsicCall(
const llvm::IntrinsicInst* II)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:535
Parameters
- const llvm::IntrinsicInst* II
¶bool selectOperator(const llvm::User* I,
unsigned int Opcode)
bool selectOperator(const llvm::User* I,
unsigned int Opcode)
Description
Do "fast" instruction selection for the given LLVM IR operator (Instruction or ConstantExpr), and append generated machine instructions to the current block. Return true if selection was successful.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:269
Parameters
- const llvm::User* I
- unsigned int Opcode
¶bool selectPatchpoint(const llvm::CallInst* I)
bool selectPatchpoint(const llvm::CallInst* I)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:533
Parameters
- const llvm::CallInst* I
¶bool selectStackmap(const llvm::CallInst* I)
bool selectStackmap(const llvm::CallInst* I)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:532
Parameters
- const llvm::CallInst* I
¶bool selectXRayCustomEvent(
const llvm::CallInst* II)
bool selectXRayCustomEvent(
const llvm::CallInst* II)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:540
Parameters
- const llvm::CallInst* II
¶bool selectXRayTypedEvent(
const llvm::CallInst* II)
bool selectXRayTypedEvent(
const llvm::CallInst* II)
Declared at: llvm/include/llvm/CodeGen/FastISel.h:541
Parameters
- const llvm::CallInst* II
¶void setLastLocalValue(llvm::MachineInstr* I)
void setLastLocalValue(llvm::MachineInstr* I)
Description
Update the position of the last instruction emitted for materializing constants for use in the current block.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:241
Parameters
¶bool shouldOptForSize(
const llvm::MachineFunction* MF) const
bool shouldOptForSize(
const llvm::MachineFunction* MF) const
Declared at: llvm/include/llvm/CodeGen/FastISel.h:543
Parameters
- const llvm::MachineFunction* MF
¶void startNewBlock()
void startNewBlock()
Description
Set the current block to which generated machine instructions will be appended.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:248
¶bool tryToFoldLoad(
const llvm::LoadInst* LI,
const llvm::Instruction* FoldInst)
bool tryToFoldLoad(
const llvm::LoadInst* LI,
const llvm::Instruction* FoldInst)
Description
We're checking to see if we can fold \p LI into \p FoldInst. Note that we could have a sequence where multiple LLVM IR instructions are folded into the same machineinstr. For example we could have: A: x = load i32 *P B: y = icmp A, 42 C: br y, ... In this scenario, \p LI is "A", and \p FoldInst is "C". We know about "B" (and any other folded instructions) because it is between A and C. If we succeed folding, return true.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:296
Parameters
- const llvm::LoadInst* LI
- const llvm::Instruction* FoldInst
¶virtual bool tryToFoldLoadIntoMI(
llvm::MachineInstr*,
unsigned int,
const llvm::LoadInst*)
virtual bool tryToFoldLoadIntoMI(
llvm::MachineInstr*,
unsigned int,
const llvm::LoadInst*)
Description
The specified machine instr operand is a vreg, and that vreg is being provided by the specified load instruction. If possible, try to fold the load as an operand to the instruction, returning true if possible. This method should be implemented by targets.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:304
Parameters
- llvm::MachineInstr*
- unsigned int
- const llvm::LoadInst*
¶void updateValueMap(const llvm::Value* I,
unsigned int Reg,
unsigned int NumRegs = 1)
void updateValueMap(const llvm::Value* I,
unsigned int Reg,
unsigned int NumRegs = 1)
Description
Update the value map to include the new mapping for this instruction, or insert an extra copy to get the result in a previous determined register. NOTE: This is only necessary because we might select a block that uses a value before we select the block that defines the value. It might be possible to fix this by selecting blocks in reverse postorder.
Declared at: llvm/include/llvm/CodeGen/FastISel.h:469
Parameters
- const llvm::Value* I
- unsigned int Reg
- unsigned int NumRegs = 1
¶virtual ~FastISel()
virtual ~FastISel()
Declared at: llvm/include/llvm/CodeGen/FastISel.h:233