| OLD | NEW |
| 1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering implementation --===// | 1 //===- subzero/src/IceTargetLowering.cpp - Basic lowering implementation --===// |
| 2 // | 2 // |
| 3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
| 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 implements the skeleton of the TargetLowering class, | 10 // This file implements the skeleton of the TargetLowering class, |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 Context.advanceCur(); | 223 Context.advanceCur(); |
| 224 Context.advanceNext(); | 224 Context.advanceNext(); |
| 225 } | 225 } |
| 226 | 226 |
| 227 // Drives register allocation, allowing all physical registers (except | 227 // Drives register allocation, allowing all physical registers (except |
| 228 // perhaps for the frame pointer) to be allocated. This set of | 228 // perhaps for the frame pointer) to be allocated. This set of |
| 229 // registers could potentially be parameterized if we want to restrict | 229 // registers could potentially be parameterized if we want to restrict |
| 230 // registers e.g. for performance testing. | 230 // registers e.g. for performance testing. |
| 231 void TargetLowering::regAlloc() { | 231 void TargetLowering::regAlloc() { |
| 232 static TimerIdT IDregAlloc = GlobalContext::getTimerID("regAlloc"); |
| 233 TimerMarker T(IDregAlloc, Ctx); |
| 232 LinearScan LinearScan(Func); | 234 LinearScan LinearScan(Func); |
| 233 RegSetMask RegInclude = RegSet_None; | 235 RegSetMask RegInclude = RegSet_None; |
| 234 RegSetMask RegExclude = RegSet_None; | 236 RegSetMask RegExclude = RegSet_None; |
| 235 RegInclude |= RegSet_CallerSave; | 237 RegInclude |= RegSet_CallerSave; |
| 236 RegInclude |= RegSet_CalleeSave; | 238 RegInclude |= RegSet_CalleeSave; |
| 237 if (hasFramePointer()) | 239 if (hasFramePointer()) |
| 238 RegExclude |= RegSet_FramePointer; | 240 RegExclude |= RegSet_FramePointer; |
| 239 llvm::SmallBitVector RegMask = getRegisterSet(RegInclude, RegExclude); | 241 llvm::SmallBitVector RegMask = getRegisterSet(RegInclude, RegExclude); |
| 240 LinearScan.scan(RegMask); | 242 LinearScan.scan(RegMask); |
| 241 } | 243 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 255 if (Target == Target_ARM64) | 257 if (Target == Target_ARM64) |
| 256 return IceTargetGlobalInitARM64::create(Ctx); | 258 return IceTargetGlobalInitARM64::create(Ctx); |
| 257 #endif | 259 #endif |
| 258 llvm_unreachable("Unsupported target"); | 260 llvm_unreachable("Unsupported target"); |
| 259 return NULL; | 261 return NULL; |
| 260 } | 262 } |
| 261 | 263 |
| 262 TargetGlobalInitLowering::~TargetGlobalInitLowering() {} | 264 TargetGlobalInitLowering::~TargetGlobalInitLowering() {} |
| 263 | 265 |
| 264 } // end of namespace Ice | 266 } // end of namespace Ice |
| OLD | NEW |