30#define CM_NAME "cost-model"
31#define DEBUG_TYPE CM_NAME
41 Opts.intrinsic_cost_strategy ==
43 return TTI.getIntrinsicInstrCost(ICA, CostKind);
46 return TTI.getInstructionCost(&Inst, CostKind);
69 OS <<
"Printing analysis 'Cost Model Analysis' for function '" <<
F.getName() <<
"':\n";
74 OS <<
"Found costs of ";
81 if (RThru ==
CodeSize && RThru == Lat && RThru == SizeLat)
84 OS <<
"RThru:" << RThru <<
" CodeSize:" <<
CodeSize <<
" Lat:" << Lat
85 <<
" SizeLat:" << SizeLat;
86 OS <<
" for: " << Inst <<
"\n";
91 OS <<
"Found an estimated cost of " <<
Cost;
94 OS <<
" for instruction: " << Inst <<
"\n";
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static TTI::TargetCostKind OutputCostKindToTargetCostKind(OutputCostKind CostKind)
static InstructionCost getCost(const AnalysisOptions &Opts, Instruction &Inst, TTI::TargetCostKind CostKind, TargetTransformInfo &TTI)
This header defines various interfaces for pass management in LLVM.
uint64_t IntrinsicInst * II
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
LLVM Basic Block Representation.
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
static InstructionCost getInvalid(CostType Val=0)
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
Analysis pass providing the TargetTransformInfo.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
const AnalysisOptions & getAnalysisOptions(const LLVMContext &C)
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.