28 if (
F.isDeclaration())
31 auto IgnoreOp = [&](
const Instruction *
I,
unsigned OpndIdx) {
32 return I->getOpcode() == Instruction::Call &&
36 OS <<
"Function " <<
F.getName()
37 <<
" Hash: " <<
format(
"%016" PRIx64, FuncHashInfo.FunctionHash)
39 for (
auto &[
IndexPair, OpndHash] : *FuncHashInfo.IndexOperandHashMap) {
41 OS <<
"\tIgnored Operand Hash: " <<
format(
"%016" PRIx64, OpndHash)
42 <<
" at (" << InstIndex <<
"," << OpndIndex <<
")\n";
45 OS <<
"Function " <<
F.getName() <<
" Hash: "
Module.h This file contains the declarations for the Module class.
ModuleAnalysisManager MAM
A Module instance is used to store all the information related to an LLVM module.
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.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM)
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI FunctionHashInfo StructuralHashWithDifferences(const Function &F, IgnoreOperandFunc IgnoreOp)
Computes a structural hash of a given function, considering the structure and content of the function...
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
std::pair< unsigned, unsigned > IndexPair
The pair of an instruction index and a operand index.
LLVM_ABI stable_hash StructuralHash(const Function &F, bool DetailedHash=false)
Returns a hash of the function F.
@ Detailed
Hash with opcode only.
@ CallTargetIgnored
Hash with opcode and operands.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.