Home
last modified time | relevance | path

Searched refs:phi_inst (Results 1 – 25 of 35) sorted by relevance

12

/external/deqp-deps/SPIRV-Tools/source/fuzz/
Dtransformation_add_loop_preheader.cpp145 &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 …]
Dtransformation_flatten_conditional_branch.cpp403 [&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 …]
Dtransformation_replace_branch_from_dead_block_with_exit.cpp103 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()
Dtransformation_add_dead_block.cpp167 ->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()
Dfuzzer_pass_merge_function_returns.cpp295 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()
Dtransformation_split_block.cpp119 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()
Dtransformation_propagate_instruction_up.cpp24 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()
Dtransformation_outline_function.cpp819 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/
Dtransformation_add_loop_preheader.cpp145 &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 …]
Dtransformation_flatten_conditional_branch.cpp403 [&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 …]
Dtransformation_replace_branch_from_dead_block_with_exit.cpp103 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()
Dtransformation_add_dead_block.cpp167 ->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()
Dfuzzer_pass_merge_function_returns.cpp295 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()
Dtransformation_split_block.cpp119 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()
Dtransformation_propagate_instruction_up.cpp24 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()
Dtransformation_outline_function.cpp819 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()
Dtransformation_add_loop_to_create_int_constant_synonym.cpp403 [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/
Dreduction_util.cpp103 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()
Dstructured_loop_to_selection_reduction_opportunity.cpp170 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/
Dreduction_util.cpp103 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()
Dstructured_loop_to_selection_reduction_opportunity.cpp170 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/
Dbasic_block.cpp261 [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()
Dssa_rewrite_pass.cpp548 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/
Dbasic_block.cpp261 [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()
Dssa_rewrite_pass.cpp548 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()

12