mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Improve comments, add methods for structured printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4431 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -24,6 +24,7 @@ class Pass;
|
|||||||
|
|
||||||
Pass *createMachineCodeConstructionPass(TargetMachine &Target);
|
Pass *createMachineCodeConstructionPass(TargetMachine &Target);
|
||||||
Pass *createMachineCodeDestructionPass();
|
Pass *createMachineCodeDestructionPass();
|
||||||
|
Pass *createMachineFunctionPrinterPass();
|
||||||
|
|
||||||
class MachineFunction : private Annotation {
|
class MachineFunction : private Annotation {
|
||||||
const Function *Fn;
|
const Function *Fn;
|
||||||
@ -49,12 +50,6 @@ class MachineFunction : private Annotation {
|
|||||||
public:
|
public:
|
||||||
MachineFunction(const Function *Fn, const TargetMachine& target);
|
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
|
/// getFunction - Return the LLVM function that this machine code represents
|
||||||
///
|
///
|
||||||
const Function *getFunction() const { return Fn; }
|
const Function *getFunction() const { return Fn; }
|
||||||
@ -63,12 +58,28 @@ public:
|
|||||||
///
|
///
|
||||||
const TargetMachine &getTarget() const { return Target; }
|
const TargetMachine &getTarget() const { return Target; }
|
||||||
|
|
||||||
// The next two methods are used to construct and to retrieve
|
/// print - Print out the MachineFunction in a format suitable for debugging
|
||||||
// the MachineFunction object for the given method.
|
/// 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
|
// construct() -- Allocates and initializes for a given method and target
|
||||||
// get() -- Returns a handle to the object.
|
// get() -- Returns a handle to the object.
|
||||||
// This should not be called before "construct()"
|
// This should not be called before "construct()"
|
||||||
// for a given Method.
|
// for a given Method.
|
||||||
|
// destruct() -- Destroy the MachineFunction object
|
||||||
//
|
//
|
||||||
static MachineFunction& construct(const Function *Fn,
|
static MachineFunction& construct(const Function *Fn,
|
||||||
const TargetMachine &target);
|
const TargetMachine &target);
|
||||||
@ -157,8 +168,6 @@ public:
|
|||||||
|
|
||||||
// int getOffsetFromFP (const Value* val) const;
|
// int getOffsetFromFP (const Value* val) const;
|
||||||
|
|
||||||
void dump () const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
inline void incrementAutomaticVarsSize(int incr) {
|
inline void incrementAutomaticVarsSize(int incr) {
|
||||||
automaticVarsSize+= incr;
|
automaticVarsSize+= incr;
|
||||||
|
Reference in New Issue
Block a user