Chromium Code Reviews| 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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 440 | 440 |
| 441 // Merge Alloca instructions, and lay out the stack. | 441 // Merge Alloca instructions, and lay out the stack. |
| 442 static constexpr bool SortAndCombineAllocas = true; | 442 static constexpr bool SortAndCombineAllocas = true; |
| 443 Func->processAllocas(SortAndCombineAllocas); | 443 Func->processAllocas(SortAndCombineAllocas); |
| 444 Func->dump("After Alloca processing"); | 444 Func->dump("After Alloca processing"); |
| 445 | 445 |
| 446 if (getFlags().getEnableExperimental()) { | 446 if (getFlags().getEnableExperimental()) { |
| 447 Func->localCSE(); | 447 Func->localCSE(); |
| 448 Func->dump("After Local CSE"); | 448 Func->dump("After Local CSE"); |
| 449 } | 449 } |
| 450 if (getFlags().getEnableShortCircuit()) { | |
| 451 Func->shortCircuitJumps(); | |
| 452 Func->dump("After Short Circuiting"); | |
| 453 } | |
| 450 | 454 |
| 451 if (!getFlags().getEnablePhiEdgeSplit()) { | 455 if (!getFlags().getEnablePhiEdgeSplit()) { |
| 452 // Lower Phi instructions. | 456 // Lower Phi instructions. |
| 453 Func->placePhiLoads(); | 457 Func->placePhiLoads(); |
| 454 if (Func->hasError()) | 458 if (Func->hasError()) |
| 455 return; | 459 return; |
| 456 Func->placePhiStores(); | 460 Func->placePhiStores(); |
| 457 if (Func->hasError()) | 461 if (Func->hasError()) |
| 458 return; | 462 return; |
| 459 Func->deletePhis(); | 463 Func->deletePhis(); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 549 Func->contractEmptyNodes(); | 553 Func->contractEmptyNodes(); |
| 550 Func->reorderNodes(); | 554 Func->reorderNodes(); |
| 551 | 555 |
| 552 // Shuffle basic block order if -reorder-basic-blocks is enabled. | 556 // Shuffle basic block order if -reorder-basic-blocks is enabled. |
| 553 Func->shuffleNodes(); | 557 Func->shuffleNodes(); |
| 554 | 558 |
| 555 // Branch optimization. This needs to be done just before code emission. In | 559 // Branch optimization. This needs to be done just before code emission. In |
| 556 // particular, no transformations that insert or reorder CfgNodes should be | 560 // particular, no transformations that insert or reorder CfgNodes should be |
| 557 // done after branch optimization. We go ahead and do it before nop insertion | 561 // done after branch optimization. We go ahead and do it before nop insertion |
| 558 // to reduce the amount of work needed for searching for opportunities. | 562 // to reduce the amount of work needed for searching for opportunities. |
| 563 | |
|
Jim Stichnoth
2016/06/27 22:41:59
I would remove this newline.
manasijm
2016/06/27 22:56:32
Done.
| |
| 559 Func->doBranchOpt(); | 564 Func->doBranchOpt(); |
| 560 Func->dump("After branch optimization"); | 565 Func->dump("After branch optimization"); |
| 561 | 566 |
| 562 // Nop insertion if -nop-insertion is enabled. | 567 // Nop insertion if -nop-insertion is enabled. |
| 563 Func->doNopInsertion(); | 568 Func->doNopInsertion(); |
| 564 | 569 |
| 565 // Mark nodes that require sandbox alignment | 570 // Mark nodes that require sandbox alignment |
| 566 if (NeedSandboxing) { | 571 if (NeedSandboxing) { |
| 567 Func->markNodesForSandboxing(); | 572 Func->markNodesForSandboxing(); |
| 568 } | 573 } |
| (...skipping 7459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8028 emitGlobal(*Var, SectionSuffix); | 8033 emitGlobal(*Var, SectionSuffix); |
| 8029 } | 8034 } |
| 8030 } | 8035 } |
| 8031 } break; | 8036 } break; |
| 8032 } | 8037 } |
| 8033 } | 8038 } |
| 8034 } // end of namespace X86NAMESPACE | 8039 } // end of namespace X86NAMESPACE |
| 8035 } // end of namespace Ice | 8040 } // end of namespace Ice |
| 8036 | 8041 |
| 8037 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H | 8042 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H |
| OLD | NEW |