LLVM 20.0.0git
Public Member Functions | Friends | List of all members
llvm::InstCostVisitor Class Reference

#include "llvm/Transforms/IPO/FunctionSpecialization.h"

Inheritance diagram for llvm::InstCostVisitor:
Inheritance graph
[legend]

Public Member Functions

 InstCostVisitor (const DataLayout &DL, BlockFrequencyInfo &BFI, TargetTransformInfo &TTI, SCCPSolver &Solver)
 
bool isBlockExecutable (BasicBlock *BB)
 
Bonus getSpecializationBonus (Argument *A, Constant *C)
 Compute a bonus for replacing argument A with constant C.
 
Bonus getBonusFromPendingPHIs ()
 
- Public Member Functions inherited from llvm::InstVisitor< InstCostVisitor, Constant * >
void visit (Iterator Start, Iterator End)
 
void visit (Module &M)
 
void visit (Function &F)
 
void visit (BasicBlock &BB)
 
void visit (Module *M)
 
void visit (Function *F)
 
void visit (BasicBlock *BB)
 
Constantvisit (Instruction *I)
 
Constantvisit (Instruction &I)
 
void visitModule (Module &M)
 
void visitFunction (Function &F)
 
void visitBasicBlock (BasicBlock &BB)
 
ConstantvisitICmpInst (ICmpInst &I)
 
ConstantvisitFCmpInst (FCmpInst &I)
 
ConstantvisitAllocaInst (AllocaInst &I)
 
ConstantvisitLoadInst (LoadInst &I)
 
ConstantvisitStoreInst (StoreInst &I)
 
ConstantvisitAtomicCmpXchgInst (AtomicCmpXchgInst &I)
 
ConstantvisitAtomicRMWInst (AtomicRMWInst &I)
 
ConstantvisitFenceInst (FenceInst &I)
 
ConstantvisitGetElementPtrInst (GetElementPtrInst &I)
 
ConstantvisitPHINode (PHINode &I)
 
ConstantvisitTruncInst (TruncInst &I)
 
ConstantvisitZExtInst (ZExtInst &I)
 
ConstantvisitSExtInst (SExtInst &I)
 
ConstantvisitFPTruncInst (FPTruncInst &I)
 
ConstantvisitFPExtInst (FPExtInst &I)
 
ConstantvisitFPToUIInst (FPToUIInst &I)
 
ConstantvisitFPToSIInst (FPToSIInst &I)
 
ConstantvisitUIToFPInst (UIToFPInst &I)
 
ConstantvisitSIToFPInst (SIToFPInst &I)
 
ConstantvisitPtrToIntInst (PtrToIntInst &I)
 
ConstantvisitIntToPtrInst (IntToPtrInst &I)
 
ConstantvisitBitCastInst (BitCastInst &I)
 
ConstantvisitAddrSpaceCastInst (AddrSpaceCastInst &I)
 
ConstantvisitSelectInst (SelectInst &I)
 
ConstantvisitVAArgInst (VAArgInst &I)
 
ConstantvisitExtractElementInst (ExtractElementInst &I)
 
ConstantvisitInsertElementInst (InsertElementInst &I)
 
ConstantvisitShuffleVectorInst (ShuffleVectorInst &I)
 
ConstantvisitExtractValueInst (ExtractValueInst &I)
 
ConstantvisitInsertValueInst (InsertValueInst &I)
 
ConstantvisitLandingPadInst (LandingPadInst &I)
 
ConstantvisitFuncletPadInst (FuncletPadInst &I)
 
ConstantvisitCleanupPadInst (CleanupPadInst &I)
 
ConstantvisitCatchPadInst (CatchPadInst &I)
 
ConstantvisitFreezeInst (FreezeInst &I)
 
ConstantvisitDbgDeclareInst (DbgDeclareInst &I)
 
ConstantvisitDbgValueInst (DbgValueInst &I)
 
