14#ifndef LLVM_CODEGEN_FASTISEL_H 
   15#define LLVM_CODEGEN_FASTISEL_H 
  118      Args = std::move(ArgsList);
 
 
  129                                unsigned FixedArgs = ~0U) {
 
  142      Args = std::move(ArgsList);
 
  143      NumFixedArgs = (FixedArgs == ~0U) ? FuncTy->getNumParams() : FixedArgs;
 
 
  152                                unsigned FixedArgs = ~0U) {
 
  156      Args = std::move(ArgsList);
 
 
  164                                unsigned FixedArgs = ~0U);
 
  168                                unsigned FixedArgs = ~0U) {
 
  172      Args = std::move(ArgsList);
 
 
 
  526    return MF->getFunction().hasOptSize();
 
 
  547  bool handlePHINodesInSuccessorBlocks(
const BasicBlock *LLVMBB);
 
  561  void flushLocalValueMap();
 
  564  void removeDeadLocalValueCode(
MachineInstr *SavedLastLocalValue);
 
  572                           const CallInst *CI, 
unsigned StartIdx);
 
  573  bool lowerCallOperands(
const CallInst *CI, 
unsigned ArgIdx, 
unsigned NumArgs,
 
  574                         const Value *Callee, 
bool ForceRetVoidTy,
 
  575                         CallLoweringInfo &CLI);
 
 
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
 
This file contains the simple types necessary to represent the attributes associated with functions a...
 
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
 
This file defines the DenseMap class.
 
const AbstractManglingParser< Derived, Alloc >::OperatorInfo AbstractManglingParser< Derived, Alloc >::Ops[]
 
Promote Memory to Register
 
uint64_t IntrinsicInst * II
 
static void addStackMapLiveVars(const CallBase &Call, unsigned StartIdx, const SDLoc &DL, SmallVectorImpl< SDValue > &Ops, SelectionDAGBuilder &Builder)
Add a stack map intrinsic call's live variable operands to a stackmap or patchpoint target node's ope...
 
This file defines the SmallVector class.
 
This file describes how to lower LLVM code to machine code.
 
an instruction to allocate memory on the stack
 
LLVM Basic Block Representation.
 
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
 
This class represents a function call, abstracting a target machine's calling convention.
 
This class is the base class for the comparison instructions.
 
Predicate
This enumeration lists the possible predicates for CmpInst subclasses.
 
ConstantFP - Floating Point Values [float, double].
 
This is an important base class in LLVM.
 
A parsed version of the target data layout string in and methods for querying it.
 
MachineRegisterInfo & MRI
 
const TargetLibraryInfo * LibInfo
 
bool selectGetElementPtr(const User *I)
 
void setLastLocalValue(MachineInstr *I)
Update the position of the last instruction emitted for materializing constants for use in the curren...
 
bool selectStackmap(const CallInst *I)
 
Register fastEmitInst_ri(unsigned MachineInstOpcode, const TargetRegisterClass *RC, Register Op0, uint64_t Imm)
Emit a MachineInstr with a register operand, an immediate, and a result register in the given registe...
 
bool selectExtractValue(const User *U)
 
DenseMap< const Value *, Register > LocalValueMap
 
void fastEmitBranch(MachineBasicBlock *MSucc, const DebugLoc &DbgLoc)
Emit an unconditional branch to the given block, unless it is the immediate (fall-through) successor,...
 
MachineInstr * EmitStartPt
The top most instruction in the current block that is allowed for emitting local variables.
 
bool selectXRayCustomEvent(const CallInst *II)
 
virtual Register fastEmit_r(MVT VT, MVT RetVT, unsigned Opcode, Register Op0)
This method is called by target-independent code to request that an instruction with the given type,...
 
Register fastEmitInst_(unsigned MachineInstOpcode, const TargetRegisterClass *RC)
Emit a MachineInstr with no operands and a result register in the given register class.
 
Register fastEmitInst_rr(unsigned MachineInstOpcode, const TargetRegisterClass *RC, Register Op0, Register Op1)
Emit a MachineInstr with two register operands and a result register in the given register class.
 
virtual Register fastEmit_rr(MVT VT, MVT RetVT, unsigned Opcode, Register Op0, Register Op1)
This method is called by target-independent code to request that an instruction with the given type,...
 
virtual bool fastLowerIntrinsicCall(const IntrinsicInst *II)
This method is called by target-independent code to do target- specific intrinsic lowering.
 
virtual bool lowerDbgDeclare(const Value *V, DIExpression *Expr, DILocalVariable *Var, const DebugLoc &DL)
Target-independent lowering of debug information.
 
MachineInstr * getLastLocalValue()
Return the position of the last instruction emitted for materializing constants for use in the curren...
 
bool lowerCall(const CallInst *I)
 
void leaveLocalValueArea(SavePoint Old)
Reset InsertPt to the given old insert position.
 
virtual Register fastMaterializeConstant(const Constant *C)
Emit a constant in a register using target-specific logic, such as constant pool loads.
 
