Home
last modified time | relevance | path

Searched refs:op_inst (Results 1 – 21 of 21) sorted by relevance

/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dfunctional_control_flow_to_cfg.cc135 Operation* op_inst = op.getOperation(); in LowerIfOp() local
136 Location loc = op_inst->getLoc(); in LowerIfOp()
138 OpBuilder builder(op_inst); in LowerIfOp()
146 Block* orig_block = op_inst->getBlock(); in LowerIfOp()
151 for (Value value : op_inst->getResults()) in LowerIfOp()
153 ReplaceOpResultWithBlockArgs(loc, op_inst, merge_block, &builder); in LowerIfOp()
157 auto get_operand = [&](int i) { return op_inst->getOperand(i + 1); }; in LowerIfOp()
181 op_inst->erase(); in LowerIfOp()
189 Operation* op_inst = op.getOperation(); in LowerWhileOp() local
190 Location loc = op_inst->getLoc(); in LowerWhileOp()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/transforms/
Dlegalize_control_flow.cc64 Operation* op_inst = if_op.getOperation(); in LowerIfOp() local
66 auto orig_block = op_inst->getBlock(); in LowerIfOp()
67 auto* tail_block = orig_block->splitBlock(op_inst); in LowerIfOp()
104 op_inst->erase(); in LowerIfOp()
116 auto* op_inst = while_op.getOperation(); in LowerWhileOp() local
126 auto* orig_block = op_inst->getBlock(); in LowerWhileOp()
127 auto* tail_block = orig_block->splitBlock(op_inst); in LowerWhileOp()
204 op_inst->erase(); in LowerWhileOp()
/external/angle/third_party/vulkan-deps/spirv-tools/src/source/opt/
Dreduce_load_size.cpp125 Instruction* op_inst = def_use_mgr->GetDef( in ShouldReplaceExtract() local
128 if (op_inst->opcode() != SpvOpLoad) { in ShouldReplaceExtract()
132 auto cached_result = should_replace_cache_.find(op_inst->result_id()); in ShouldReplaceExtract()
141 !def_use_mgr->WhileEachUser(op_inst, [&elements_used](Instruction* use) { in ShouldReplaceExtract()
157 analysis::Type* load_type = type_mgr->GetType(op_inst->type_id()); in ShouldReplaceExtract()
178 should_replace_cache_[op_inst->result_id()] = should_replace; in ShouldReplaceExtract()
Dfolding_rules.cpp349 Instruction* op_inst = in MergeNegateArithmetic() local
351 if (HasFloatingPoint(type) && !op_inst->IsFloatingPointFoldingAllowed()) in MergeNegateArithmetic()
354 if (op_inst->opcode() == inst->opcode()) { in MergeNegateArithmetic()
358 {{SPV_OPERAND_TYPE_ID, {op_inst->GetSingleWordInOperand(0u)}}}); in MergeNegateArithmetic()
384 Instruction* op_inst = in MergeNegateMulDivArithmetic() local
386 if (HasFloatingPoint(type) && !op_inst->IsFloatingPointFoldingAllowed()) in MergeNegateMulDivArithmetic()
392 SpvOp opcode = op_inst->opcode(); in MergeNegateMulDivArithmetic()
396 const_mgr->GetOperandConstants(op_inst); in MergeNegateMulDivArithmetic()
403 ? op_inst->GetSingleWordInOperand(0u) in MergeNegateMulDivArithmetic()
404 : op_inst->GetSingleWordInOperand(1u); in MergeNegateMulDivArithmetic()
[all …]
Dvector_dce.cpp212 Instruction* op_inst = def_use_mgr->GetDef(id); in MarkCompositeContructUsesAsLive() local
214 if (HasScalarResult(op_inst)) { in MarkCompositeContructUsesAsLive()
216 new_work_item.instruction = op_inst; in MarkCompositeContructUsesAsLive()
223 assert(HasVectorResult(op_inst)); in MarkCompositeContructUsesAsLive()
225 new_work_item.instruction = op_inst; in MarkCompositeContructUsesAsLive()
227 type_mgr->GetType(op_inst->type_id())->AsVector()->element_count(); in MarkCompositeContructUsesAsLive()
Dconvert_to_half_pass.cpp166 Instruction* op_inst = get_def_use_mgr()->GetDef(*idp); in GenHalfArith() local
167 if (!IsFloat(op_inst, 32)) return; in GenHalfArith()
287 Instruction* op_inst = get_def_use_mgr()->GetDef(*idp); in CloseRelaxInst() local
288 if (!IsFloat(op_inst, 32)) return; in CloseRelaxInst()
Dupgrade_memory_model.cpp384 Instruction* op_inst = context()->get_def_use_mgr()->GetDef(*id_ptr); in TraceInstruction() local
386 context()->get_type_mgr()->GetType(op_inst->type_id()); in TraceInstruction()
392 TraceInstruction(op_inst, indices, visited); in TraceInstruction()
635 Instruction* op_inst = in UpgradeBarriers() local
638 context()->get_type_mgr()->GetType(op_inst->type_id()); in UpgradeBarriers()
Deliminate_dead_members_pass.cpp251 Instruction* op_inst = get_def_use_mgr()->GetDef(op_id); in MarkOperandTypeAsFullyUsed() local
252 MarkTypeAsFullyUsed(op_inst->type_id()); in MarkOperandTypeAsFullyUsed()
/external/deqp-deps/SPIRV-Tools/source/opt/
Dreduce_load_size.cpp125 Instruction* op_inst = def_use_mgr->GetDef( in ShouldReplaceExtract() local
128 if (op_inst->opcode() != SpvOpLoad) { in ShouldReplaceExtract()
132 auto cached_result = should_replace_cache_.find(op_inst->result_id()); in ShouldReplaceExtract()
141 !def_use_mgr->WhileEachUser(op_inst, [&elements_used](Instruction* use) { in ShouldReplaceExtract()
157 analysis::Type* load_type = type_mgr->GetType(op_inst->type_id()); in ShouldReplaceExtract()
178 should_replace_cache_[op_inst->result_id()] = should_replace; in ShouldReplaceExtract()
Dfolding_rules.cpp296 Instruction* op_inst = in MergeNegateArithmetic() local
298 if (HasFloatingPoint(type) && !op_inst->IsFloatingPointFoldingAllowed()) in MergeNegateArithmetic()
301 if (op_inst->opcode() == inst->opcode()) { in MergeNegateArithmetic()
305 {{SPV_OPERAND_TYPE_ID, {op_inst->GetSingleWordInOperand(0u)}}}); in MergeNegateArithmetic()
331 Instruction* op_inst = in MergeNegateMulDivArithmetic() local
333 if (HasFloatingPoint(type) && !op_inst->IsFloatingPointFoldingAllowed()) in MergeNegateMulDivArithmetic()
339 SpvOp opcode = op_inst->opcode(); in MergeNegateMulDivArithmetic()
343 const_mgr->GetOperandConstants(op_inst); in MergeNegateMulDivArithmetic()
350 ? op_inst->GetSingleWordInOperand(0u) in MergeNegateMulDivArithmetic()
351 : op_inst->GetSingleWordInOperand(1u); in MergeNegateMulDivArithmetic()
[all …]
Dvector_dce.cpp212 Instruction* op_inst = def_use_mgr->GetDef(id); in MarkCompositeContructUsesAsLive() local
214 if (HasScalarResult(op_inst)) { in MarkCompositeContructUsesAsLive()
216 new_work_item.instruction = op_inst; in MarkCompositeContructUsesAsLive()
223 assert(HasVectorResult(op_inst)); in MarkCompositeContructUsesAsLive()
225 new_work_item.instruction = op_inst; in MarkCompositeContructUsesAsLive()
227 type_mgr->GetType(op_inst->type_id())->AsVector()->element_count(); in MarkCompositeContructUsesAsLive()
Dconvert_to_half_pass.cpp166 Instruction* op_inst = get_def_use_mgr()->GetDef(*idp); in GenHalfArith() local
167 if (!IsFloat(op_inst, 32)) return; in GenHalfArith()
287 Instruction* op_inst = get_def_use_mgr()->GetDef(*idp); in CloseRelaxInst() local
288 if (!IsFloat(op_inst, 32)) return; in CloseRelaxInst()
Dupgrade_memory_model.cpp384 Instruction* op_inst = context()->get_def_use_mgr()->GetDef(*id_ptr); in TraceInstruction() local
386 context()->get_type_mgr()->GetType(op_inst->type_id()); in TraceInstruction()
392 TraceInstruction(op_inst, indices, visited); in TraceInstruction()
635 Instruction* op_inst = in UpgradeBarriers() local
638 context()->get_type_mgr()->GetType(op_inst->type_id()); in UpgradeBarriers()
Deliminate_dead_members_pass.cpp251 Instruction* op_inst = get_def_use_mgr()->GetDef(op_id); in MarkOperandTypeAsFullyUsed() local
252 MarkTypeAsFullyUsed(op_inst->type_id()); in MarkOperandTypeAsFullyUsed()
/external/swiftshader/third_party/SPIRV-Tools/source/opt/
Dreduce_load_size.cpp125 Instruction* op_inst = def_use_mgr->GetDef( in ShouldReplaceExtract() local
128 if (op_inst->opcode() != SpvOpLoad) { in ShouldReplaceExtract()
132 auto cached_result = should_replace_cache_.find(op_inst->result_id()); in ShouldReplaceExtract()
141 !def_use_mgr->WhileEachUser(op_inst, [&elements_used](Instruction* use) { in ShouldReplaceExtract()
157 analysis::Type* load_type = type_mgr->GetType(op_inst->type_id()); in ShouldReplaceExtract()
178 should_replace_cache_[op_inst->result_id()] = should_replace; in ShouldReplaceExtract()
Dfolding_rules.cpp296 Instruction* op_inst = in MergeNegateArithmetic() local
298 if (HasFloatingPoint(type) && !op_inst->IsFloatingPointFoldingAllowed()) in MergeNegateArithmetic()
301 if (op_inst->opcode() == inst->opcode()) { in MergeNegateArithmetic()
305 {{SPV_OPERAND_TYPE_ID, {op_inst->GetSingleWordInOperand(0u)}}}); in MergeNegateArithmetic()
331 Instruction* op_inst = in MergeNegateMulDivArithmetic() local
333 if (HasFloatingPoint(type) && !op_inst->IsFloatingPointFoldingAllowed()) in MergeNegateMulDivArithmetic()
339 SpvOp opcode = op_inst->opcode(); in MergeNegateMulDivArithmetic()
343 const_mgr->GetOperandConstants(op_inst); in MergeNegateMulDivArithmetic()
350 ? op_inst->GetSingleWordInOperand(0u) in MergeNegateMulDivArithmetic()
351 : op_inst->GetSingleWordInOperand(1u); in MergeNegateMulDivArithmetic()
[all …]
Dvector_dce.cpp212 Instruction* op_inst = def_use_mgr->GetDef(id); in MarkCompositeContructUsesAsLive() local
214 if (HasScalarResult(op_inst)) { in MarkCompositeContructUsesAsLive()
216 new_work_item.instruction = op_inst; in MarkCompositeContructUsesAsLive()
223 assert(HasVectorResult(op_inst)); in MarkCompositeContructUsesAsLive()
225 new_work_item.instruction = op_inst; in MarkCompositeContructUsesAsLive()
227 type_mgr->GetType(op_inst->type_id())->AsVector()->element_count(); in MarkCompositeContructUsesAsLive()
Dconvert_to_half_pass.cpp166 Instruction* op_inst = get_def_use_mgr()->GetDef(*idp); in GenHalfArith() local
167 if (!IsFloat(op_inst, 32)) return; in GenHalfArith()
287 Instruction* op_inst = get_def_use_mgr()->GetDef(*idp); in CloseRelaxInst() local
288 if (!IsFloat(op_inst, 32)) return; in CloseRelaxInst()
Dupgrade_memory_model.cpp384 Instruction* op_inst = context()->get_def_use_mgr()->GetDef(*id_ptr); in TraceInstruction() local
386 context()->get_type_mgr()->GetType(op_inst->type_id()); in TraceInstruction()
392 TraceInstruction(op_inst, indices, visited); in TraceInstruction()
635 Instruction* op_inst = in UpgradeBarriers() local
638 context()->get_type_mgr()->GetType(op_inst->type_id()); in UpgradeBarriers()
Deliminate_dead_members_pass.cpp251 Instruction* op_inst = get_def_use_mgr()->GetDef(op_id); in MarkOperandTypeAsFullyUsed() local
252 MarkTypeAsFullyUsed(op_inst->type_id()); in MarkOperandTypeAsFullyUsed()
/external/tensorflow/tensorflow/compiler/mlir/lite/quantization/
Dquantization_utils.h249 if (auto op_inst = dyn_cast_or_null<DQ>(operand.getDefiningOp())) { in matchAndRewrite() local
250 inputs.push_back(op_inst.input()); in matchAndRewrite()