Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.3 KiB

  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. #ifndef LLVM_CODEGEN_MACHINEFUNCTIONANALYSIS_H
  14. #define LLVM_CODEGEN_MACHINEFUNCTIONANALYSIS_H
  15. #include "llvm/Pass.h"
  16. namespace llvm {
  17. class MachineFunction;
  18. class TargetMachine;
  19. /// MachineFunctionAnalysis - This class is a Pass that manages a
  20. /// MachineFunction object.
  21. struct MachineFunctionAnalysis : public FunctionPass {
  22. private:
  23. const TargetMachine &TM;
  24. MachineFunction *MF;
  25. unsigned NextFnNum;
  26. public:
  27. static char ID;
  28. explicit MachineFunctionAnalysis(const TargetMachine &tm);
  29. ~MachineFunctionAnalysis();
  30. MachineFunction &getMF() const { return *MF; }
  31. virtual const char* getPassName() const {
  32. return "Machine Function Analysis";
  33. }
  34. private:
  35. virtual bool doInitialization(Module &M);
  36. virtual bool runOnFunction(Function &F);
  37. virtual void releaseMemory();
  38. virtual void getAnalysisUsage(AnalysisUsage &AU) const;
  39. };
  40. } // End llvm namespace
  41. #endif