[llvm] Adding Matching and Inference Functionality to Propeller-PR2 (PR #162963)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 21 02:14:52 PDT 2025


================
@@ -0,0 +1,123 @@
+//===- llvm/CodeGen/MachineBlockHashInfo.cpp---------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Compute the hashes of basic blocks.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/CodeGen/MachineBlockHashInfo.h"
+#include "llvm/CodeGen/Passes.h"
+#include "llvm/InitializePasses.h"
+#include "llvm/Target/TargetMachine.h"
+
+using namespace llvm;
+
+using OperandHashFuncTy =
+    function_ref<uint64_t(uint64_t &, const MachineOperand &)>;
+
+uint64_t hashBlock(const MachineBasicBlock &MBB,
+                   OperandHashFuncTy OperandHashFunc) {
----------------
wdx727 wrote:

Done.

https://github.com/llvm/llvm-project/pull/162963


More information about the llvm-commits mailing list