[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineFunction.h

Chris Lattner lattner at cs.uiuc.edu
Tue Oct 29 18:47:01 PST 2002


Changes in directory llvm/include/llvm/CodeGen:

MachineFunction.h updated: 1.18 -> 1.19

---
Log message:

Improve comments, add methods for structured printing


---
Diffs of the changes:

Index: llvm/include/llvm/CodeGen/MachineFunction.h
diff -u llvm/include/llvm/CodeGen/MachineFunction.h:1.18 llvm/include/llvm/CodeGen/MachineFunction.h:1.19
--- llvm/include/llvm/CodeGen/MachineFunction.h:1.18	Tue Oct 29 17:40:30 2002
+++ llvm/include/llvm/CodeGen/MachineFunction.h	Tue Oct 29 18:46:31 2002
@@ -24,6 +24,7 @@
 
 Pass *createMachineCodeConstructionPass(TargetMachine &Target);
 Pass *createMachineCodeDestructionPass();
+Pass *createMachineFunctionPrinterPass();
 
 class MachineFunction : private Annotation {
   const Function *Fn;
@@ -49,12 +50,6 @@
 public:
   MachineFunction(const Function *Fn, const TargetMachine& target);
 
-
-  /// CalculateArgSize - Call this method to fill in the maxOptionalArgsSize &
-  /// staticStackSize fields...
-  ///
-  void CalculateArgSize();
-
   /// getFunction - Return the LLVM function that this machine code represents
   ///
   const Function *getFunction() const { return Fn; }
@@ -62,13 +57,29 @@
   /// getTarget - Return the target machine this machine code is compiled with
   ///
   const TargetMachine &getTarget() const { return Target; }
-  
-  // The next two methods are used to construct and to retrieve
-  // the MachineFunction object for the given method.
+
+  /// print - Print out the MachineFunction in a format suitable for debugging
+  /// to the specified stream.
+  ///
+  void print(std::ostream &OS) const;
+
+  /// dump - Print the current MachineFunction to cerr, useful for debugger use.
+  ///
+  void dump() const;
+
+  /// CalculateArgSize - Call this method to fill in the maxOptionalArgsSize &
+  /// staticStackSize fields...
+  ///
+  void CalculateArgSize();
+
+  // The next three methods are used to construct, destruct, and retrieve the
+  // MachineFunction object for the given method.
+  //
   // construct() -- Allocates and initializes for a given method and target
   // get()       -- Returns a handle to the object.
   //                This should not be called before "construct()"
   //                for a given Method.
+  // destruct()  -- Destroy the MachineFunction object
   // 
   static MachineFunction& construct(const Function *Fn,
                                     const TargetMachine &target);
@@ -157,8 +168,6 @@
   
   // int          getOffsetFromFP       (const Value* val) const;
   
-  void            dump                     () const;
-
 private:
   inline void     incrementAutomaticVarsSize(int incr) {
     automaticVarsSize+= incr;





More information about the llvm-commits mailing list