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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
399 | 399 |
400 // Stack frame mapping. | 400 // Stack frame mapping. |
401 Func->genFrame(); | 401 Func->genFrame(); |
402 if (Func->hasError()) | 402 if (Func->hasError()) |
403 return; | 403 return; |
404 Func->dump("After stack frame mapping"); | 404 Func->dump("After stack frame mapping"); |
405 | 405 |
406 Func->contractEmptyNodes(); | 406 Func->contractEmptyNodes(); |
407 Func->reorderNodes(); | 407 Func->reorderNodes(); |
408 | 408 |
409 // Shuffle basic block order if -reorder-basic-blocks is enabled. | |
Jim Stichnoth
2015/07/30 16:30:51
Call Func->shuffleNodes() unconditionally, and che
qining
2015/07/30 20:25:55
Done. Done the same with nop insertion.
| |
410 if (Ctx->getFlags().shouldReorderBasicBlocks()) { | |
411 Func->shuffleNodes(); | |
412 Func->dump("After basic block shuffling"); | |
413 } | |
414 | |
409 // Branch optimization. This needs to be done just before code emission. In | 415 // Branch optimization. This needs to be done just before code emission. In |
410 // particular, no transformations that insert or reorder CfgNodes should be | 416 // particular, no transformations that insert or reorder CfgNodes should be |
411 // done after branch optimization. We go ahead and do it before nop insertion | 417 // done after branch optimization. We go ahead and do it before nop insertion |
412 // to reduce the amount of work needed for searching for opportunities. | 418 // to reduce the amount of work needed for searching for opportunities. |
413 Func->doBranchOpt(); | 419 Func->doBranchOpt(); |
414 Func->dump("After branch optimization"); | 420 Func->dump("After branch optimization"); |
415 | 421 |
416 // Nop insertion | 422 // Nop insertion |
417 if (Ctx->getFlags().shouldDoNopInsertion()) { | 423 if (Ctx->getFlags().shouldDoNopInsertion()) { |
418 Func->doNopInsertion(); | 424 Func->doNopInsertion(); |
(...skipping 23 matching lines...) Expand all Loading... | |
442 regAlloc(RAK_InfOnly); | 448 regAlloc(RAK_InfOnly); |
443 if (Func->hasError()) | 449 if (Func->hasError()) |
444 return; | 450 return; |
445 Func->dump("After regalloc of infinite-weight variables"); | 451 Func->dump("After regalloc of infinite-weight variables"); |
446 | 452 |
447 Func->genFrame(); | 453 Func->genFrame(); |
448 if (Func->hasError()) | 454 if (Func->hasError()) |
449 return; | 455 return; |
450 Func->dump("After stack frame mapping"); | 456 Func->dump("After stack frame mapping"); |
451 | 457 |
458 // Shuffle basic block order if -reorder-basic-blocks is enabled. | |
459 if (Ctx->getFlags().shouldReorderBasicBlocks()) { | |
460 Func->shuffleNodes(); | |
461 Func->dump("After basic block shuffling"); | |
462 } | |
463 | |
452 // Nop insertion | 464 // Nop insertion |
453 if (Ctx->getFlags().shouldDoNopInsertion()) { | 465 if (Ctx->getFlags().shouldDoNopInsertion()) { |
454 Func->doNopInsertion(); | 466 Func->doNopInsertion(); |
455 } | 467 } |
456 } | 468 } |
457 | 469 |
458 inline bool canRMW(const InstArithmetic *Arith) { | 470 inline bool canRMW(const InstArithmetic *Arith) { |
459 Type Ty = Arith->getDest()->getType(); | 471 Type Ty = Arith->getDest()->getType(); |
460 // X86 vector instructions write to a register and have no RMW option. | 472 // X86 vector instructions write to a register and have no RMW option. |
461 if (isVectorType(Ty)) | 473 if (isVectorType(Ty)) |
(...skipping 5154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5616 } | 5628 } |
5617 // the offset is not eligible for blinding or pooling, return the original | 5629 // the offset is not eligible for blinding or pooling, return the original |
5618 // mem operand | 5630 // mem operand |
5619 return MemOperand; | 5631 return MemOperand; |
5620 } | 5632 } |
5621 | 5633 |
5622 } // end of namespace X86Internal | 5634 } // end of namespace X86Internal |
5623 } // end of namespace Ice | 5635 } // end of namespace Ice |
5624 | 5636 |
5625 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H | 5637 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H |
OLD | NEW |