llvm::FastISel

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.

Synopsis

Declared in <llvm/CodeGen/FastISel.h>

class FastISel;

Types

NameDescription
CallLoweringInfo Holds the information needed to lower a call in FastISel.

Type Aliases

NameDescription
ArgListEntry A single argument in a FastISel call argument list.
ArgListTy A list of arguments for a call being lowered.
SavePoint Saved insert point for restoring after local-value emission.

Member Functions

NameDescription
~FastISel [destructor] [virtual]Destroy the FastISel instance.
enterLocalValueArea Prepare InsertPt to begin inserting instructions into the local value area and return the old insert position.
finishBasicBlock Flush the local value map.
getCurDebugLoc Return current debug location information.
getLastLocalValue Return the position of the last instruction emitted for materializing constants for use in the current block.
getRegForGEPIndex This is a wrapper around getRegForValue that also takes care of truncating or sign-extending the given getelementptr index value.
getRegForValue Create a virtual register and arrange for it to be assigned the value for the given LLVM value.
handleDbgInfo Target-independent lowering of non-instruction debug info associated with this instruction.
leaveLocalValueArea Reset InsertPt to the given old insert position.
lookUpRegForValue 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.
lowerArguments Do "fast" instruction selection for function arguments and append the machine instructions to the current block. Returns true when successful.
recomputeInsertPt Reset InsertPt to prepare for inserting instructions into the current block.
removeDeadCode Remove all dead instructions between the I and E.
selectInstruction Select an LLVM IR instruction into the current machine block.
selectOperator Select an LLVM IR operator into the current machine block.
setLastLocalValue Update the position of the last instruction emitted for materializing constants for use in the current block.
startNewBlock Set the current block to which generated machine instructions will be appended.
tryToFoldLoad Try to fold a load into a later instruction.
tryToFoldLoadIntoMI [virtual]Try to fold a load into an operand of a machine instruction.

Protected Member Functions

NameDescription
FastISel [constructor]Construct a FastISel for the given function lowering state.
canFoldAddIntoGEP Check if Add is an add that can be safely folded into GEP.
constrainOperandRegClass Constrain a register operand to the class an instruction requires.
createMachineMemOperandFor Create a machine mem operand from the given instruction.
createResultReg Create a virtual register in the given register class.
fastEmitBranch Emit an unconditional branch to the given block, unless it is the immediate (fall-through) successor, and update the CFG.
fastEmitInst_ Emit a MachineInstr with no operands and a result register in the given register class.
fastEmitInst_extractsubreg Emit a MachineInstr for an extract_subreg from a specified index of a superregister to a specified type.
fastEmitInst_f Emit a MachineInstr with a floating point immediate, and a result register in the given register class.
fastEmitInst_i Emit a MachineInstr with a single immediate operand, and a result register in the given register class.
fastEmitInst_r Emit a MachineInstr with one register operand and a result register in the given register class.
fastEmitInst_ri Emit a MachineInstr with a register operand, an immediate, and a result register in the given register class.
fastEmitInst_rii Emit a MachineInstr with one register operand and two immediate operands.
fastEmitInst_rr Emit a MachineInstr with two register operands and a result register in the given register class.
fastEmitInst_rri Emit a MachineInstr with two register operands, an immediate, and a result register in the given register class.
fastEmitInst_rrr Emit a MachineInstr with three register operands and a result register in the given register class.
fastEmitZExtFromI1 Emit MachineInstrs to compute the value of Op with all but the least significant bit set to zero.
fastEmit_ [virtual]This method is called by target-independent code to request that an instruction with the given type and opcode be emitted.
fastEmit_f [virtual]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.
fastEmit_i [virtual]This method is called by target-independent code to request that an instruction with the given type, opcode, and immediate operand be emitted.
fastEmit_r [virtual]This method is called by target-independent code to request that an instruction with the given type, opcode, and register operand be emitted.
fastEmit_ri [virtual]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.
fastEmit_ri_ This method is a wrapper of fastEmit_ri.
fastEmit_rr [virtual]This method is called by target-independent code to request that an instruction with the given type, opcode, and register operands be emitted.
fastLowerArguments [virtual]This method is called by target-independent code to do target- specific argument lowering. It returns true if it was successful.
fastLowerCall [virtual]This method is called by target-independent code to do target- specific call lowering. It returns true if it was successful.
fastLowerIntrinsicCall [virtual]This method is called by target-independent code to do target- specific intrinsic lowering. It returns true if it was successful.
fastMaterializeAlloca [virtual]Emit an alloca address in a register using target-specific logic.
fastMaterializeConstant [virtual]Emit a constant in a register using target-specific logic, such as constant pool loads.
fastMaterializeFloatZero [virtual]Emit the floating-point constant +0.0 in a register using target- specific logic.
fastSelectInstruction [virtual]Select an instruction that generic FastISel could not handle.
finishCondBranch Emit an unconditional branch to FalseMBB, obtains the branch weight and adds TrueMBB and FalseMBB to the successor list.
lowerCall Lower an IR call instruction.
lowerCallTo lowerCallTo overloads
lowerDbgDeclare [virtual]Target-independent lowering of debug information. Returns false if the debug information couldn't be lowered and was instead discarded.
lowerDbgValue [virtual]Target-independent lowering of debug information. Returns false if the debug information couldn't be lowered and was instead discarded.
optimizeCmpPredicate Fold a compare of a value against itself to a simpler predicate.
selectBinaryOp Select and emit code for a binary operator instruction, which has an opcode which directly corresponds to the given ISD opcode.
selectBitCast Select a bitcast instruction or constant expression.
selectCall Select a call instruction, including simple inline assembly.
selectCast Select a cast instruction with the given ISD opcode.
selectExtractValue Select an extractvalue instruction.
selectFNeg Select a floating-point negation.
selectFreeze Select a freeze instruction.
selectGetElementPtr Select a getelementptr instruction or constant expression.
selectIntrinsicCall Select an intrinsic call, or defer it to target-specific lowering.
selectPatchpoint Select an llvm.experimental.patchpoint intrinsic call.
selectStackmap Select an llvm.experimental.stackmap intrinsic call.
selectXRayCustomEvent Select an llvm.xray.customevent intrinsic call.
selectXRayTypedEvent Select an llvm.xray.typedevent intrinsic call.
shouldOptForSize Check whether the function should be optimized for size.
updateValueMap 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.

Protected Data Members

NameDescription
DL Data layout of the current module.
EmitStartPt First instruction in the block that may emit local values.
FuncInfo Per-function lowering state shared with SelectionDAG ISel.
LastLocalValue Last instruction that materialized a constant in this block.
LibInfo Target library information for the current function.
LibcallLowering Libcall lowering information for the current target.
LocalValueMap Map from IR values to registers materialized in the current block.
MCP Constant pool for the current machine function.
MF Machine function currently being selected.
MFI Frame information for the current machine function.
MIMD Metadata attached to newly created machine instructions.
MRI Register information for the current machine function.
SkipTargetIndependentISel If true, skip generic FastISel and use only the target hook.
TII Target instruction information for the current subtarget.
TLI Target lowering interface for the current subtarget.
TM Target machine for the current compilation.
TRI Target register information for the current subtarget.