summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-30 00:46:31 +0000
committerChris Lattner <sabre@nondot.org>2002-10-30 00:46:31 +0000
commitdea73839f69b004314d223f75d136551132108cc (patch)
treeb14c097366003bf10bef89542cd4bd0656fb27c5 /include
parenta22026a6651e3a8fd6c98fb510617114f8f220a6 (diff)
downloadllvm-dea73839f69b004314d223f75d136551132108cc.tar.gz
llvm-dea73839f69b004314d223f75d136551132108cc.tar.bz2
llvm-dea73839f69b004314d223f75d136551132108cc.tar.xz
Improve comments, add methods for structured printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4431 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineFunction.h31
1 files changed, 20 insertions, 11 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index e2af5210d9..4f2f8d898c 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -24,6 +24,7 @@ class Pass;
Pass *createMachineCodeConstructionPass(TargetMachine &Target);
Pass *createMachineCodeDestructionPass();
+Pass *createMachineFunctionPrinterPass();
class MachineFunction : private Annotation {
const Function *Fn;
@@ -49,12 +50,6 @@ class MachineFunction : private Annotation {
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 @@ public:
/// 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 @@ public:
// int getOffsetFromFP (const Value* val) const;
- void dump () const;
-
private:
inline void incrementAutomaticVarsSize(int incr) {
automaticVarsSize+= incr;