Home
last modified time | relevance | path

Searched refs:GetMergeBlock (Results 1 – 25 of 33) sorted by relevance

12

/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/source/opt/
Dloop_fusion.cpp122 if (context_->cfg()->preds(loop_0_->GetMergeBlock()->id()).size() != 1 || in AreCompatible()
123 context_->cfg()->preds(loop_1_->GetMergeBlock()->id()).size() != 1) { in AreCompatible()
175 if (loop_0_->GetMergeBlock() != loop_1_->GetPreHeaderBlock()) { in AreCompatible()
180 if (block == loop_0_->GetMergeBlock()) { in AreCompatible()
412 loop_0_->GetMergeBlock()->ForEachPhiInst( in IsLegal()
560 inst->SetInOperand(0, {loop_1_->GetMergeBlock()->id()}); in Fuse()
568 auto loop_0_merge_block_id = loop_0_->GetMergeBlock()->id(); in Fuse()
571 inst->SetInOperand(1, {loop_1_->GetMergeBlock()->id()}); in Fuse()
573 inst->SetInOperand(2, {loop_1_->GetMergeBlock()->id()}); in Fuse()
613 loop_0_->GetMergeBlock()->ForEachPhiInst([this](Instruction* instruction) { in Fuse()
[all …]
Dloop_unroller.cpp408 AddBlocksToFunction(loop->GetMergeBlock()); in PartiallyUnrollResidualFactor()
428 std::unique_ptr<BasicBlock>(new_loop->GetMergeBlock())); in PartiallyUnrollResidualFactor()
431 AddBlocksToFunction(loop->GetMergeBlock()); in PartiallyUnrollResidualFactor()
509 context_->ReplaceAllUsesWith(loop->GetMergeBlock()->id(), new_merge_id); in PartiallyUnrollResidualFactor()
593 AddBlocksToFunction(loop->GetMergeBlock()); in FullyUnroll()
775 latch_instruction->SetInOperand(0, {loop->GetMergeBlock()->id()}); in CloseUnrolledLoop()
821 BasicBlock* new_merge = old_loop->GetMergeBlock()->Clone(context_); in DuplicateLoop()
822 new_merge->SetParent(old_loop->GetMergeBlock()->GetParent()); in DuplicateLoop()
824 state_.new_blocks[old_loop->GetMergeBlock()->id()] = new_merge; in DuplicateLoop()
965 AddBlocksToFunction(loop->GetMergeBlock()); in PartiallyUnroll()
[all …]
Dloop_peeling.cpp73 for (uint32_t pred_id : cfg.preds(loop_->GetMergeBlock()->id())) { in DuplicateAndConnectLoop()
79 if (*succ == loop_->GetMergeBlock()->id()) in DuplicateAndConnectLoop()
85 cfg.RemoveNonExistingEdges(loop_->GetMergeBlock()->id()); in DuplicateAndConnectLoop()
221 uint32_t condition_block_id = cfg.preds(loop_->GetMergeBlock()->id())[0]; in IsConditionCheckSideEffectFree()
257 if (!loop_->GetMergeBlock()) { in GetIteratingExitValues()
260 if (cfg.preds(loop_->GetMergeBlock()->id()).size() != 1) { in GetIteratingExitValues()
265 uint32_t condition_block_id = cfg.preds(loop_->GetMergeBlock()->id())[0]; in GetIteratingExitValues()
315 for (uint32_t id : cfg.preds(GetClonedLoop()->GetMergeBlock()->id())) { in FixExitCondition()
339 exit_condition->SetInOperand(2, {GetClonedLoop()->GetMergeBlock()->id()}); in FixExitCondition()
449 BasicBlock* if_merge_block = loop_->GetMergeBlock(); in PeelBefore()
[all …]
Dloop_utils.cpp455 loop_->GetMergeBlock()); in MakeLoopClosedSSA()
461 if (loop_->GetMergeBlock()) { in MakeLoopClosedSSA()
464 merging_bb_id.erase(loop_->GetMergeBlock()->id()); in MakeLoopClosedSSA()
467 exit_bb.insert(loop_->GetMergeBlock()); in MakeLoopClosedSSA()
499 new_exit_bb->SetParent(loop_->GetMergeBlock()->GetParent()); in CloneAndAttachLoopToHeader()
506 const uint32_t old_merge_block = loop_->GetMergeBlock()->id(); in CloneAndAttachLoopToHeader()
655 if (old_loop->GetMergeBlock()) { in PopulateLoopDesc()
657 cloning_result.old_to_new_bb_.find(old_loop->GetMergeBlock()->id()); in PopulateLoopDesc()
660 : old_loop->GetMergeBlock(); in PopulateLoopDesc()
Dloop_peeling.h133 if (!loop_->GetMergeBlock()) { in CanPeelLoop()
136 if (cfg.preds(loop_->GetMergeBlock()->id()).size() != 1) { in CanPeelLoop()
Dloop_descriptor.h82 merge_inst->SetInOperand(0, {GetMergeBlock()->id()}); in UpdateLoopMergeInst()
108 inline BasicBlock* GetMergeBlock() { return loop_merge_; } in GetMergeBlock() function
109 inline const BasicBlock* GetMergeBlock() const { return loop_merge_; } in GetMergeBlock() function
Dloop_descriptor.cpp370 assert(GetMergeBlock() && "This loop is not structured"); in GetMergingBlocks()
375 to_visit.push(GetMergeBlock()); in GetMergingBlocks()
414 blocks.erase(GetMergeBlock()->id()); in IsSafeToClone()
502 if (bb == GetMergeBlock()) { in ComputeLoopStructuredOrder()
508 if (include_merge && GetMergeBlock()) in ComputeLoopStructuredOrder()
/third_party/skia/third_party/externals/spirv-tools/source/opt/
Dloop_fusion.cpp122 if (context_->cfg()->preds(loop_0_->GetMergeBlock()->id()).size() != 1 || in AreCompatible()
123 context_->cfg()->preds(loop_1_->GetMergeBlock()->id()).size() != 1) { in AreCompatible()
175 if (loop_0_->GetMergeBlock() != loop_1_->GetPreHeaderBlock()) { in AreCompatible()
180 if (block == loop_0_->GetMergeBlock()) { in AreCompatible()
412 loop_0_->GetMergeBlock()->ForEachPhiInst( in IsLegal()
560 inst->SetInOperand(0, {loop_1_->GetMergeBlock()->id()}); in Fuse()
568 auto loop_0_merge_block_id = loop_0_->GetMergeBlock()->id(); in Fuse()
571 inst->SetInOperand(1, {loop_1_->GetMergeBlock()->id()}); in Fuse()
573 inst->SetInOperand(2, {loop_1_->GetMergeBlock()->id()}); in Fuse()
613 loop_0_->GetMergeBlock()->ForEachPhiInst([this](Instruction* instruction) { in Fuse()
[all …]
Dloop_unroller.cpp408 AddBlocksToFunction(loop->GetMergeBlock()); in PartiallyUnrollResidualFactor()
428 std::unique_ptr<BasicBlock>(new_loop->GetMergeBlock())); in PartiallyUnrollResidualFactor()
431 AddBlocksToFunction(loop->GetMergeBlock()); in PartiallyUnrollResidualFactor()
509 context_->ReplaceAllUsesWith(loop->GetMergeBlock()->id(), new_merge_id); in PartiallyUnrollResidualFactor()
593 AddBlocksToFunction(loop->GetMergeBlock()); in FullyUnroll()
775 latch_instruction->SetInOperand(0, {loop->GetMergeBlock()->id()}); in CloseUnrolledLoop()
821 BasicBlock* new_merge = old_loop->GetMergeBlock()->Clone(context_); in DuplicateLoop()
822 new_merge->SetParent(old_loop->GetMergeBlock()->GetParent()); in DuplicateLoop()
824 state_.new_blocks[old_loop->GetMergeBlock()->id()] = new_merge; in DuplicateLoop()
965 AddBlocksToFunction(loop->GetMergeBlock()); in PartiallyUnroll()
[all …]
Dloop_peeling.cpp73 for (uint32_t pred_id : cfg.preds(loop_->GetMergeBlock()->id())) { in DuplicateAndConnectLoop()
79 if (*succ == loop_->GetMergeBlock()->id()) in DuplicateAndConnectLoop()
85 cfg.RemoveNonExistingEdges(loop_->GetMergeBlock()->id()); in DuplicateAndConnectLoop()
221 uint32_t condition_block_id = cfg.preds(loop_->GetMergeBlock()->id())[0]; in IsConditionCheckSideEffectFree()
257 if (!loop_->GetMergeBlock()) { in GetIteratingExitValues()
260 if (cfg.preds(loop_->GetMergeBlock()->id()).size() != 1) { in GetIteratingExitValues()
265 uint32_t condition_block_id = cfg.preds(loop_->GetMergeBlock()->id())[0]; in GetIteratingExitValues()
315 for (uint32_t id : cfg.preds(GetClonedLoop()->GetMergeBlock()->id())) { in FixExitCondition()
339 exit_condition->SetInOperand(2, {GetClonedLoop()->GetMergeBlock()->id()}); in FixExitCondition()
449 BasicBlock* if_merge_block = loop_->GetMergeBlock(); in PeelBefore()
[all …]
Dloop_utils.cpp455 loop_->GetMergeBlock()); in MakeLoopClosedSSA()
461 if (loop_->GetMergeBlock()) { in MakeLoopClosedSSA()
464 merging_bb_id.erase(loop_->GetMergeBlock()->id()); in MakeLoopClosedSSA()
467 exit_bb.insert(loop_->GetMergeBlock()); in MakeLoopClosedSSA()
499 new_exit_bb->SetParent(loop_->GetMergeBlock()->GetParent()); in CloneAndAttachLoopToHeader()
506 const uint32_t old_merge_block = loop_->GetMergeBlock()->id(); in CloneAndAttachLoopToHeader()
655 if (old_loop->GetMergeBlock()) { in PopulateLoopDesc()
657 cloning_result.old_to_new_bb_.find(old_loop->GetMergeBlock()->id()); in PopulateLoopDesc()
660 : old_loop->GetMergeBlock(); in PopulateLoopDesc()
Dloop_peeling.h133 if (!loop_->GetMergeBlock()) { in CanPeelLoop()
136 if (cfg.preds(loop_->GetMergeBlock()->id()).size() != 1) { in CanPeelLoop()
Dloop_descriptor.h82 merge_inst->SetInOperand(0, {GetMergeBlock()->id()}); in UpdateLoopMergeInst()
108 inline BasicBlock* GetMergeBlock() { return loop_merge_; } in GetMergeBlock() function
109 inline const BasicBlock* GetMergeBlock() const { return loop_merge_; } in GetMergeBlock() function
Dloop_descriptor.cpp370 assert(GetMergeBlock() && "This loop is not structured"); in GetMergingBlocks()
375 to_visit.push(GetMergeBlock()); in GetMergingBlocks()
414 blocks.erase(GetMergeBlock()->id()); in IsSafeToClone()
502 if (bb == GetMergeBlock()) { in ComputeLoopStructuredOrder()
508 if (include_merge && GetMergeBlock()) in ComputeLoopStructuredOrder()
/third_party/spirv-tools/source/opt/
Dloop_fusion.cpp122 if (context_->cfg()->preds(loop_0_->GetMergeBlock()->id()).size() != 1 || in AreCompatible()
123 context_->cfg()->preds(loop_1_->GetMergeBlock()->id()).size() != 1) { in AreCompatible()
175 if (loop_0_->GetMergeBlock() != loop_1_->GetPreHeaderBlock()) { in AreCompatible()
180 if (block == loop_0_->GetMergeBlock()) { in AreCompatible()
412 loop_0_->GetMergeBlock()->ForEachPhiInst( in IsLegal()
560 inst->SetInOperand(0, {loop_1_->GetMergeBlock()->id()}); in Fuse()
568 auto loop_0_merge_block_id = loop_0_->GetMergeBlock()->id(); in Fuse()
571 inst->SetInOperand(1, {loop_1_->GetMergeBlock()->id()}); in Fuse()
573 inst->SetInOperand(2, {loop_1_->GetMergeBlock()->id()}); in Fuse()
613 loop_0_->GetMergeBlock()->ForEachPhiInst([this](Instruction* instruction) { in Fuse()
[all …]
Dloop_unroller.cpp409 AddBlocksToFunction(loop->GetMergeBlock()); in PartiallyUnrollResidualFactor()
429 std::unique_ptr<BasicBlock>(new_loop->GetMergeBlock())); in PartiallyUnrollResidualFactor()
432 AddBlocksToFunction(loop->GetMergeBlock()); in PartiallyUnrollResidualFactor()
510 context_->ReplaceAllUsesWith(loop->GetMergeBlock()->id(), new_merge_id); in PartiallyUnrollResidualFactor()
594 AddBlocksToFunction(loop->GetMergeBlock()); in FullyUnroll()
776 latch_instruction->SetInOperand(0, {loop->GetMergeBlock()->id()}); in CloseUnrolledLoop()
822 BasicBlock* new_merge = old_loop->GetMergeBlock()->Clone(context_); in DuplicateLoop()
823 new_merge->SetParent(old_loop->GetMergeBlock()->GetParent()); in DuplicateLoop()
825 state_.new_blocks[old_loop->GetMergeBlock()->id()] = new_merge; in DuplicateLoop()
966 AddBlocksToFunction(loop->GetMergeBlock()); in PartiallyUnroll()
[all …]
Dloop_peeling.cpp73 for (uint32_t pred_id : cfg.preds(loop_->GetMergeBlock()->id())) { in DuplicateAndConnectLoop()
79 if (*succ == loop_->GetMergeBlock()->id()) in DuplicateAndConnectLoop()
85 cfg.RemoveNonExistingEdges(loop_->GetMergeBlock()->id()); in DuplicateAndConnectLoop()
221 uint32_t condition_block_id = cfg.preds(loop_->GetMergeBlock()->id())[0]; in IsConditionCheckSideEffectFree()
257 if (!loop_->GetMergeBlock()) { in GetIteratingExitValues()
260 if (cfg.preds(loop_->GetMergeBlock()->id()).size() != 1) { in GetIteratingExitValues()
265 uint32_t condition_block_id = cfg.preds(loop_->GetMergeBlock()->id())[0]; in GetIteratingExitValues()
315 for (uint32_t id : cfg.preds(GetClonedLoop()->GetMergeBlock()->id())) { in FixExitCondition()
339 exit_condition->SetInOperand(2, {GetClonedLoop()->GetMergeBlock()->id()}); in FixExitCondition()
449 BasicBlock* if_merge_block = loop_->GetMergeBlock(); in PeelBefore()
[all …]
Dloop_utils.cpp455 loop_->GetMergeBlock()); in MakeLoopClosedSSA()
461 if (loop_->GetMergeBlock()) { in MakeLoopClosedSSA()
464 merging_bb_id.erase(loop_->GetMergeBlock()->id()); in MakeLoopClosedSSA()
467 exit_bb.insert(loop_->GetMergeBlock()); in MakeLoopClosedSSA()
499 new_exit_bb->SetParent(loop_->GetMergeBlock()->GetParent()); in CloneAndAttachLoopToHeader()
506 const uint32_t old_merge_block = loop_->GetMergeBlock()->id(); in CloneAndAttachLoopToHeader()
655 if (old_loop->GetMergeBlock()) { in PopulateLoopDesc()
657 cloning_result.old_to_new_bb_.find(old_loop->GetMergeBlock()->id()); in PopulateLoopDesc()
660 : old_loop->GetMergeBlock(); in PopulateLoopDesc()
Dloop_peeling.h133 if (!loop_->GetMergeBlock()) { in CanPeelLoop()
136 if (cfg.preds(loop_->GetMergeBlock()->id()).size() != 1) { in CanPeelLoop()
Dloop_descriptor.h82 merge_inst->SetInOperand(0, {GetMergeBlock()->id()}); in UpdateLoopMergeInst()
108 inline BasicBlock* GetMergeBlock() { return loop_merge_; } in GetMergeBlock() function
109 inline const BasicBlock* GetMergeBlock() const { return loop_merge_; } in GetMergeBlock() function
Dloop_descriptor.cpp370 assert(GetMergeBlock() && "This loop is not structured"); in GetMergingBlocks()
375 to_visit.push(GetMergeBlock()); in GetMergingBlocks()
414 blocks.erase(GetMergeBlock()->id()); in IsSafeToClone()
503 if (bb == GetMergeBlock()) { in ComputeLoopStructuredOrder()
509 if (include_merge && GetMergeBlock()) in ComputeLoopStructuredOrder()
/third_party/skia/third_party/externals/spirv-tools/test/opt/loop_optimizations/
Dnested_loops.cpp175 EXPECT_EQ(parent_loop.GetMergeBlock(), spvtest::GetBasicBlock(f, 22)); in TEST_F()
184 EXPECT_EQ(child_loop_1.GetMergeBlock(), spvtest::GetBasicBlock(f, 29)); in TEST_F()
193 EXPECT_EQ(child_loop_2.GetMergeBlock(), spvtest::GetBasicBlock(f, 38)); in TEST_F()
203 EXPECT_FALSE(loop->IsInsideLoop(loop->GetMergeBlock())); in CheckLoopBlocks()
372 EXPECT_EQ(loop->GetMergeBlock(), spvtest::GetBasicBlock(f, 24)); in TEST_F()
373 EXPECT_FALSE(loop->IsInsideLoop(loop->GetMergeBlock())); in TEST_F()
390 EXPECT_EQ(loop->GetMergeBlock(), spvtest::GetBasicBlock(f, 31)); in TEST_F()
391 EXPECT_FALSE(loop->IsInsideLoop(loop->GetMergeBlock())); in TEST_F()
407 EXPECT_EQ(loop->GetMergeBlock(), spvtest::GetBasicBlock(f, 42)); in TEST_F()
408 EXPECT_FALSE(loop->IsInsideLoop(loop->GetMergeBlock())); in TEST_F()
[all …]
Dloop_descriptions.cpp106 EXPECT_EQ(loop.GetMergeBlock(), spvtest::GetBasicBlock(f, 19)); in TEST_F()
/third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Tools/test/opt/loop_optimizations/
Dnested_loops.cpp175 EXPECT_EQ(parent_loop.GetMergeBlock(), spvtest::GetBasicBlock(f, 22)); in TEST_F()
184 EXPECT_EQ(child_loop_1.GetMergeBlock(), spvtest::GetBasicBlock(f, 29)); in TEST_F()
193 EXPECT_EQ(child_loop_2.GetMergeBlock(), spvtest::GetBasicBlock(f, 38)); in TEST_F()
203 EXPECT_FALSE(loop->IsInsideLoop(loop->GetMergeBlock())); in CheckLoopBlocks()
372 EXPECT_EQ(loop->GetMergeBlock(), spvtest::GetBasicBlock(f, 24)); in TEST_F()
373 EXPECT_FALSE(loop->IsInsideLoop(loop->GetMergeBlock())); in TEST_F()
390 EXPECT_EQ(loop->GetMergeBlock(), spvtest::GetBasicBlock(f, 31)); in TEST_F()
391 EXPECT_FALSE(loop->IsInsideLoop(loop->GetMergeBlock())); in TEST_F()
407 EXPECT_EQ(loop->GetMergeBlock(), spvtest::GetBasicBlock(f, 42)); in TEST_F()
408 EXPECT_FALSE(loop->IsInsideLoop(loop->GetMergeBlock())); in TEST_F()
[all …]
/third_party/spirv-tools/test/opt/loop_optimizations/
Dnested_loops.cpp175 EXPECT_EQ(parent_loop.GetMergeBlock(), spvtest::GetBasicBlock(f, 22)); in TEST_F()
184 EXPECT_EQ(child_loop_1.GetMergeBlock(), spvtest::GetBasicBlock(f, 29)); in TEST_F()
193 EXPECT_EQ(child_loop_2.GetMergeBlock(), spvtest::GetBasicBlock(f, 38)); in TEST_F()
203 EXPECT_FALSE(loop->IsInsideLoop(loop->GetMergeBlock())); in CheckLoopBlocks()
372 EXPECT_EQ(loop->GetMergeBlock(), spvtest::GetBasicBlock(f, 24)); in TEST_F()
373 EXPECT_FALSE(loop->IsInsideLoop(loop->GetMergeBlock())); in TEST_F()
390 EXPECT_EQ(loop->GetMergeBlock(), spvtest::GetBasicBlock(f, 31)); in TEST_F()
391 EXPECT_FALSE(loop->IsInsideLoop(loop->GetMergeBlock())); in TEST_F()
407 EXPECT_EQ(loop->GetMergeBlock(), spvtest::GetBasicBlock(f, 42)); in TEST_F()
408 EXPECT_FALSE(loop->IsInsideLoop(loop->GetMergeBlock())); in TEST_F()
[all …]

12