1 //===- MachineFunctionInitalizer.h - machine function initializer ---------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares an interface that allows custom machine function
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_CODEGEN_MACHINEFUNCTIONINITIALIZER_H
16 #define LLVM_CODEGEN_MACHINEFUNCTIONINITIALIZER_H
20 class MachineFunction;
22 /// This interface provides a way to initialize machine functions after they are
23 /// created by the machine function analysis pass.
24 class MachineFunctionInitializer {
25 virtual void anchor();
28 virtual ~MachineFunctionInitializer() {}
30 /// Initialize the machine function.
32 /// Return true if error occurred.
33 virtual bool initializeMachineFunction(MachineFunction &MF) = 0;
36 } // end namespace llvm