Mercurial > hg > Members > tobaru > cbc > CbC_llvm
comparison lib/Target/PowerPC/PPCFrameLowering.h @ 100:7d135dc70f03
LLVM 3.9
author | Miyagi Mitsuki <e135756@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 26 Jan 2016 22:53:40 +0900 |
parents | afa8332a0e37 |
children | 1172e4bd9c6f |
comparison
equal
deleted
inserted
replaced
96:6418606d0ead | 100:7d135dc70f03 |
---|---|
26 const unsigned ReturnSaveOffset; | 26 const unsigned ReturnSaveOffset; |
27 const unsigned TOCSaveOffset; | 27 const unsigned TOCSaveOffset; |
28 const unsigned FramePointerSaveOffset; | 28 const unsigned FramePointerSaveOffset; |
29 const unsigned LinkageSize; | 29 const unsigned LinkageSize; |
30 const unsigned BasePointerSaveOffset; | 30 const unsigned BasePointerSaveOffset; |
31 | |
32 /** | |
33 * \brief Find a register that can be used in function prologue and epilogue | |
34 * | |
35 * Find a register that can be use as the scratch register in function | |
36 * prologue and epilogue to save various registers (Link Register, Base | |
37 * Pointer, etc.). Prefer R0, if it is available. If it is not available, | |
38 * then choose a different register. | |
39 * | |
40 * This method will return true if an available register was found (including | |
41 * R0). If no available registers are found, the method returns false and sets | |
42 * ScratchRegister to R0, as per the recommendation in the ABI. | |
43 * | |
44 * \param[in] MBB The machine basic block to find an available register for | |
45 * \param[in] UseAtEnd Specify whether the scratch register will be used at | |
46 * the end of the basic block (i.e., will the scratch | |
47 * register kill a register defined in the basic block) | |
48 * \param[out] ScratchRegister The scratch register to use | |
49 * \return true if a scratch register was found. false of a scratch register | |
50 * was not found and R0 is being used as the default. | |
51 */ | |
52 bool findScratchRegister(MachineBasicBlock *MBB, | |
53 bool UseAtEnd, | |
54 unsigned *ScratchRegister) const; | |
31 | 55 |
32 public: | 56 public: |
33 PPCFrameLowering(const PPCSubtarget &STI); | 57 PPCFrameLowering(const PPCSubtarget &STI); |
34 | 58 |
35 unsigned determineFrameLayout(MachineFunction &MF, | 59 unsigned determineFrameLayout(MachineFunction &MF, |
92 | 116 |
93 const SpillSlot * | 117 const SpillSlot * |
94 getCalleeSavedSpillSlots(unsigned &NumEntries) const override; | 118 getCalleeSavedSpillSlots(unsigned &NumEntries) const override; |
95 | 119 |
96 bool enableShrinkWrapping(const MachineFunction &MF) const override; | 120 bool enableShrinkWrapping(const MachineFunction &MF) const override; |
121 | |
122 /// Methods used by shrink wrapping to determine if MBB can be used for the | |
123 /// function prologue/epilogue. | |
124 bool canUseAsPrologue(const MachineBasicBlock &MBB) const override; | |
125 bool canUseAsEpilogue(const MachineBasicBlock &MBB) const override; | |
97 }; | 126 }; |
98 } // End llvm namespace | 127 } // End llvm namespace |
99 | 128 |
100 #endif | 129 #endif |