| OLD | NEW |
| 1 //===-- ARMFrameLowering.cpp - ARM Frame Information ----------------------===// | 1 //===-- ARMFrameLowering.cpp - ARM Frame Information ----------------------===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // This file contains the ARM implementation of TargetFrameLowering class. | 10 // This file contains the ARM implementation of TargetFrameLowering class. |
| (...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 bool DeleteRet = false; | 963 bool DeleteRet = false; |
| 964 for (; i != 0; --i) { | 964 for (; i != 0; --i) { |
| 965 unsigned Reg = CSI[i-1].getReg(); | 965 unsigned Reg = CSI[i-1].getReg(); |
| 966 if (!(Func)(Reg, STI.isTargetDarwin())) continue; | 966 if (!(Func)(Reg, STI.isTargetDarwin())) continue; |
| 967 | 967 |
| 968 // The aligned reloads from area DPRCS2 are not inserted here. | 968 // The aligned reloads from area DPRCS2 are not inserted here. |
| 969 if (Reg >= ARM::D8 && Reg < ARM::D8 + NumAlignedDPRCS2Regs) | 969 if (Reg >= ARM::D8 && Reg < ARM::D8 + NumAlignedDPRCS2Regs) |
| 970 continue; | 970 continue; |
| 971 | 971 |
| 972 if (Reg == ARM::LR && !isTailCall && !isVarArg && !isInterrupt && | 972 if (Reg == ARM::LR && !isTailCall && !isVarArg && !isInterrupt && |
| 973 STI.hasV5TOps()) { | 973 STI.hasV5TOps() && |
| 974 !STI.isTargetNaCl() /* @LOCALMOD */) { |
| 974 Reg = ARM::PC; | 975 Reg = ARM::PC; |
| 975 LdmOpc = AFI->isThumbFunction() ? ARM::t2LDMIA_RET : ARM::LDMIA_RET; | 976 LdmOpc = AFI->isThumbFunction() ? ARM::t2LDMIA_RET : ARM::LDMIA_RET; |
| 976 // Fold the return instruction into the LDM. | 977 // Fold the return instruction into the LDM. |
| 977 DeleteRet = true; | 978 DeleteRet = true; |
| 978 } | 979 } |
| 979 | 980 |
| 980 // If NoGap is true, pop consecutive registers and then leave the rest | 981 // If NoGap is true, pop consecutive registers and then leave the rest |
| 981 // for other instructions. e.g. | 982 // for other instructions. e.g. |
| 982 // vpop {d8, d10, d11} -> vpop {d8}, vpop {d10, d11} | 983 // vpop {d8, d10, d11} -> vpop {d8}, vpop {d10, d11} |
| 983 if (NoGap && LastReg && LastReg != Reg-1) | 984 if (NoGap && LastReg && LastReg != Reg-1) |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2104 GetMBB->addSuccessor(AllocMBB); | 2105 GetMBB->addSuccessor(AllocMBB); |
| 2105 | 2106 |
| 2106 McrMBB->addSuccessor(GetMBB); | 2107 McrMBB->addSuccessor(GetMBB); |
| 2107 | 2108 |
| 2108 PrevStackMBB->addSuccessor(McrMBB); | 2109 PrevStackMBB->addSuccessor(McrMBB); |
| 2109 | 2110 |
| 2110 #ifdef XDEBUG | 2111 #ifdef XDEBUG |
| 2111 MF.verify(); | 2112 MF.verify(); |
| 2112 #endif | 2113 #endif |
| 2113 } | 2114 } |
| OLD | NEW |