[llvm] [NewPM][CodeGen] Add `FunctionToMachineFunctionAnalysis` (PR #88610)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 22 10:47:10 PDT 2024


================
@@ -0,0 +1,50 @@
+//===- llvm/CodeGen/FunctionToMachineFunctionAnalysis.h ---------*- 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
+//
+//===----------------------------------------------------------------------===//
+//
+// This file declares the FunctionToMachineFunctionAnalysis class.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CODEGEN_FUNCTIONTOMACHINEFUNCTIONANALYSIS
+#define LLVM_CODEGEN_FUNCTIONTOMACHINEFUNCTIONANALYSIS
+
+#include "llvm/IR/PassManager.h"
+
+namespace llvm {
+
+class MachineFunction;
+class LLVMTargetMachine;
+
+/// This analysis create MachineFunction for given Function.
+/// To release the MachineFunction, users should invalidate it explicitly.
+class FunctionToMachineFunctionAnalysis
----------------
aeubanks wrote:

I'd prefer the previous `MachineFunctionAnalysis` over this tbh, this is more verbose for no benefit, plus is still similar to `FunctionToMachineFunctionAdaptor`. I really can't think of a better name :(. I'd go back to the previous name and perhaps if we find something better in the future we can rename it.

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


More information about the llvm-commits mailing list