projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
enhance MachineFunction to have a MMI pointer.
[oota-llvm.git]
/
include
/
llvm
/
CodeGen
/
MachineFunction.h
diff --git
a/include/llvm/CodeGen/MachineFunction.h
b/include/llvm/CodeGen/MachineFunction.h
index 59b171850d0ded23b53488f503b5274f177a0c90..b3609c2ea73ee7c0978d9f62c9d29cabd820dcb0 100644
(file)
--- a/
include/llvm/CodeGen/MachineFunction.h
+++ b/
include/llvm/CodeGen/MachineFunction.h
@@
-32,6
+32,7
@@
class MachineRegisterInfo;
class MachineFrameInfo;
class MachineConstantPool;
class MachineJumpTableInfo;
class MachineFrameInfo;
class MachineConstantPool;
class MachineJumpTableInfo;
+class MachineModuleInfo;
class MCContext;
class Pass;
class TargetMachine;
class MCContext;
class Pass;
class TargetMachine;
@@
-72,7
+73,8
@@
class MachineFunction {
Function *Fn;
const TargetMachine &Target;
MCContext &Ctx;
Function *Fn;
const TargetMachine &Target;
MCContext &Ctx;
-
+ MachineModuleInfo &MMI;
+
// RegInfo - Information about each register in use in the function.
MachineRegisterInfo *RegInfo;
// RegInfo - Information about each register in use in the function.
MachineRegisterInfo *RegInfo;
@@
-107,8
+109,8
@@
class MachineFunction {
typedef ilist<MachineBasicBlock> BasicBlockListType;
BasicBlockListType BasicBlocks;
typedef ilist<MachineBasicBlock> BasicBlockListType;
BasicBlockListType BasicBlocks;
- // Default debug location. Used to print out the debug label at the beginning
- // of a function.
+ //
/
Default debug location. Used to print out the debug label at the beginning
+ //
/
of a function.
DebugLoc DefaultDebugLoc;
/// FunctionNumber - This provides a unique ID for each function emitted in
DebugLoc DefaultDebugLoc;
/// FunctionNumber - This provides a unique ID for each function emitted in
@@
-116,17
+118,17
@@
class MachineFunction {
///
unsigned FunctionNumber;
///
unsigned FunctionNumber;
- // The alignment of the function.
+ //
/
The alignment of the function.
unsigned Alignment;
MachineFunction(const MachineFunction &); // DO NOT IMPLEMENT
void operator=(const MachineFunction&); // DO NOT IMPLEMENT
unsigned Alignment;
MachineFunction(const MachineFunction &); // DO NOT IMPLEMENT
void operator=(const MachineFunction&); // DO NOT IMPLEMENT
-
public:
MachineFunction(Function *Fn, const TargetMachine &TM, unsigned FunctionNum,
public:
MachineFunction(Function *Fn, const TargetMachine &TM, unsigned FunctionNum,
- M
CContext &Ctx
);
+ M
achineModuleInfo &MMI
);
~MachineFunction();
~MachineFunction();
+ MachineModuleInfo &getMMI() const { return MMI; }
MCContext &getContext() const { return Ctx; }
/// getFunction - Return the LLVM function that this machine code represents
MCContext &getContext() const { return Ctx; }
/// getFunction - Return the LLVM function that this machine code represents