Register fastEmitInst_rrr(unsigned MachineInstOpcode, const TargetRegisterClass *RC, Register Op0, Register Op1, Register Op2)
Emit a MachineInstr with three register operands and a result register in the given register class.
 
bool lowerCallTo(const CallInst *CI, MCSymbol *Symbol, unsigned NumArgs)
 
virtual Register fastEmit_i(MVT VT, MVT RetVT, unsigned Opcode, uint64_t Imm)
This method is called by target-independent code to request that an instruction with the given type,...
 
virtual Register fastEmit_f(MVT VT, MVT RetVT, unsigned Opcode, const ConstantFP *FPImm)
This method is called by target-independent code to request that an instruction with the given type,...
 
void handleDbgInfo(const Instruction *II)
Target-independent lowering of non-instruction debug info associated with this instruction.
 
bool selectFreeze(const User *I)
 
bool selectIntrinsicCall(const IntrinsicInst *II)
 
Register getRegForGEPIndex(MVT PtrVT, const Value *Idx)
This is a wrapper around getRegForValue that also takes care of truncating or sign-extending the give...
 
bool selectCast(const User *I, unsigned Opcode)
 
bool tryToFoldLoad(const LoadInst *LI, const Instruction *FoldInst)
We're checking to see if we can fold LI into FoldInst.
 
Register getRegForValue(const Value *V)
Create a virtual register and arrange for it to be assigned the value for the given LLVM value.
 
void removeDeadCode(MachineBasicBlock::iterator I, MachineBasicBlock::iterator E)
Remove all dead instructions between the I and E.
 
virtual Register fastMaterializeFloatZero(const ConstantFP *CF)
Emit the floating-point constant +0.0 in a register using target- specific logic.
 
void startNewBlock()
Set the current block to which generated machine instructions will be appended.
 
MachineMemOperand * createMachineMemOperandFor(const Instruction *I) const
Create a machine mem operand from the given instruction.
 
virtual bool tryToFoldLoadIntoMI(MachineInstr *, unsigned, const LoadInst *)
The specified machine instr operand is a vreg, and that vreg is being provided by the specified load ...
 
Register fastEmitInst_i(unsigned MachineInstOpcode, const TargetRegisterClass *RC, uint64_t Imm)
Emit a MachineInstr with a single immediate operand, and a result register in the given register clas...
 
Register fastEmitInst_rii(unsigned MachineInstOpcode, const TargetRegisterClass *RC, Register Op0, uint64_t Imm1, uint64_t Imm2)
Emit a MachineInstr with one register operand and two immediate operands.
 
bool canFoldAddIntoGEP(const User *GEP, const Value *Add)
Check if Add is an add that can be safely folded into GEP.
 
virtual bool lowerDbgValue(const Value *V, DIExpression *Expr, DILocalVariable *Var, const DebugLoc &DL)
Target-independent lowering of debug information.
 
TargetLoweringBase::ArgListTy ArgListTy
 
bool selectInstruction(const Instruction *I)
Do "fast" instruction selection for the given LLVM IR instruction and append the generated machine in...
 
virtual bool fastLowerCall(CallLoweringInfo &CLI)
This method is called by target-independent code to do target- specific call lowering.
 
bool selectXRayTypedEvent(const CallInst *II)
 
virtual Register fastMaterializeAlloca(const AllocaInst *C)
Emit an alloca address in a register using target-specific logic.
 
Register fastEmitZExtFromI1(MVT VT, Register Op0)
Emit MachineInstrs to compute the value of Op with all but the least significant bit set to zero.
 
DebugLoc getCurDebugLoc() const
Return current debug location information.
 
Register createResultReg(const TargetRegisterClass *RC)
 
virtual bool fastLowerArguments()
This method is called by target-independent code to do target- specific argument lowering.
 
bool selectFNeg(const User *I, const Value *In)
Emit an FNeg operation.
 
const TargetInstrInfo & TII
 
bool selectCall(const User *I)
 
Register lookUpRegForValue(const Value *V)
Look up the value to see if its value is already cached in a register.
 
CmpInst::Predicate optimizeCmpPredicate(const CmpInst *CI) const
 
virtual Register fastEmit_(MVT VT, MVT RetVT, unsigned Opcode)
This method is called by target-independent code to request that an instruction with the given type a...
 
void finishBasicBlock()
Flush the local value map.
 
Register fastEmitInst_r(unsigned MachineInstOpcode, const TargetRegisterClass *RC, Register Op0)
Emit a MachineInstr with one register operand and a result register in the given register class.
 
Register fastEmitInst_rri(unsigned MachineInstOpcode, const TargetRegisterClass *RC, Register Op0, Register Op1, uint64_t Imm)
Emit a MachineInstr with two register operands, an immediate, and a result register in the given regi...
 
FunctionLoweringInfo & FuncInfo
 
MachineConstantPool & MCP
 
bool selectOperator(const User *I, unsigned Opcode)
Do "fast" instruction selection for the given LLVM IR operator (Instruction or ConstantExpr),...
 
bool SkipTargetIndependentISel
 