ConstantvisitDbgVariableIntrinsic (DbgVariableIntrinsic &I)
 
ConstantvisitDbgLabelInst (DbgLabelInst &I)
 
ConstantvisitDbgInfoIntrinsic (DbgInfoIntrinsic &I)
 
ConstantvisitMemSetInst (MemSetInst &I)
 
ConstantvisitMemSetInlineInst (MemSetInlineInst &I)
 
ConstantvisitMemCpyInst (MemCpyInst &I)
 
ConstantvisitMemCpyInlineInst (MemCpyInlineInst &I)
 
ConstantvisitMemMoveInst (MemMoveInst &I)
 
ConstantvisitMemTransferInst (MemTransferInst &I)
 
ConstantvisitMemIntrinsic (MemIntrinsic &I)
 
ConstantvisitVAStartInst (VAStartInst &I)
 
ConstantvisitVAEndInst (VAEndInst &I)
 
ConstantvisitVACopyInst (VACopyInst &I)
 
ConstantvisitIntrinsicInst (IntrinsicInst &I)
 
ConstantvisitCallInst (CallInst &I)
 
ConstantvisitInvokeInst (InvokeInst &I)
 
ConstantvisitCallBrInst (CallBrInst &I)
 
ConstantvisitReturnInst (ReturnInst &I)
 
ConstantvisitBranchInst (BranchInst &I)
 
ConstantvisitSwitchInst (SwitchInst &I)
 
ConstantvisitIndirectBrInst (IndirectBrInst &I)
 
ConstantvisitResumeInst (ResumeInst &I)
 
ConstantvisitUnreachableInst (UnreachableInst &I)
 
ConstantvisitCleanupReturnInst (CleanupReturnInst &I)
 
ConstantvisitCatchReturnInst (CatchReturnInst &I)
 
ConstantvisitCatchSwitchInst (CatchSwitchInst &I)
 
ConstantvisitTerminator (Instruction &I)
 
ConstantvisitCastInst (CastInst &I)
 
ConstantvisitUnaryOperator (UnaryOperator &I)
 
ConstantvisitBinaryOperator (BinaryOperator &I)
 
ConstantvisitCmpInst (CmpInst &I)
 
ConstantvisitUnaryInstruction (UnaryInstruction &I)
 
ConstantvisitCallBase (CallBase &I)
 
void visitInstruction (Instruction &I)
 

Friends

class InstVisitor< InstCostVisitor, Constant * >
 

Detailed Description

Definition at line 175 of file FunctionSpecialization.h.

Constructor & Destructor Documentation

◆ InstCostVisitor()

llvm::InstCostVisitor::InstCostVisitor ( const DataLayout DL,
BlockFrequencyInfo BFI,
TargetTransformInfo TTI,
SCCPSolver Solver 
)
inline

Definition at line 195 of file FunctionSpecialization.h.

References DL.

Member Function Documentation

◆ getBonusFromPendingPHIs()

Bonus InstCostVisitor::getBonusFromPendingPHIs ( )

Definition at line 157 of file FunctionSpecialization.cpp.

References B, and isBlockExecutable().

◆ getSpecializationBonus()

Bonus InstCostVisitor::getSpecializationBonus ( Argument A,
Constant C 
)

Compute a bonus for replacing argument A with constant C.

Definition at line 169 of file FunctionSpecialization.cpp.

References A, B, llvm::CallingConv::C, llvm::dbgs(), isBlockExecutable(), and LLVM_DEBUG.

◆ isBlockExecutable()

bool llvm::InstCostVisitor::isBlockExecutable ( BasicBlock BB)
inline

Friends And Related Function Documentation

◆ InstVisitor< InstCostVisitor, Constant * >

friend class InstVisitor< InstCostVisitor, Constant * >
friend

Definition at line 205 of file FunctionSpecialization.h.


The documentation for this class was generated from the following files: