Home
last modified time | relevance | path

Searched refs:phi (Results 1 – 25 of 61) sorted by relevance

123

/art/compiler/optimizing/
Dssa_phi_elimination.cc48 HPhi* phi = inst_it.Current()->AsPhi(); in MarkDeadPhis() local
49 if (phi->IsDead()) { in MarkDeadPhis()
53 bool keep_alive = (graph_->IsDebuggable() && phi->HasEnvironmentUses()); in MarkDeadPhis()
55 for (const HUseListNode<HInstruction*>& use : phi->GetUses()) { in MarkDeadPhis()
64 worklist.push_back(phi); in MarkDeadPhis()
66 phi->SetDead(); in MarkDeadPhis()
68 initially_live.insert(phi); in MarkDeadPhis()
76 HPhi* phi = worklist.back(); in MarkDeadPhis() local
78 for (HInstruction* raw_input : phi->GetInputs()) { in MarkDeadPhis()
98 HPhi* phi; in EliminateDeadPhis() local
[all …]
Dssa_builder.cc69 HPhi* phi = it.Current()->AsPhi(); in EquivalentPhisCleanup() local
70 HPhi* next = phi->GetNextEquivalentPhiWithSameType(); in EquivalentPhisCleanup()
75 phi->ReplaceWith(next); in EquivalentPhisCleanup()
76 phi->SetDead(); in EquivalentPhisCleanup()
78 next->ReplaceWith(phi); in EquivalentPhisCleanup()
81 << "More then one phi equivalent with type " << phi->GetType() in EquivalentPhisCleanup()
82 << " found for phi" << phi->GetId(); in EquivalentPhisCleanup()
91 HPhi* phi = it_phis.Current()->AsPhi(); in FixEnvironmentPhis() local
93 if (!phi->IsDead() || !phi->HasEnvironmentUses()) continue; in FixEnvironmentPhis()
94 HInstruction* next = phi->GetNext(); in FixEnvironmentPhis()
[all …]
Dselect_generator.cc79 HPhi* phi = it.Current()->AsPhi(); in GetSingleChangedPhi() local
80 if (phi->InputAt(index1) != phi->InputAt(index2)) { in GetSingleChangedPhi()
83 select_phi = phi; in GetSingleChangedPhi()
140 HPhi* phi = GetSingleChangedPhi(merge_block, predecessor_index_true, predecessor_index_false); in Run() local
147 } else if (phi != nullptr) { in Run()
148 true_value = phi->InputAt(predecessor_index_true); in Run()
149 false_value = phi->InputAt(predecessor_index_false); in Run()
153 DCHECK(both_successors_return || phi != nullptr); in Run()
166 } else if (phi->GetType() == DataType::Type::kReference) { in Run()
167 select->SetReferenceTypeInfo(phi->GetReferenceTypeInfo()); in Run()
[all …]
Dgraph_checker.cc807 void GraphChecker::VisitPhi(HPhi* phi) { in VisitPhi() argument
808 VisitInstruction(phi); in VisitPhi()
811 ArrayRef<HUserRecord<HInstruction*>> input_records = phi->GetInputRecords(); in VisitPhi()
812 if (input_records[0].GetInstruction() == phi) { in VisitPhi()
814 phi->GetId(), in VisitPhi()
815 phi->GetBlock()->GetBlockId())); in VisitPhi()
821 if (DataType::Kind(input->GetType()) != DataType::Kind(phi->GetType())) { in VisitPhi()
825 input->GetId(), i, phi->GetId(), phi->GetBlock()->GetBlockId(), in VisitPhi()
827 DataType::PrettyDescriptor(phi->GetType()))); in VisitPhi()
830 if (phi->GetType() != HPhi::ToPhiType(phi->GetType())) { in VisitPhi()
[all …]
Dselect_generator_test.cc63 HPhi* phi = new (GetAllocator()) HPhi(GetAllocator(), 0, 0, DataType::Type::kInt32); in ConstructBasicGraphForSelect() local
64 return_block_->AddPhi(phi); in ConstructBasicGraphForSelect()
65 phi->AddInput(instr); in ConstructBasicGraphForSelect()
66 phi->AddInput(const1); in ConstructBasicGraphForSelect()
Dbounds_check_elimination_test.cc391 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, DataType::Type::kInt32); in BuildSSAGraph1() local
396 cmp = new (allocator) HGreaterThanOrEqual(phi, array_length); in BuildSSAGraph1()
399 cmp = new (allocator) HGreaterThan(phi, array_length); in BuildSSAGraph1()
402 loop_header->AddPhi(phi); in BuildSSAGraph1()
407 phi->AddInput(constant_initial); in BuildSSAGraph1()
411 HInstruction* bounds_check = new (allocator) HBoundsCheck(phi, array_length, 0); in BuildSSAGraph1()
415 HInstruction* add = new (allocator) HAdd(DataType::Type::kInt32, phi, constant_increment); in BuildSSAGraph1()
422 phi->AddInput(add); in BuildSSAGraph1()
511 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, DataType::Type::kInt32); in BuildSSAGraph2() local
514 cmp = new (allocator) HLessThanOrEqual(phi, constant_initial); in BuildSSAGraph2()
[all …]
Dsuperblock_cloner.cc63 static bool ArePhiInputsTheSame(const HPhi* phi) { in ArePhiInputsTheSame() argument
64 HInstruction* first_input = phi->InputAt(0); in ArePhiInputsTheSame()
65 for (size_t i = 1, e = phi->InputCount(); i < e; i++) { in ArePhiInputsTheSame()
66 if (phi->InputAt(i) != first_input) { in ArePhiInputsTheSame()
426 void SuperblockCloner::ResolvePhi(HPhi* phi) { in ResolvePhi() argument
427 HBasicBlock* phi_block = phi->GetBlock(); in ResolvePhi()
428 for (size_t i = 0, e = phi->InputCount(); i < e; i++) { in ResolvePhi()
429 HInstruction* input = phi->InputAt(i); in ResolvePhi()
438 phi->ReplaceInput(GetInstrCopy(input), i); in ResolvePhi()
633 HPhi* phi = new (arena_) HPhi(arena_, kNoRegNumber, 0, value->GetType()); in ConstructSubgraphClosedSSA() local
[all …]
Dinduction_var_range_test.cc102 HPhi* phi = new (GetAllocator()) HPhi(GetAllocator(), 0, 0, DataType::Type::kInt32); in BuildLoop() local
103 loop_header_->AddPhi(phi); in BuildLoop()
104 phi->AddInput(graph_->GetIntConstant(lower)); // i = l in BuildLoop()
106 condition_ = new (GetAllocator()) HLessThan(phi, upper); // i < u in BuildLoop()
108 condition_ = new (GetAllocator()) HGreaterThan(phi, upper); // i > u in BuildLoop()
113 new (GetAllocator()) HAdd(DataType::Type::kInt32, phi, graph_->GetIntConstant(stride)); in BuildLoop()
115 phi->AddInput(increment_); in BuildLoop()
762 HInstruction* phi = condition_->InputAt(0); in TEST_F() local
766 range_.GetInductionRange(condition_, phi, x_, &v1, &v2, &needs_finite_test); in TEST_F()
772 range_.GetInductionRange(increment_, phi, x_, &v1, &v2, &needs_finite_test); in TEST_F()
[all …]
Dinduction_var_analysis.cc33 HInstruction* phi = nullptr; in RotateEntryPhiFirst() local
38 if (other->IsLoopHeaderPhi() && (phi == nullptr || phis.FoundBefore(other, phi))) { in RotateEntryPhiFirst()
39 phi = other; in RotateEntryPhiFirst()
45 if (phi != nullptr) { in RotateEntryPhiFirst()
405 HInstruction* phi = scc_[0]; in ClassifyNonTrivial() local
406 if (!phi->IsLoopHeaderPhi()) { in ClassifyNonTrivial()
411 InductionInfo* initial = LookupInfo(loop, phi->InputAt(0)); in ClassifyNonTrivial()
425 InductionInfo* update = TransferPhi(loop, phi, /*input_index*/ 1, /*adjust_input_size*/ 0); in ClassifyNonTrivial()
427 AssignInfo(loop, phi, CreateInduction(kWrapAround, in ClassifyNonTrivial()
443 update = SolvePhiAllInputs(loop, phi, instruction); in ClassifyNonTrivial()
[all …]
Dssa_builder.h113 bool TypeInputsOfPhi(HPhi* phi, ScopedArenaVector<HPhi*>* worklist);
114 bool UpdatePrimitiveType(HPhi* phi, ScopedArenaVector<HPhi*>* worklist);
119 HPhi* GetFloatDoubleOrReferenceEquivalentOfPhi(HPhi* phi, DataType::Type type);
Dloop_optimization.cc342 static bool HasReductionFormat(HInstruction* reduction, HInstruction* phi) { in HasReductionFormat() argument
344 return (reduction->InputAt(0) == phi && reduction->InputAt(1) != phi) || in HasReductionFormat()
345 (reduction->InputAt(0) != phi && reduction->InputAt(1) == phi); in HasReductionFormat()
347 return (reduction->InputAt(0) == phi && reduction->InputAt(1) != phi); in HasReductionFormat()
653 HPhi* phi = it.Current()->AsPhi(); in SimplifyInduction() local
654 if (TrySetPhiInduction(phi, /*restrict_uses*/ true) && in SimplifyInduction()
655 TryAssignLastValue(node->loop_info, phi, preheader, /*collect_loop_uses*/ false)) { in SimplifyInduction()
1186 HInstruction* phi = i->first; in Vectorize() local
1189 for (const HUseListNode<HInstruction*>& use : phi->GetUses()) { in Vectorize()
1190 induction_range_.Replace(use.GetUser(), phi, repl); // update induction use in Vectorize()
[all …]
Ddead_code_elimination.cc343 HPhi* phi = block->GetFirstPhi()->AsPhi(); in SimplifyIfs() local
344 bool phi_input_is_left = (first->InputAt(0) == phi); in SimplifyIfs()
349 for (size_t i = 0; i < phi->InputCount();) { in SimplifyIfs()
350 HInstruction* input = phi->InputAt(i); in SimplifyIfs()
378 phi->RemoveInputAt(i); in SimplifyIfs()
385 if (phi->InputCount() == 1) { in SimplifyIfs()
391 phi->ReplaceWith(phi->InputAt(0)); in SimplifyIfs()
392 block->RemovePhi(phi); in SimplifyIfs()
Dbounds_check_elimination.cc933 static bool HasSameInputAtBackEdges(HPhi* phi) { in HasSameInputAtBackEdges() argument
934 DCHECK(phi->IsLoopHeaderPhi()); in HasSameInputAtBackEdges()
935 HConstInputsRef inputs = phi->GetInputs(); in HasSameInputAtBackEdges()
938 DCHECK(phi->GetBlock()->GetLoopInformation()->IsBackEdge( in HasSameInputAtBackEdges()
939 *phi->GetBlock()->GetPredecessors()[1])); in HasSameInputAtBackEdges()
941 DCHECK(phi->GetBlock()->GetLoopInformation()->IsBackEdge( in HasSameInputAtBackEdges()
942 *phi->GetBlock()->GetPredecessors()[i])); in HasSameInputAtBackEdges()
950 void VisitPhi(HPhi* phi) override { in VisitPhi() argument
951 if (phi->IsLoopHeaderPhi() in VisitPhi()
952 && (phi->GetType() == DataType::Type::kInt32) in VisitPhi()
[all …]
Dregister_allocator_test.cc61 HGraph* BuildIfElseWithPhi(HPhi** phi, HInstruction** input1, HInstruction** input2);
340 HPhi* phi = loop_header->GetFirstPhi()->AsPhi(); in Loop3() local
342 LiveInterval* phi_interval = phi->GetLiveInterval(); in Loop3()
343 LiveInterval* loop_update = phi->InputAt(1)->GetLiveInterval(); in Loop3()
488 HGraph* RegisterAllocatorTest::BuildIfElseWithPhi(HPhi** phi, in BuildIfElseWithPhi() argument
528 *phi = new (GetAllocator()) HPhi(GetAllocator(), 0, 0, DataType::Type::kInt32); in BuildIfElseWithPhi()
529 join->AddPhi(*phi); in BuildIfElseWithPhi()
551 (*phi)->AddInput(*input1); in BuildIfElseWithPhi()
552 (*phi)->AddInput(*input2); in BuildIfElseWithPhi()
560 HPhi *phi; in PhiHint() local
[all …]
Dloop_optimization_test.cc238 HPhi* phi = new (GetAllocator()) HPhi(GetAllocator(), 0, 0, DataType::Type::kInt32); in TEST_F() local
239 HInstruction* add = new (GetAllocator()) HAdd(DataType::Type::kInt32, phi, parameter_); in TEST_F()
240 header->AddPhi(phi); in TEST_F()
243 phi->AddInput(add); in TEST_F()
244 phi->AddInput(parameter_); in TEST_F()
255 for (size_t i = 0, e = phi->InputCount(); i < e; i++) { in TEST_F()
256 HInstruction* input = phi->InputAt(i); in TEST_F()
/art/test/481-regression-phi-cond/src/
DMain.java26 boolean phi; in inlinePhi()
28 phi = x; in inlinePhi()
30 phi = y; in inlinePhi()
32 return phi; in inlinePhi()
41 boolean phi = inlinePhi(x, y, z); in testCase()
45 return dontUseParam(phi == false ? false : true); in testCase()
/art/test/459-dead-phi/smali/
DEquivalentPhi.smali29 # v2 will be a phi with (int, int) as input
33 # v3 will be a phi with (int, int) as input.
35 # This instruction will lead to creating a phi equivalent
37 # a phi equivalent for v2 of type float. We used to forget to
38 # delete the old phi, which ends up having incompatible input
/art/test/543-checker-dce-trycatch/smali/
DTestCase.smali204 # Test that DCE removes catch phi uses of instructions defined in dead try blocks.
245 const v1, 0xa # dead catch phi input, defined in entry block (HInstruction)
246 add-int v2, p0, p1 # dead catch phi input, defined in the dead block (HInstruction)
251 # v3 = Phi [Add, 0xf] # dead catch phi input, defined in the dead block (HPhi)
255 const v1, 0xb # live catch phi input
256 const v2, 0xc # live catch phi input
257 const v3, 0x10 # live catch phi input
260 const v1, 0xd # live catch phi input
261 const v2, 0xe # live catch phi input
262 const v3, 0x11 # live catch phi input
[all …]
/art/test/498-type-propagation/smali/
DTypePropagation.smali22 # When building the SSA graph, we will create a phi for v0, which will be of type
23 # integer. Only when we get rid of that phi in the redundant phi elimination will
/art/test/552-checker-primitive-typeprop/smali/
DSsaBuilder.smali18 # Check that a dead phi with a live equivalent is replaced in an environment. The
20 # contains a phi that is interpreted as int for the environment, and as float for
38 # v0 = phi that can be both int and float
43 const v0, 0x1 # generate catch phi for v0
DArrayGet.smali19 # Test phi with fixed-type ArrayGet as an input and a matching second input.
20 # The phi should be typed accordingly.
49 # Test phi with fixed-type ArrayGet as an input and a conflicting second input.
50 # The phi should be eliminated due to the conflict.
107 # Test phi with free-type ArrayGet as an input and a matching second input.
108 # The phi should be typed accordingly.
138 # Test phi with free-type ArrayGet as an input and a conflicting second input.
139 # The phi will be kept and typed according to the second input despite the
170 # conflicting phi which should not be preserved.
208 # case uses ArrayGet as float through one phi and as an indeterminate type through
/art/test/510-checker-try-catch/smali/
DRuntime.smali181 # Test catch-phi runtime support for constant values.
184 # expected to load them from stack map and copy to the catch phi's location.
211 # Test catch-phi runtime support for 32-bit values stored in core registers.
215 # to the location of the catch phi.
234 move v0, v1 # Set catch phi value
237 move v0, v2 # Set catch phi value
249 # Test catch-phi runtime support for 64-bit values stored in core registers.
253 # to the location of the catch phi. The sum of the low and high 32 bits treated
275 move-wide v0, v2 # Set catch phi value
278 move-wide v0, v4 # Set catch phi value
[all …]
/art/test/682-double-catch-phi/
Dinfo.txt1 Regression test on double-typed catch phi
/art/test/533-regression-debugphi/
Dinfo.txt2 complicated phi dependencies.
/art/test/557-checker-ref-equivalent/
Dinfo.txt1 Checker tests to ensure we do not get reference and integer phi equivalents.

123