llvm.org GIT mirror llvm / dea7383
Improve comments, add methods for structured printing git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4431 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 18 years ago
1 changed file(s) with 20 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
2323
2424 Pass *createMachineCodeConstructionPass(TargetMachine &Target);
2525 Pass *createMachineCodeDestructionPass();
26 Pass *createMachineFunctionPrinterPass();
2627
2728 class MachineFunction : private Annotation {
2829 const Function *Fn;
4849 public:
4950 MachineFunction(const Function *Fn, const TargetMachine& target);
5051
51
52 /// CalculateArgSize - Call this method to fill in the maxOptionalArgsSize &
53 /// staticStackSize fields...
54 ///
55 void CalculateArgSize();
56
5752 /// getFunction - Return the LLVM function that this machine code represents
5853 ///
5954 const Function *getFunction() const { return Fn; }
6156 /// getTarget - Return the target machine this machine code is compiled with
6257 ///
6358 const TargetMachine &getTarget() const { return Target; }
64
65 // The next two methods are used to construct and to retrieve
66 // the MachineFunction object for the given method.
59
60 /// print - Print out the MachineFunction in a format suitable for debugging
61 /// to the specified stream.
62 ///
63 void print(std::ostream &OS) const;
64
65 /// dump - Print the current MachineFunction to cerr, useful for debugger use.
66 ///
67 void dump() const;
68
69 /// CalculateArgSize - Call this method to fill in the maxOptionalArgsSize &
70 /// staticStackSize fields...
71 ///
72 void CalculateArgSize();
73
74 // The next three methods are used to construct, destruct, and retrieve the
75 // MachineFunction object for the given method.
76 //
6777 // construct() -- Allocates and initializes for a given method and target
6878 // get() -- Returns a handle to the object.
6979 // This should not be called before "construct()"
7080 // for a given Method.
81 // destruct() -- Destroy the MachineFunction object
7182 //
7283 static MachineFunction& construct(const Function *Fn,
7384 const TargetMachine &target);
156167
157168 // int getOffsetFromFP (const Value* val) const;
158169
159 void dump () const;
160
161170 private:
162171 inline void incrementAutomaticVarsSize(int incr) {
163172 automaticVarsSize+= incr;