Register fastEmitInst_f(unsigned MachineInstOpcode, const TargetRegisterClass *RC, const ConstantFP *FPImm)
Emit a MachineInstr with a floating point immediate, and a result register in the given register clas...
 
Register constrainOperandRegClass(const MCInstrDesc &II, Register Op, unsigned OpNum)
Try to constrain Op so that it is usable by argument OpNum of the provided MCInstrDesc.
 
MachineBasicBlock::iterator SavePoint
 
Register fastEmitInst_extractsubreg(MVT RetVT, Register Op0, uint32_t Idx)
Emit a MachineInstr for an extract_subreg from a specified index of a superregister to a specified ty...
 
void updateValueMap(const Value *I, Register Reg, unsigned NumRegs=1)
Update the value map to include the new mapping for this instruction, or insert an extra copy to get ...
 
bool selectBinaryOp(const User *I, unsigned ISDOpcode)
Select and emit code for a binary operator instruction, which has an opcode which directly correspond...
 
FastISel(FunctionLoweringInfo &FuncInfo, const TargetLibraryInfo *LibInfo, bool SkipTargetIndependentISel=false)
 
bool selectPatchpoint(const CallInst *I)
 
void recomputeInsertPt()
Reset InsertPt to prepare for inserting instructions into the current block.
 
virtual bool fastSelectInstruction(const Instruction *I)=0
This method is called by target-independent code when the normal FastISel process fails to select an ...
 
const TargetLowering & TLI
 
virtual Register fastEmit_ri(MVT VT, MVT RetVT, unsigned Opcode, Register Op0, uint64_t Imm)
This method is called by target-independent code to request that an instruction with the given type,...
 
bool shouldOptForSize(const MachineFunction *MF) const
 
MachineInstr * LastLocalValue
The position of the last instruction for materializing constants for use in the current block.
 
bool lowerArguments()
Do "fast" instruction selection for function arguments and append the machine instructions to the cur...
 
SavePoint enterLocalValueArea()
Prepare InsertPt to begin inserting instructions into the local value area and return the old insert ...
 
void finishCondBranch(const BasicBlock *BranchBB, MachineBasicBlock *TrueMBB, MachineBasicBlock *FalseMBB)
Emit an unconditional branch to FalseMBB, obtains the branch weight and adds TrueMBB and FalseMBB to ...
 
bool selectBitCast(const User *I)
 
Register fastEmit_ri_(MVT VT, unsigned Opcode, Register Op0, uint64_t Imm, MVT ImmType)
This method is a wrapper of fastEmit_ri.
 
const TargetRegisterInfo & TRI
 
TargetLoweringBase::ArgListEntry ArgListEntry
 
FunctionLoweringInfo - This contains information that is global to a function that is used when lower...
 
Class to represent function types.
 
A wrapper class for inspecting calls to intrinsic functions.
 
An instruction for reading from memory.
 
Context object for machine code objects.
 
Describe properties that are true of each instruction in the target description file.
 
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
 
MachineInstrBundleIterator< MachineInstr > iterator
 
The MachineConstantPool class keeps track of constants referenced by a function which must be spilled...
 
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
 
Representation of each machine instruction.
 
A description of a memory reference used in the backend.
 
MachineOperand class - Representation of each machine instruction operand.
 
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
 
Wrapper class representing virtual and physical registers.
 
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
 
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
 
StringRef - Represent a constant reference to a string, i.e.
 
TargetInstrInfo - Interface to description of machine instruction set.
 
Provides information about what library functions are available for the current target.
 
std::vector< ArgListEntry > ArgListTy
 
This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...
 
Primary interface to the complete machine description for the target machine.
 
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
 
Target - Wrapper for Target specific information.
 
The instances of the Type class are immutable: once they are created, they are never changed.
 
LLVM Value Representation.
 
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
 
@ C
The default llvm calling convention, compatible with C.
 
This is an optimization pass for GlobalISel generic memory operations.
 
DWARFExpression::Operation Op
 
SmallVector< ISD::ArgFlagsTy, 16 > OutFlags
 
SmallVector< Value *, 16 > OutVals
 
CallLoweringInfo & setCallee(CallingConv::ID CC, Type *ResultTy, MCSymbol *Target, ArgListTy &&ArgsList, unsigned FixedArgs=~0U)
 
SmallVector< Register, 16 > OutRegs
 
CallLoweringInfo & setCallee(Type *ResultTy, FunctionType *FuncTy, MCSymbol *Target, ArgListTy &&ArgsList, const CallBase &Call, unsigned FixedArgs=~0U)
 
CallLoweringInfo & setTailCall(bool Value=true)
 
CallLoweringInfo & setCallee(CallingConv::ID CC, Type *ResultTy, const Value *Target, ArgListTy &&ArgsList, unsigned FixedArgs=~0U)
 
SmallVector< Register, 4 > InRegs
 
CallLoweringInfo & setIsPatchPoint(bool Value=true)
 
CallLoweringInfo & setCallee(Type *ResultTy, FunctionType *FuncTy, const Value *Target, ArgListTy &&ArgsList, const CallBase &Call)
 
SmallVector< ISD::InputArg, 4 > Ins