PseudoSourceValue: Replace global manager with a manager in a machine function.
[oota-llvm.git] / include / llvm / CodeGen / MachineFunction.h
index 6297defb1c5c4b840b3ebb343eb5742f21b5ad7c..9a253226a1c7cf4d5553f04027d6e23d0d3a9645 100644 (file)
@@ -38,6 +38,7 @@ class MachineJumpTableInfo;
 class MachineModuleInfo;
 class MCContext;
 class Pass;
+class PseudoSourceValueManager;
 class TargetMachine;
 class TargetSubtargetInfo;
 class TargetRegisterClass;
@@ -145,6 +146,9 @@ class MachineFunction {
   /// True if the function includes any inline assembly.
   bool HasInlineAsm;
 
+  // Allocation management for pseudo source values.
+  std::unique_ptr<PseudoSourceValueManager> PSVManager;
+
   MachineFunction(const MachineFunction &) = delete;
   void operator=(const MachineFunction&) = delete;
 public:
@@ -155,6 +159,8 @@ public:
   MachineModuleInfo &getMMI() const { return MMI; }
   MCContext &getContext() const { return Ctx; }
 
+  PseudoSourceValueManager &getPSVManager() const { return *PSVManager; }
+
   /// Return the DataLayout attached to the Module associated to this MF.
   const DataLayout &getDataLayout() const;