/external/deqp-deps/SPIRV-Tools/source/fuzz/ |
D | transformation_add_loop_preheader.cpp | 145 &phi_ids_used](opt::Instruction* phi_inst) { in Apply() argument 148 assert(phi_inst->NumInOperands() >= 4); in Apply() 150 if (phi_inst->NumInOperands() == 4) { in Apply() 156 phi_inst->GetInOperand(1).words[0] == back_edge_block_id ? 3 : 1; in Apply() 157 phi_inst->SetInOperand(index_of_out_of_loop_pred_id, {preheader->id()}); in Apply() 168 for (uint32_t i = 0; i < phi_inst->NumInOperands(); i += 2) { in Apply() 170 if (phi_inst->GetInOperand(i + 1).words[0] == back_edge_block_id) { in Apply() 171 back_edge_val = phi_inst->GetInOperand(i).words[0]; in Apply() 173 preheader_in_operands.push_back(std::move(phi_inst->GetInOperand(i))); in Apply() 175 std::move(phi_inst->GetInOperand(i + 1))); in Apply() [all …]
|
D | transformation_flatten_conditional_branch.cpp | 403 [&last_block_first_branch](opt::Instruction* phi_inst) { in Apply() argument 406 phi_inst->SetInOperand(1, {last_block_first_branch->id()}); in Apply() 895 &require_4d_boolean_vector](opt::Instruction* phi_inst) { in RewriteOpPhiInstructionsAtConvergenceBlock() argument 896 assert(phi_inst->NumInOperands() == 4 && in RewriteOpPhiInstructionsAtConvergenceBlock() 906 ir_context->get_def_use_mgr()->GetDef(phi_inst->type_id()); in RewriteOpPhiInstructionsAtConvergenceBlock() 966 if (phi_inst->GetSingleWordInOperand(1) == in RewriteOpPhiInstructionsAtConvergenceBlock() 968 operands.emplace_back(phi_inst->GetInOperand(0)); in RewriteOpPhiInstructionsAtConvergenceBlock() 969 operands.emplace_back(phi_inst->GetInOperand(2)); in RewriteOpPhiInstructionsAtConvergenceBlock() 971 assert(phi_inst->GetSingleWordInOperand(3) == in RewriteOpPhiInstructionsAtConvergenceBlock() 977 operands.emplace_back(phi_inst->GetInOperand(2)); in RewriteOpPhiInstructionsAtConvergenceBlock() [all …]
|
D | transformation_replace_branch_from_dead_block_with_exit.cpp | 103 successor->ForEachPhiInst([block](opt::Instruction* phi_inst) { in Apply() argument 105 for (uint32_t i = 0; i < phi_inst->NumInOperands(); i += 2) { in Apply() 106 if (phi_inst->GetSingleWordInOperand(i + 1) == block->id()) { in Apply() 109 new_phi_in_operands.emplace_back(phi_inst->GetInOperand(i)); in Apply() 110 new_phi_in_operands.emplace_back(phi_inst->GetInOperand(i + 1)); in Apply() 112 assert(new_phi_in_operands.size() == phi_inst->NumInOperands() - 2); in Apply() 113 phi_inst->SetInOperands(std::move(new_phi_in_operands)); in Apply()
|
D | transformation_add_dead_block.cpp | 167 ->ForEachPhiInst([this](opt::Instruction* phi_inst) { in Apply() argument 170 opt::Operand copy_of_existing_operand = phi_inst->GetInOperand(0); in Apply() 172 phi_inst->AddOperand(std::move(copy_of_existing_operand)); in Apply() 173 phi_inst->AddOperand({SPV_OPERAND_TYPE_ID, {message_.fresh_id()}}); in Apply()
|
D | fuzzer_pass_merge_function_returns.cpp | 295 opt::Instruction* phi_inst) { in GetInfoNeededForMergeBlocks() argument 297 entry.set_first(phi_inst->result_id()); in GetInfoNeededForMergeBlocks() 300 if (ids_available_after_entry_block->count(phi_inst->type_id())) { in GetInfoNeededForMergeBlocks() 302 ids_available_after_entry_block->at(phi_inst->type_id()); in GetInfoNeededForMergeBlocks() 308 this->FindOrCreateGlobalUndef(phi_inst->type_id()); in GetInfoNeededForMergeBlocks() 311 phi_inst->type_id(), std::vector<uint32_t>({suitable_id})); in GetInfoNeededForMergeBlocks()
|
D | transformation_split_block.cpp | 119 new_bb->ForEachPhiInst([block_to_split](opt::Instruction* phi_inst) { in Apply() argument 121 phi_inst->NumInOperands() == 2 && in Apply() 124 phi_inst->SetInOperand(1, {block_to_split->id()}); in Apply()
|
D | transformation_propagate_instruction_up.cpp | 24 uint32_t GetResultIdFromLabelId(const opt::Instruction& phi_inst, in GetResultIdFromLabelId() argument 26 assert(phi_inst.opcode() == SpvOpPhi && "|phi_inst| is not an OpPhi"); in GetResultIdFromLabelId() 28 for (uint32_t i = 1; i < phi_inst.NumInOperands(); i += 2) { in GetResultIdFromLabelId() 29 if (phi_inst.GetSingleWordInOperand(i) == label_id) { in GetResultIdFromLabelId() 30 return phi_inst.GetSingleWordInOperand(i - 1); in GetResultIdFromLabelId()
|
D | transformation_outline_function.cpp | 819 cloned_block->ForEachPhiInst([this](opt::Instruction* phi_inst) { in PopulateOutlinedFunction() argument 821 predecessor_index < phi_inst->NumInOperands(); in PopulateOutlinedFunction() 823 if (phi_inst->GetSingleWordInOperand(predecessor_index) == in PopulateOutlinedFunction() 825 phi_inst->SetInOperand(predecessor_index, in PopulateOutlinedFunction() 919 block_it->ForEachPhiInst([this](opt::Instruction* phi_inst) { in ShrinkOriginalRegion() argument 921 predecessor_index < phi_inst->NumInOperands(); in ShrinkOriginalRegion() 923 if (phi_inst->GetSingleWordInOperand(predecessor_index) == in ShrinkOriginalRegion() 925 phi_inst->SetInOperand(predecessor_index, {message_.entry_block()}); in ShrinkOriginalRegion()
|
/external/swiftshader/third_party/SPIRV-Tools/source/fuzz/ |
D | transformation_add_loop_preheader.cpp | 145 &phi_ids_used](opt::Instruction* phi_inst) { in Apply() argument 148 assert(phi_inst->NumInOperands() >= 4); in Apply() 150 if (phi_inst->NumInOperands() == 4) { in Apply() 156 phi_inst->GetInOperand(1).words[0] == back_edge_block_id ? 3 : 1; in Apply() 157 phi_inst->SetInOperand(index_of_out_of_loop_pred_id, {preheader->id()}); in Apply() 168 for (uint32_t i = 0; i < phi_inst->NumInOperands(); i += 2) { in Apply() 170 if (phi_inst->GetInOperand(i + 1).words[0] == back_edge_block_id) { in Apply() 171 back_edge_val = phi_inst->GetInOperand(i).words[0]; in Apply() 173 preheader_in_operands.push_back(std::move(phi_inst->GetInOperand(i))); in Apply() 175 std::move(phi_inst->GetInOperand(i + 1))); in Apply() [all …]
|
D | transformation_flatten_conditional_branch.cpp | 403 [&last_block_first_branch](opt::Instruction* phi_inst) { in Apply() argument 406 phi_inst->SetInOperand(1, {last_block_first_branch->id()}); in Apply() 895 &require_4d_boolean_vector](opt::Instruction* phi_inst) { in RewriteOpPhiInstructionsAtConvergenceBlock() argument 896 assert(phi_inst->NumInOperands() == 4 && in RewriteOpPhiInstructionsAtConvergenceBlock() 906 ir_context->get_def_use_mgr()->GetDef(phi_inst->type_id()); in RewriteOpPhiInstructionsAtConvergenceBlock() 966 if (phi_inst->GetSingleWordInOperand(1) == in RewriteOpPhiInstructionsAtConvergenceBlock() 968 operands.emplace_back(phi_inst->GetInOperand(0)); in RewriteOpPhiInstructionsAtConvergenceBlock() 969 operands.emplace_back(phi_inst->GetInOperand(2)); in RewriteOpPhiInstructionsAtConvergenceBlock() 971 assert(phi_inst->GetSingleWordInOperand(3) == in RewriteOpPhiInstructionsAtConvergenceBlock() 977 operands.emplace_back(phi_inst->GetInOperand(2)); in RewriteOpPhiInstructionsAtConvergenceBlock() [all …]
|
D | transformation_replace_branch_from_dead_block_with_exit.cpp | 103 successor->ForEachPhiInst([block](opt::Instruction* phi_inst) { in Apply() argument 105 for (uint32_t i = 0; i < phi_inst->NumInOperands(); i += 2) { in Apply() 106 if (phi_inst->GetSingleWordInOperand(i + 1) == block->id()) { in Apply() 109 new_phi_in_operands.emplace_back(phi_inst->GetInOperand(i)); in Apply() 110 new_phi_in_operands.emplace_back(phi_inst->GetInOperand(i + 1)); in Apply() 112 assert(new_phi_in_operands.size() == phi_inst->NumInOperands() - 2); in Apply() 113 phi_inst->SetInOperands(std::move(new_phi_in_operands)); in Apply()
|
D | transformation_add_dead_block.cpp | 167 ->ForEachPhiInst([this](opt::Instruction* phi_inst) { in Apply() argument 170 opt::Operand copy_of_existing_operand = phi_inst->GetInOperand(0); in Apply() 172 phi_inst->AddOperand(std::move(copy_of_existing_operand)); in Apply() 173 phi_inst->AddOperand({SPV_OPERAND_TYPE_ID, {message_.fresh_id()}}); in Apply()
|
D | fuzzer_pass_merge_function_returns.cpp | 295 opt::Instruction* phi_inst) { in GetInfoNeededForMergeBlocks() argument 297 entry.set_first(phi_inst->result_id()); in GetInfoNeededForMergeBlocks() 300 if (ids_available_after_entry_block->count(phi_inst->type_id())) { in GetInfoNeededForMergeBlocks() 302 ids_available_after_entry_block->at(phi_inst->type_id()); in GetInfoNeededForMergeBlocks() 308 this->FindOrCreateGlobalUndef(phi_inst->type_id()); in GetInfoNeededForMergeBlocks() 311 phi_inst->type_id(), std::vector<uint32_t>({suitable_id})); in GetInfoNeededForMergeBlocks()
|
D | transformation_split_block.cpp | 119 new_bb->ForEachPhiInst([block_to_split](opt::Instruction* phi_inst) { in Apply() argument 121 phi_inst->NumInOperands() == 2 && in Apply() 124 phi_inst->SetInOperand(1, {block_to_split->id()}); in Apply()
|
D | transformation_propagate_instruction_up.cpp | 24 uint32_t GetResultIdFromLabelId(const opt::Instruction& phi_inst, in GetResultIdFromLabelId() argument 26 assert(phi_inst.opcode() == SpvOpPhi && "|phi_inst| is not an OpPhi"); in GetResultIdFromLabelId() 28 for (uint32_t i = 1; i < phi_inst.NumInOperands(); i += 2) { in GetResultIdFromLabelId() 29 if (phi_inst.GetSingleWordInOperand(i) == label_id) { in GetResultIdFromLabelId() 30 return phi_inst.GetSingleWordInOperand(i - 1); in GetResultIdFromLabelId()
|
D | transformation_outline_function.cpp | 819 cloned_block->ForEachPhiInst([this](opt::Instruction* phi_inst) { in PopulateOutlinedFunction() argument 821 predecessor_index < phi_inst->NumInOperands(); in PopulateOutlinedFunction() 823 if (phi_inst->GetSingleWordInOperand(predecessor_index) == in PopulateOutlinedFunction() 825 phi_inst->SetInOperand(predecessor_index, in PopulateOutlinedFunction() 919 block_it->ForEachPhiInst([this](opt::Instruction* phi_inst) { in ShrinkOriginalRegion() argument 921 predecessor_index < phi_inst->NumInOperands(); in ShrinkOriginalRegion() 923 if (phi_inst->GetSingleWordInOperand(predecessor_index) == in ShrinkOriginalRegion() 925 phi_inst->SetInOperand(predecessor_index, {message_.entry_block()}); in ShrinkOriginalRegion()
|
D | transformation_add_loop_to_create_int_constant_synonym.cpp | 403 [last_loop_block_id](opt::Instruction* phi_inst) { in Apply() argument 406 phi_inst->SetInOperand(1, {last_loop_block_id}); in Apply()
|
/external/swiftshader/third_party/SPIRV-Tools/source/reduce/ |
D | reduction_util.cpp | 103 to_block->ForEachPhiInst([&from_id](opt::Instruction* phi_inst) { in AdaptPhiInstructionsForRemovedEdge() argument 106 for (uint32_t index = 0; index < phi_inst->NumInOperands(); index += 2) { in AdaptPhiInstructionsForRemovedEdge() 109 if (phi_inst->GetInOperand(index + 1).words[0] != from_id) { in AdaptPhiInstructionsForRemovedEdge() 110 new_in_operands.push_back(phi_inst->GetInOperand(index)); in AdaptPhiInstructionsForRemovedEdge() 111 new_in_operands.push_back(phi_inst->GetInOperand(index + 1)); in AdaptPhiInstructionsForRemovedEdge() 114 phi_inst->SetInOperands(std::move(new_in_operands)); in AdaptPhiInstructionsForRemovedEdge()
|
D | structured_loop_to_selection_reduction_opportunity.cpp | 170 to_block->ForEachPhiInst([this, &from_id](opt::Instruction* phi_inst) { in AdaptPhiInstructionsForAddedEdge() argument 173 auto undef_id = FindOrCreateGlobalUndef(context_, phi_inst->type_id()); in AdaptPhiInstructionsForAddedEdge() 174 phi_inst->AddOperand(opt::Operand(SPV_OPERAND_TYPE_ID, {undef_id})); in AdaptPhiInstructionsForAddedEdge() 175 phi_inst->AddOperand(opt::Operand(SPV_OPERAND_TYPE_ID, {from_id})); in AdaptPhiInstructionsForAddedEdge()
|
/external/deqp-deps/SPIRV-Tools/source/reduce/ |
D | reduction_util.cpp | 103 to_block->ForEachPhiInst([&from_id](opt::Instruction* phi_inst) { in AdaptPhiInstructionsForRemovedEdge() argument 106 for (uint32_t index = 0; index < phi_inst->NumInOperands(); index += 2) { in AdaptPhiInstructionsForRemovedEdge() 109 if (phi_inst->GetInOperand(index + 1).words[0] != from_id) { in AdaptPhiInstructionsForRemovedEdge() 110 new_in_operands.push_back(phi_inst->GetInOperand(index)); in AdaptPhiInstructionsForRemovedEdge() 111 new_in_operands.push_back(phi_inst->GetInOperand(index + 1)); in AdaptPhiInstructionsForRemovedEdge() 114 phi_inst->SetInOperands(std::move(new_in_operands)); in AdaptPhiInstructionsForRemovedEdge()
|
D | structured_loop_to_selection_reduction_opportunity.cpp | 170 to_block->ForEachPhiInst([this, &from_id](opt::Instruction* phi_inst) { in AdaptPhiInstructionsForAddedEdge() argument 173 auto undef_id = FindOrCreateGlobalUndef(context_, phi_inst->type_id()); in AdaptPhiInstructionsForAddedEdge() 174 phi_inst->AddOperand(opt::Operand(SPV_OPERAND_TYPE_ID, {undef_id})); in AdaptPhiInstructionsForAddedEdge() 175 phi_inst->AddOperand(opt::Operand(SPV_OPERAND_TYPE_ID, {from_id})); in AdaptPhiInstructionsForAddedEdge()
|
/external/swiftshader/third_party/SPIRV-Tools/source/opt/ |
D | basic_block.cpp | 261 [this, new_block, context](Instruction* phi_inst) { in SplitBasicBlock() argument 263 for (uint32_t i = 1; i < phi_inst->NumInOperands(); i += 2) { in SplitBasicBlock() 264 if (phi_inst->GetSingleWordInOperand(i) == this->id()) { in SplitBasicBlock() 266 phi_inst->SetInOperand(i, {new_block->id()}); in SplitBasicBlock() 271 context->UpdateDefUse(phi_inst); in SplitBasicBlock()
|
D | ssa_rewrite_pass.cpp | 548 std::unique_ptr<Instruction> phi_inst( in ApplyReplacements() local 551 generated_phis.push_back(phi_inst.get()); in ApplyReplacements() 552 pass_->get_def_use_mgr()->AnalyzeInstDef(&*phi_inst); in ApplyReplacements() 553 pass_->context()->set_instr_block(&*phi_inst, phi_candidate->bb()); in ApplyReplacements() 555 insert_it = insert_it.InsertBefore(std::move(phi_inst)); in ApplyReplacements() 572 for (Instruction* phi_inst : generated_phis) { in ApplyReplacements() 573 pass_->get_def_use_mgr()->AnalyzeInstUse(&*phi_inst); in ApplyReplacements()
|
/external/deqp-deps/SPIRV-Tools/source/opt/ |
D | basic_block.cpp | 261 [this, new_block, context](Instruction* phi_inst) { in SplitBasicBlock() argument 263 for (uint32_t i = 1; i < phi_inst->NumInOperands(); i += 2) { in SplitBasicBlock() 264 if (phi_inst->GetSingleWordInOperand(i) == this->id()) { in SplitBasicBlock() 266 phi_inst->SetInOperand(i, {new_block->id()}); in SplitBasicBlock() 271 context->UpdateDefUse(phi_inst); in SplitBasicBlock()
|
D | ssa_rewrite_pass.cpp | 548 std::unique_ptr<Instruction> phi_inst( in ApplyReplacements() local 551 generated_phis.push_back(phi_inst.get()); in ApplyReplacements() 552 pass_->get_def_use_mgr()->AnalyzeInstDef(&*phi_inst); in ApplyReplacements() 553 pass_->context()->set_instr_block(&*phi_inst, phi_candidate->bb()); in ApplyReplacements() 555 insert_it = insert_it.InsertBefore(std::move(phi_inst)); in ApplyReplacements() 572 for (Instruction* phi_inst : generated_phis) { in ApplyReplacements() 573 pass_->get_def_use_mgr()->AnalyzeInstUse(&*phi_inst); in ApplyReplacements()
|