OLD | NEW |
1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==// | 1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==// |
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 /// \file | 10 /// \file |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 } | 295 } |
296 } | 296 } |
297 | 297 |
298 template <class Machine> void TargetX86Base<Machine>::staticInit() { | 298 template <class Machine> void TargetX86Base<Machine>::staticInit() { |
299 Traits::initRegisterSet(&TypeToRegisterSet, &RegisterAliases, &ScratchRegs); | 299 Traits::initRegisterSet(&TypeToRegisterSet, &RegisterAliases, &ScratchRegs); |
300 } | 300 } |
301 | 301 |
302 template <class Machine> void TargetX86Base<Machine>::translateO2() { | 302 template <class Machine> void TargetX86Base<Machine>::translateO2() { |
303 TimerMarker T(TimerStack::TT_O2, Func); | 303 TimerMarker T(TimerStack::TT_O2, Func); |
304 | 304 |
| 305 genTargetHelperCalls(); |
| 306 |
305 // Merge Alloca instructions, and lay out the stack. | 307 // Merge Alloca instructions, and lay out the stack. |
306 static constexpr bool SortAndCombineAllocas = true; | 308 static constexpr bool SortAndCombineAllocas = true; |
307 Func->processAllocas(SortAndCombineAllocas); | 309 Func->processAllocas(SortAndCombineAllocas); |
308 Func->dump("After Alloca processing"); | 310 Func->dump("After Alloca processing"); |
309 | 311 |
310 if (!Ctx->getFlags().getPhiEdgeSplit()) { | 312 if (!Ctx->getFlags().getPhiEdgeSplit()) { |
311 // Lower Phi instructions. | 313 // Lower Phi instructions. |
312 Func->placePhiLoads(); | 314 Func->placePhiLoads(); |
313 if (Func->hasError()) | 315 if (Func->hasError()) |
314 return; | 316 return; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 Func->doNopInsertion(); | 420 Func->doNopInsertion(); |
419 | 421 |
420 // Mark nodes that require sandbox alignment | 422 // Mark nodes that require sandbox alignment |
421 if (Ctx->getFlags().getUseSandboxing()) | 423 if (Ctx->getFlags().getUseSandboxing()) |
422 Func->markNodesForSandboxing(); | 424 Func->markNodesForSandboxing(); |
423 } | 425 } |
424 | 426 |
425 template <class Machine> void TargetX86Base<Machine>::translateOm1() { | 427 template <class Machine> void TargetX86Base<Machine>::translateOm1() { |
426 TimerMarker T(TimerStack::TT_Om1, Func); | 428 TimerMarker T(TimerStack::TT_Om1, Func); |
427 | 429 |
| 430 genTargetHelperCalls(); |
| 431 |
428 // Do not merge Alloca instructions, and lay out the stack. | 432 // Do not merge Alloca instructions, and lay out the stack. |
429 static constexpr bool SortAndCombineAllocas = false; | 433 static constexpr bool SortAndCombineAllocas = false; |
430 Func->processAllocas(SortAndCombineAllocas); | 434 Func->processAllocas(SortAndCombineAllocas); |
431 Func->dump("After Alloca processing"); | 435 Func->dump("After Alloca processing"); |
432 | 436 |
433 Func->placePhiLoads(); | 437 Func->placePhiLoads(); |
434 if (Func->hasError()) | 438 if (Func->hasError()) |
435 return; | 439 return; |
436 Func->placePhiStores(); | 440 Func->placePhiStores(); |
437 if (Func->hasError()) | 441 if (Func->hasError()) |
(...skipping 5581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6019 } | 6023 } |
6020 // the offset is not eligible for blinding or pooling, return the original | 6024 // the offset is not eligible for blinding or pooling, return the original |
6021 // mem operand | 6025 // mem operand |
6022 return MemOperand; | 6026 return MemOperand; |
6023 } | 6027 } |
6024 | 6028 |
6025 } // end of namespace X86Internal | 6029 } // end of namespace X86Internal |
6026 } // end of namespace Ice | 6030 } // end of namespace Ice |
6027 | 6031 |
6028 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H | 6032 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H |
OLD | NEW |