LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MachineFunctionAnalysis.h
Go to the documentation of this file.
1 //===-- MachineFunctionAnalysis.h - Owner of MachineFunctions ----*-C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the MachineFunctionAnalysis class.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CODEGEN_MACHINEFUNCTIONANALYSIS_H
15 #define LLVM_CODEGEN_MACHINEFUNCTIONANALYSIS_H
16 
17 #include "llvm/Pass.h"
18 
19 namespace llvm {
20 
21 class MachineFunction;
22 class TargetMachine;
23 
24 /// MachineFunctionAnalysis - This class is a Pass that manages a
25 /// MachineFunction object.
27 private:
28  const TargetMachine &TM;
29  MachineFunction *MF;
30  unsigned NextFnNum;
31 public:
32  static char ID;
33  explicit MachineFunctionAnalysis(const TargetMachine &tm);
35 
36  MachineFunction &getMF() const { return *MF; }
37 
38  virtual const char* getPassName() const {
39  return "Machine Function Analysis";
40  }
41 
42 private:
43  virtual bool doInitialization(Module &M);
44  virtual bool runOnFunction(Function &F);
45  virtual void releaseMemory();
46  virtual void getAnalysisUsage(AnalysisUsage &AU) const;
47 };
48 
49 } // End llvm namespace
50 
51 #endif
The main container class for the LLVM Intermediate Representation.
Definition: Module.h:112
virtual const char * getPassName() const
F(f)
MachineFunction & getMF() const
MachineFunctionAnalysis(const TargetMachine &tm)