aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-08-20 21:05:57 +0000
committerDan Gohman <gohman@apple.com>2008-08-20 21:05:57 +0000
commitbb466331e7e50d03497ce40ee344870236fd9c32 (patch)
tree72553ec5a9e53eeb22306e0cf5e971f969a94831 /include
parent2385852b5b9b82e15eb4502d71b5f916882418d7 (diff)
Simplify FastISel's constructor argument list, make the FastISel
class hold a MachineRegisterInfo member, and make the MachineBasicBlock be passed in to SelectInstructions rather than the FastISel constructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/FastISel.h13
-rw-r--r--include/llvm/Target/TargetLowering.h5
2 files changed, 8 insertions, 10 deletions
diff --git a/include/llvm/CodeGen/FastISel.h b/include/llvm/CodeGen/FastISel.h
index a241756df5..27504ac8bd 100644
--- a/include/llvm/CodeGen/FastISel.h
+++ b/include/llvm/CodeGen/FastISel.h
@@ -22,6 +22,7 @@ namespace llvm {
class MachineBasicBlock;
class MachineFunction;
+class MachineRegisterInfo;
class TargetInstrInfo;
class TargetRegisterClass;
@@ -30,8 +31,9 @@ class TargetRegisterClass;
/// lowering, but runs quickly.
class FastISel {
MachineBasicBlock *MBB;
- MachineFunction *MF;
- const TargetInstrInfo *TII;
+ MachineFunction &MF;
+ MachineRegisterInfo &MRI;
+ const TargetInstrInfo &TII;
public:
/// SelectInstructions - Do "fast" instruction selection over the
@@ -41,14 +43,13 @@ public:
/// register numbers.
BasicBlock::iterator
SelectInstructions(BasicBlock::iterator Begin, BasicBlock::iterator End,
- DenseMap<const Value*, unsigned> &ValueMap);
+ DenseMap<const Value*, unsigned> &ValueMap,
+ MachineBasicBlock *mbb);
virtual ~FastISel();
protected:
- FastISel(MachineBasicBlock *mbb, MachineFunction *mf,
- const TargetInstrInfo *tii)
- : MBB(mbb), MF(mf), TII(tii) {}
+ explicit FastISel(MachineFunction &mf);
/// FastEmit_r - This method is called by target-independent code
/// to request that an instruction with the given type and opcode
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index 3702dbae91..bb3105b5e8 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -42,7 +42,6 @@ namespace llvm {
class SDValue;
class SelectionDAG;
class TargetData;
- class TargetInstrInfo;
class TargetMachine;
class TargetRegisterClass;
class TargetSubtarget;
@@ -1116,9 +1115,7 @@ public:
/// createFastISel - This method returns a target specific FastISel object,
/// or null if the target does not support "fast" ISel.
- virtual FastISel *createFastISel(MachineBasicBlock *,
- MachineFunction *,
- const TargetInstrInfo *) { return 0; }
+ virtual FastISel *createFastISel(MachineFunction &) { return 0; }
//===--------------------------------------------------------------------===//
// Inline Asm Support hooks