23 if (
MI.isMetaInstruction() ||
MI.isTerminator())
27 for (
unsigned i = 0; i <
MI.getNumOperands(); i++) {
46 "Machine Block Hash Analysis",
true,
true)
85 uint64_t SuccHash = HashInfos[SuccMBB].OpcodeHash;
90 uint64_t PredHash = HashInfos[PredMBB].OpcodeHash;
93 HashInfos[&
MBB].NeighborHash = Hash;
98 const auto &HashInfo = HashInfos[&
MBB];
110 return MBBHashInfo[&
MBB];
uint64_t hashBlock(const MachineBasicBlock &MBB, bool HashOperands)
uint16_t fold_64_to_16(const uint64_t Value)
Fold a 64-bit integer to a 16-bit one.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
Represent the analysis usage information of a pass.
void setPreservesAll()
Set by analyses that do not transform their input at all.
bool runOnMachineFunction(MachineFunction &F) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
uint64_t getMBBHash(const MachineBasicBlock &MBB)
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Representation of each machine instruction.
static LLVM_ABI PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
LLVM Value Representation.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
uint64_t hash_16_bytes(uint64_t low, uint64_t high)
This is an optimization pass for GlobalISel generic memory operations.
hash_code hash_value(const FixedPointSemantics &Val)
LLVM_ABI void initializeMachineBlockHashInfoPass(PassRegistry &)
LLVM_ABI MachineFunctionPass * createMachineBlockHashInfoPass()
createMachineBlockHashInfoPass - This pass computes basic block hashes.
An object wrapping several components of a basic block hash.
uint64_t combine() const
Combine the blended hash into uint64_t.