13#ifndef LLVM_CODEGEN_BASIC_BLOCK_AND_INFERENCE_H
14#define LLVM_CODEGEN_BASIC_BLOCK_AND_INFERENCE_H
30 using Edge = std::pair<const MachineBasicBlock *, const MachineBasicBlock *>;
38 BlockWeightMap BlockWeights;
40 EdgeWeightMap EdgeWeights;
49 return "Basic Block Matching and Inference";
54 bool doInitialization(
Module &M)
override;
56 bool doFinalization(
Module &M)
override;
58 std::optional<WeightInfo> getWeightInfo(
StringRef FuncName)
const;
64 std::unique_ptr<sampleprof::SampleProfileReader> SampleReader;
67 WeightInfo &MatchWeight);
73 WeightInfo &MatchWeight);
This file provides the interface for the profile inference algorithm, profi.
Represent the analysis usage information of a pass.
StringRef getPassName() const override
getPassName - Return a nice clean name for a pass.
BasicBlockMatchingAndInference()
~BasicBlockMatchingAndInference() override
MachineFunctionPass(char &ID)
A Module instance is used to store all the information related to an LLVM module.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.