Home
last modified time | relevance | path

Searched refs:phi (Results 1 – 25 of 64) 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 …]
Dgraph_checker.cc1048 void GraphChecker::VisitPhi(HPhi* phi) { in VisitPhi() argument
1049 VisitInstruction(phi); in VisitPhi()
1052 ArrayRef<HUserRecord<HInstruction*>> input_records = phi->GetInputRecords(); in VisitPhi()
1053 if (input_records[0].GetInstruction() == phi) { in VisitPhi()
1055 phi->GetId(), in VisitPhi()
1056 phi->GetBlock()->GetBlockId())); in VisitPhi()
1062 if (DataType::Kind(input->GetType()) != DataType::Kind(phi->GetType())) { in VisitPhi()
1066 input->GetId(), i, phi->GetId(), phi->GetBlock()->GetBlockId(), in VisitPhi()
1068 DataType::PrettyDescriptor(phi->GetType()))); in VisitPhi()
1071 if (phi->GetType() != HPhi::ToPhiType(phi->GetType())) { in VisitPhi()
[all …]
Dselect_generator.cc78 HPhi* phi = it.Current()->AsPhi(); in GetSinglePhi() local
81 select_phi = phi; in GetSinglePhi()
135 HPhi* phi = GetSinglePhi(merge_block, predecessor_index_true, predecessor_index_false); in TryGenerateSelectSimpleDiamondPattern() local
142 } else if (phi != nullptr) { in TryGenerateSelectSimpleDiamondPattern()
143 true_value = phi->InputAt(predecessor_index_true); in TryGenerateSelectSimpleDiamondPattern()
144 false_value = phi->InputAt(predecessor_index_false); in TryGenerateSelectSimpleDiamondPattern()
148 DCHECK(both_successors_return || phi != nullptr); in TryGenerateSelectSimpleDiamondPattern()
161 } else if (phi->GetType() == DataType::Type::kReference) { in TryGenerateSelectSimpleDiamondPattern()
162 select->SetReferenceTypeInfoIfValid(phi->GetReferenceTypeInfo()); in TryGenerateSelectSimpleDiamondPattern()
172 phi->ReplaceInput(select, predecessor_index_false); in TryGenerateSelectSimpleDiamondPattern()
[all …]
Dselect_generator_test.cc64 HPhi* phi = new (GetAllocator()) HPhi(GetAllocator(), 0, 0, DataType::Type::kInt32); in ConstructBasicGraphForSelect() local
65 return_block_->AddPhi(phi); in ConstructBasicGraphForSelect()
66 phi->AddInput(instr); in ConstructBasicGraphForSelect()
67 phi->AddInput(const1); in ConstructBasicGraphForSelect()
Dbounds_check_elimination_test.cc392 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, DataType::Type::kInt32); in BuildSSAGraph1() local
397 cmp = new (allocator) HGreaterThanOrEqual(phi, array_length); in BuildSSAGraph1()
400 cmp = new (allocator) HGreaterThan(phi, array_length); in BuildSSAGraph1()
403 loop_header->AddPhi(phi); in BuildSSAGraph1()
408 phi->AddInput(constant_initial); in BuildSSAGraph1()
412 HInstruction* bounds_check = new (allocator) HBoundsCheck(phi, array_length, 0); in BuildSSAGraph1()
416 HInstruction* add = new (allocator) HAdd(DataType::Type::kInt32, phi, constant_increment); in BuildSSAGraph1()
423 phi->AddInput(add); in BuildSSAGraph1()
512 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, DataType::Type::kInt32); in BuildSSAGraph2() local
515 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()
424 void SuperblockCloner::ResolvePhi(HPhi* phi) { in ResolvePhi() argument
425 HBasicBlock* phi_block = phi->GetBlock(); in ResolvePhi()
426 for (size_t i = 0, e = phi->InputCount(); i < e; i++) { in ResolvePhi()
427 HInstruction* input = phi->InputAt(i); in ResolvePhi()
436 phi->ReplaceInput(GetInstrCopy(input), i); in ResolvePhi()
631 HPhi* phi = new (arena_) HPhi(arena_, kNoRegNumber, 0, value->GetType()); in ConstructSubgraphClosedSSA() local
[all …]
Dinduction_var_analysis.cc367 HInstruction* phi = nullptr; in ExtractScc() local
377 DCHECK(phi == nullptr || phi->GetBlock() == block); in ExtractScc()
378 if (phi == nullptr || block->GetPhis().FoundBefore(instruction, phi)) { in ExtractScc()
379 phi = instruction; in ExtractScc()
462 HInstruction* phi = scc[0]; in ClassifyNonTrivial() local
463 if (!phi->IsLoopHeaderPhi()) { in ClassifyNonTrivial()
468 InductionInfo* initial = LookupInfo(loop, phi->InputAt(0)); in ClassifyNonTrivial()
482 InductionInfo* update = TransferPhi(loop, phi, /*input_index*/ 1, /*adjust_input_size*/ 0); in ClassifyNonTrivial()
484 AssignInfo(loop, phi, CreateInduction(kWrapAround, in ClassifyNonTrivial()
502 update = SolvePhiAllInputs(loop, phi, instruction, cycle, type); in ClassifyNonTrivial()
[all …]
Dssa_builder.h114 bool TypeInputsOfPhi(HPhi* phi, ScopedArenaVector<HPhi*>* worklist);
115 bool UpdatePrimitiveType(HPhi* phi, ScopedArenaVector<HPhi*>* worklist);
120 HPhi* GetFloatDoubleOrReferenceEquivalentOfPhi(HPhi* phi, DataType::Type type);
Dinduction_var_range_test.cc103 HPhi* phi = new (GetAllocator()) HPhi(GetAllocator(), 0, 0, DataType::Type::kInt32); in BuildLoop() local
104 loop_header_->AddPhi(phi); in BuildLoop()
105 phi->AddInput(graph_->GetIntConstant(lower)); // i = l in BuildLoop()
107 condition_ = new (GetAllocator()) HLessThan(phi, upper); // i < u in BuildLoop()
109 condition_ = new (GetAllocator()) HGreaterThan(phi, upper); // i > u in BuildLoop()
114 new (GetAllocator()) HAdd(DataType::Type::kInt32, phi, graph_->GetIntConstant(stride)); in BuildLoop()
116 phi->AddInput(increment_); in BuildLoop()
983 HInstruction* phi = condition_->InputAt(0); in TEST_F() local
987 range_.GetInductionRange(condition_->GetBlock(), phi, x_, &v1, &v2, &needs_finite_test); in TEST_F()
993 range_.GetInductionRange(increment_->GetBlock(), phi, x_, &v1, &v2, &needs_finite_test); in TEST_F()
[all …]
Dregister_allocator_test.cc50 HGraph* BuildIfElseWithPhi(HPhi** phi, HInstruction** input1, HInstruction** input2);
313 HPhi* phi = loop_header->GetFirstPhi()->AsPhi(); in TEST_F() local
315 LiveInterval* phi_interval = phi->GetLiveInterval(); in TEST_F()
316 LiveInterval* loop_update = phi->InputAt(1)->GetLiveInterval(); in TEST_F()
457 HGraph* RegisterAllocatorTest::BuildIfElseWithPhi(HPhi** phi, in BuildIfElseWithPhi() argument
497 *phi = new (GetAllocator()) HPhi(GetAllocator(), 0, 0, DataType::Type::kInt32); in BuildIfElseWithPhi()
498 join->AddPhi(*phi); in BuildIfElseWithPhi()
520 (*phi)->AddInput(*input1); in BuildIfElseWithPhi()
521 (*phi)->AddInput(*input2); in BuildIfElseWithPhi()
529 HPhi *phi; in TEST_F() local
[all …]
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()
792 HPhi* phi = it.Current()->AsPhi(); in SimplifyInduction() local
793 if (TrySetPhiInduction(phi, /*restrict_uses*/ true) && in SimplifyInduction()
794 TryAssignLastValue(node->loop_info, phi, preheader, /*collect_loop_uses*/ false)) { in SimplifyInduction()
1528 HInstruction* phi = i->first; in FinalizeVectorization() local
1531 for (const HUseListNode<HInstruction*>& use : phi->GetUses()) { in FinalizeVectorization()
1532 induction_range_.Replace(use.GetUser(), phi, repl); // update induction use in FinalizeVectorization()
[all …]
Dloop_optimization_test.cc236 HPhi* phi = new (GetAllocator()) HPhi(GetAllocator(), 0, 0, DataType::Type::kInt32); in TEST_F() local
237 HInstruction* add = new (GetAllocator()) HAdd(DataType::Type::kInt32, phi, parameter_); in TEST_F()
238 header->AddPhi(phi); in TEST_F()
241 phi->AddInput(add); in TEST_F()
242 phi->AddInput(parameter_); in TEST_F()
253 for (size_t i = 0, e = phi->InputCount(); i < e; i++) { in TEST_F()
254 HInstruction* input = phi->InputAt(i); in TEST_F()
Dbounds_check_elimination.cc946 static bool HasSameInputAtBackEdges(HPhi* phi) { in HasSameInputAtBackEdges() argument
947 DCHECK(phi->IsLoopHeaderPhi()); in HasSameInputAtBackEdges()
948 HConstInputsRef inputs = phi->GetInputs(); in HasSameInputAtBackEdges()
951 DCHECK(phi->GetBlock()->GetLoopInformation()->IsBackEdge( in HasSameInputAtBackEdges()
952 *phi->GetBlock()->GetPredecessors()[1])); in HasSameInputAtBackEdges()
954 DCHECK(phi->GetBlock()->GetLoopInformation()->IsBackEdge( in HasSameInputAtBackEdges()
955 *phi->GetBlock()->GetPredecessors()[i])); in HasSameInputAtBackEdges()
963 void VisitPhi(HPhi* phi) override { in VisitPhi() argument
964 if (phi->IsLoopHeaderPhi() in VisitPhi()
965 && (phi->GetType() == DataType::Type::kInt32) in VisitPhi()
[all …]
/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/481-regression-phi-cond/
DAndroid.bp3 // Build rules for ART run-test `481-regression-phi-cond`.
16 name: "art-run-test-481-regression-phi-cond",
21 ":art-run-test-481-regression-phi-cond-expected-stdout",
22 ":art-run-test-481-regression-phi-cond-expected-stderr",
28 name: "art-run-test-481-regression-phi-cond-expected-stdout",
29 out: ["art-run-test-481-regression-phi-cond-expected-stdout.txt"],
36 name: "art-run-test-481-regression-phi-cond-expected-stderr",
37 out: ["art-run-test-481-regression-phi-cond-expected-stderr.txt"],
/art/test/499-bce-phi-array-length/
DAndroid.bp3 // Build rules for ART run-test `499-bce-phi-array-length`.
16 name: "art-run-test-499-bce-phi-array-length",
21 ":art-run-test-499-bce-phi-array-length-expected-stdout",
22 ":art-run-test-499-bce-phi-array-length-expected-stderr",
28 name: "art-run-test-499-bce-phi-array-length-expected-stdout",
29 out: ["art-run-test-499-bce-phi-array-length-expected-stdout.txt"],
36 name: "art-run-test-499-bce-phi-array-length-expected-stderr",
37 out: ["art-run-test-499-bce-phi-array-length-expected-stderr.txt"],
/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.
246 const v1, 0xa # dead catch phi input, defined in entry block (HInstruction)
247 add-int v2, p0, p1 # dead catch phi input, defined in the dead block (HInstruction)
252 # v3 = Phi [Add, 0xf] # dead catch phi input, defined in the dead block (HPhi).
257 const v1, 0xb # live catch phi input
258 const v2, 0xc # live catch phi input
259 const v3, 0x10 # live catch phi input
262 const v1, 0xd # live catch phi input
263 const v2, 0xe # live catch phi input
264 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/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/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/530-checker-lse/src/
DMain.java1033 int phi; in test33() local
1036 phi = 1; in test33()
1039 phi = 2; in test33()
1041 obj.i = phi; in test33()
1042 return phi; in test33()
1064 int phi; in test34() local
1067 phi = 1; in test34()
1073 phi = 2; in test34()
1078 obj.i = phi; in test34()
1079 return phi; in test34()
[all …]
/art/test/431-type-propagation/smali/
DTypePropagation.smali25 # Putting a float in v1 will lead to the creation of a phi with one
30 # the phi prior to doing type propagation.
34 # This environment is the reason why a phi is created at the join block

123