llvm.org GIT mirror llvm / b9c2fd9
Make the MachineFunction argument of getFrameRegister const. This also fixes a build error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87027 91177308-0d34-0410-b5e6-96231b3b80d8 David Greene 9 years ago
18 changed file(s) with 21 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
274274 regclass_iterator RegClassBegin, RegClassEnd; // List of regclasses
275275
276276 int CallFrameSetupOpcode, CallFrameDestroyOpcode;
277
277278 protected:
278279 TargetRegisterInfo(const TargetRegisterDesc *D, unsigned NR,
279280 regclass_iterator RegClassBegin,
683684
684685 /// getFrameRegister - This method should return the register used as a base
685686 /// for values allocated in the current stack frame.
686 virtual unsigned getFrameRegister(MachineFunction &MF) const = 0;
687 virtual unsigned getFrameRegister(const MachineFunction &MF) const = 0;
687688
688689 /// getFrameIndexOffset - Returns the displacement from the frame register to
689690 /// the stack frame of the specified index.
104104
105105 // Debug information queries.
106106 unsigned getRARegister() const;
107 unsigned getFrameRegister(MachineFunction &MF) const;
107 unsigned getFrameRegister(const MachineFunction &MF) const;
108108
109109 // Exception handling queries.
110110 unsigned getEHExceptionRegister() const;
313313 return 0;
314314 }
315315
316 unsigned AlphaRegisterInfo::getFrameRegister(MachineFunction &MF) const {
316 unsigned AlphaRegisterInfo::getFrameRegister(const MachineFunction &MF) const {
317317 return hasFP(MF) ? Alpha::R15 : Alpha::R30;
318318 }
319319
5151
5252 // Debug information queries.
5353 unsigned getRARegister() const;
54 unsigned getFrameRegister(MachineFunction &MF) const;
54 unsigned getFrameRegister(const MachineFunction &MF) const;
5555
5656 // Exception handling queries.
5757 unsigned getEHExceptionRegister() const;
7575 void emitPrologue(MachineFunction &MF) const;
7676 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
7777
78 unsigned getFrameRegister(MachineFunction &MF) const;
78 unsigned getFrameRegister(const MachineFunction &MF) const;
7979 unsigned getRARegister() const;
8080
8181 // Exception handling queries.
595595 }
596596
597597 unsigned
598 SPURegisterInfo::getFrameRegister(MachineFunction &MF) const
598 SPURegisterInfo::getFrameRegister(const MachineFunction &MF) const
599599 {
600600 return SPU::R1;
601601 }
7777 //! Get return address register (LR, aka R0)
7878 unsigned getRARegister() const;
7979 //! Get the stack frame register (SP, aka R1)
80 unsigned getFrameRegister(MachineFunction &MF) const;
80 unsigned getFrameRegister(const MachineFunction &MF) const;
8181 //! Perform target-specific stack frame setup.
8282 void getInitialFrameState(std::vector &Moves) const;
8383
5959
6060 // Debug information queries.
6161 unsigned getRARegister() const;
62 unsigned getFrameRegister(MachineFunction &MF) const;
62 unsigned getFrameRegister(const MachineFunction &MF) const;
6363
6464 //! Get DWARF debugging register number
6565 int getDwarfRegNum(unsigned RegNum, bool isEH) const;
6464
6565 /// Debug information queries.
6666 unsigned getRARegister() const;
67 unsigned getFrameRegister(MachineFunction &MF) const;
67 unsigned getFrameRegister(const MachineFunction &MF) const;
6868
6969 /// Exception handling queries.
7070 unsigned getEHExceptionRegister() const;
7171 return -1;
7272 }
7373
74 unsigned PIC16RegisterInfo::getFrameRegister(MachineFunction &MF) const {
74 unsigned PIC16RegisterInfo::getFrameRegister(const MachineFunction &MF) const {
7575 llvm_unreachable("PIC16 Does not have any frame register");
7676 return 0;
7777 }
5858 virtual void emitPrologue(MachineFunction &MF) const;
5959 virtual void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
6060 virtual int getDwarfRegNum(unsigned RegNum, bool isEH) const;
61 virtual unsigned getFrameRegister(MachineFunction &MF) const;
61 virtual unsigned getFrameRegister(const MachineFunction &MF) const;
6262 virtual unsigned getRARegister() const;
6363
6464 };
8282
8383 // Debug information queries.
8484 unsigned getRARegister() const;
85 unsigned getFrameRegister(MachineFunction &MF) const;
85 unsigned getFrameRegister(const MachineFunction &MF) const;
8686 void getInitialFrameState(std::vector &Moves) const;
8787
8888 // Exception handling queries.
174174 return SP::I7;
175175 }
176176
177 unsigned SparcRegisterInfo::getFrameRegister(MachineFunction &MF) const {
177 unsigned SparcRegisterInfo::getFrameRegister(const MachineFunction &MF) const {
178178 return SP::I6;
179179 }
180180
5353
5454 // Debug information queries.
5555 unsigned getRARegister() const;
56 unsigned getFrameRegister(MachineFunction &MF) const;
56 unsigned getFrameRegister(const MachineFunction &MF) const;
5757
5858 // Exception handling queries.
5959 unsigned getEHExceptionRegister() const;
319319 return 0;
320320 }
321321
322 unsigned SystemZRegisterInfo::getFrameRegister(MachineFunction &MF) const {
322 unsigned
323 SystemZRegisterInfo::getFrameRegister(const MachineFunction &MF) const {
323324 assert(0 && "What is the frame register");
324325 return 0;
325326 }
6767
6868 // Debug information queries.
6969 unsigned getRARegister() const;
70 unsigned getFrameRegister(MachineFunction &MF) const;
70 unsigned getFrameRegister(const MachineFunction &MF) const;
7171
7272 // Exception handling queries.
7373 unsigned getEHExceptionRegister() const;
152152
153153 // Debug information queries.
154154 unsigned getRARegister() const;
155 unsigned getFrameRegister(MachineFunction &MF) const;
155 unsigned getFrameRegister(const MachineFunction &MF) const;
156156 int getFrameIndexOffset(MachineFunction &MF, int FI) const;
157157 void getInitialFrameState(std::vector &Moves) const;
158158
5959 unsigned eliminateFrameIndex(MachineBasicBlock::iterator II,
6060 int SPAdj, int *Value = NULL,
6161 RegScavenger *RS = NULL) const;
62
62
6363 void processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
6464 RegScavenger *RS = NULL) const;
6565
7070
7171 // Debug information queries.
7272 unsigned getRARegister() const;
73 unsigned getFrameRegister(MachineFunction &MF) const;
73 unsigned getFrameRegister(const MachineFunction &MF) const;
7474 void getInitialFrameState(std::vector &Moves) const;
7575
7676 //! Return the array of argument passing registers