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
This commit is contained in:
Dan Gohman
2008-08-20 21:05:57 +00:00
parent 2385852b5b
commit bb466331e7
8 changed files with 33 additions and 40 deletions
+7 -6
View File
@@ -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