Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: lib/Target/ARM/ARMBaseRegisterInfo.cpp

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Target/ARM/ARMBaseInstrInfo.cpp ('k') | lib/Target/ARM/ARMCallingConv.td » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===-- ARMBaseRegisterInfo.cpp - ARM Register Information ----------------===// 1 //===-- ARMBaseRegisterInfo.cpp - ARM Register 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 base ARM implementation of TargetRegisterInfo class. 10 // This file contains the base ARM implementation of TargetRegisterInfo class.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 else 53 else
54 FramePtr = ARM::R11; 54 FramePtr = ARM::R11;
55 } else if (STI.isTargetWindows()) 55 } else if (STI.isTargetWindows())
56 FramePtr = ARM::R11; 56 FramePtr = ARM::R11;
57 else // ARM EABI 57 else // ARM EABI
58 FramePtr = STI.isThumb() ? ARM::R7 : ARM::R11; 58 FramePtr = STI.isThumb() ? ARM::R7 : ARM::R11;
59 } 59 }
60 60
61 const MCPhysReg* 61 const MCPhysReg*
62 ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { 62 ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
63 if (STI.isTargetNaCl()) return CSR_NaCl_SaveList; // @LOCALMOD
64
63 const MCPhysReg *RegList = (STI.isTargetIOS() && !STI.isAAPCS_ABI()) 65 const MCPhysReg *RegList = (STI.isTargetIOS() && !STI.isAAPCS_ABI())
64 ? CSR_iOS_SaveList 66 ? CSR_iOS_SaveList
65 : CSR_AAPCS_SaveList; 67 : CSR_AAPCS_SaveList;
66 68
67 if (!MF) return RegList; 69 if (!MF) return RegList;
68 70
69 const Function *F = MF->getFunction(); 71 const Function *F = MF->getFunction();
70 if (F->getCallingConv() == CallingConv::GHC) { 72 if (F->getCallingConv() == CallingConv::GHC) {
71 // GHC set of callee saved regs is empty as all those regs are 73 // GHC set of callee saved regs is empty as all those regs are
72 // used for passing STG regs around 74 // used for passing STG regs around
(...skipping 12 matching lines...) Expand all
85 // exception handling. 87 // exception handling.
86 return CSR_GenericInt_SaveList; 88 return CSR_GenericInt_SaveList;
87 } 89 }
88 } 90 }
89 91
90 return RegList; 92 return RegList;
91 } 93 }
92 94
93 const uint32_t* 95 const uint32_t*
94 ARMBaseRegisterInfo::getCallPreservedMask(CallingConv::ID CC) const { 96 ARMBaseRegisterInfo::getCallPreservedMask(CallingConv::ID CC) const {
97 if (STI.isTargetNaCl()) return CSR_NaCl_RegMask; // @LOCALMOD
95 if (CC == CallingConv::GHC) 98 if (CC == CallingConv::GHC)
96 // This is academic becase all GHC calls are (supposed to be) tail calls 99 // This is academic becase all GHC calls are (supposed to be) tail calls
97 return CSR_NoRegs_RegMask; 100 return CSR_NoRegs_RegMask;
98 return (STI.isTargetIOS() && !STI.isAAPCS_ABI()) 101 return (STI.isTargetIOS() && !STI.isAAPCS_ABI())
99 ? CSR_iOS_RegMask : CSR_AAPCS_RegMask; 102 ? CSR_iOS_RegMask : CSR_AAPCS_RegMask;
100 } 103 }
101 104
102 const uint32_t* 105 const uint32_t*
103 ARMBaseRegisterInfo::getNoPreservedMask() const { 106 ARMBaseRegisterInfo::getNoPreservedMask() const {
104 return CSR_NoRegs_RegMask; 107 return CSR_NoRegs_RegMask;
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 // In practice the SizeMultiplier will only factor in for straight line code 831 // In practice the SizeMultiplier will only factor in for straight line code
829 // that uses a lot of NEON vectors, which isn't terribly common. 832 // that uses a lot of NEON vectors, which isn't terribly common.
830 unsigned SizeMultiplier = MBB->size()/100; 833 unsigned SizeMultiplier = MBB->size()/100;
831 SizeMultiplier = SizeMultiplier ? SizeMultiplier : 1; 834 SizeMultiplier = SizeMultiplier ? SizeMultiplier : 1;
832 if (It->second < NewRCWeight.WeightLimit * SizeMultiplier) { 835 if (It->second < NewRCWeight.WeightLimit * SizeMultiplier) {
833 It->second += NewRCWeight.RegWeight; 836 It->second += NewRCWeight.RegWeight;
834 return true; 837 return true;
835 } 838 }
836 return false; 839 return false;
837 } 840 }
OLDNEW
« no previous file with comments | « lib/Target/ARM/ARMBaseInstrInfo.cpp ('k') | lib/Target/ARM/ARMCallingConv.td » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698