llvm.org GIT mirror llvm / 5e6df46
PEI now passes a RegScavenger ptr to eliminateFrameIndex. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34707 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 12 years ago
11 changed file(s) with 24 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
3737
3838 ~ARMRegisterInfo();
3939
40 RegScavenger *getRegScavenger() const;
41
4240 /// getRegisterNumbering - Given the enum value for some register, e.g.
4341 /// ARM::LR, return the number that it corresponds to (e.g. 14).
4442 static unsigned getRegisterNumbering(unsigned RegEnum);
7573
7674 BitVector getReservedRegs(const MachineFunction &MF) const;
7775
76 bool requiresRegisterScavenging() const;
77
7878 bool hasFP(const MachineFunction &MF) const;
7979
8080 void eliminateCallFramePseudoInstr(MachineFunction &MF,
8181 MachineBasicBlock &MBB,
8282 MachineBasicBlock::iterator I) const;
8383
84 void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
84 void eliminateFrameIndex(MachineBasicBlock::iterator II,
85 RegScavenger *RS = NULL) const;
8586
8687 void processFunctionBeforeCalleeSavedScan(MachineFunction &MF) const;
8788
244244 //variable locals
245245 //<- SP
246246
247 void
248 AlphaRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II) const {
247 void AlphaRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
248 RegScavenger *RS) const {
249249 unsigned i = 0;
250250 MachineInstr &MI = *II;
251251 MachineBasicBlock &MBB = *MI.getParent();
5656 MachineBasicBlock &MBB,
5757 MachineBasicBlock::iterator I) const;
5858
59 void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
59 void eliminateFrameIndex(MachineBasicBlock::iterator II,
60 RegScavenger *RS = NULL) const;
6061
6162 //void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
6263
166166 MBB.erase(I);
167167 }
168168
169 void IA64RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II)const{
169 void IA64RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
170 RegScavenger *RS)const{
170171 unsigned i = 0;
171172 MachineInstr &MI = *II;
172173 MachineBasicBlock &MBB = *MI.getParent();
5555 MachineBasicBlock &MBB,
5656 MachineBasicBlock::iterator MI) const;
5757
58 void eliminateFrameIndex(MachineBasicBlock::iterator MI) const;
58 void eliminateFrameIndex(MachineBasicBlock::iterator MI,
59 RegScavenger *RS = NULL) const;
5960
6061 void emitPrologue(MachineFunction &MF) const;
6162 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
622622 MBB.erase(II);
623623 }
624624
625 void
626 PPCRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II) const {
625 void PPCRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
626 RegScavenger *RS) const {
627627 // Get the instruction.
628628 MachineInstr &MI = *II;
629629 // Get the instruction's basic block.
7575 bool usesLR(MachineFunction &MF) const;
7676
7777 void lowerDynamicAlloc(MachineBasicBlock::iterator II) const;
78 void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
78 void eliminateFrameIndex(MachineBasicBlock::iterator II,
79 RegScavenger *RS = NULL) const;
7980
8081 /// determineFrameLayout - Determine the size of the frame and maximum call
8182 /// frame size.
154154 MBB.erase(I);
155155 }
156156
157 void
158 SparcRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II) const {
157 void SparcRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
158 RegScavenger *RS) const {
159159 unsigned i = 0;
160160 MachineInstr &MI = *II;
161161 while (!MI.getOperand(i).isFrameIndex()) {
5959 MachineBasicBlock &MBB,
6060 MachineBasicBlock::iterator I) const;
6161
62 void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
62 void eliminateFrameIndex(MachineBasicBlock::iterator II,
63 RegScavenger *RS = NULL) const;
6364
6465 void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
6566
967967 MBB.erase(I);
968968 }
969969
970 void X86RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II) const{
970 void X86RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
971 RegScavenger *RS) const{
971972 unsigned i = 0;
972973 MachineInstr &MI = *II;
973974 MachineFunction &MF = *MI.getParent()->getParent();
8989 MachineBasicBlock &MBB,
9090 MachineBasicBlock::iterator MI) const;
9191
92 void eliminateFrameIndex(MachineBasicBlock::iterator MI) const;
92 void eliminateFrameIndex(MachineBasicBlock::iterator MI,
93 RegScavenger *RS = NULL) const;
9394
9495 void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
9596