/art/compiler/optimizing/ |
D | ssa_phi_elimination.cc | 39 HPhi* phi = inst_it.Current()->AsPhi(); in MarkDeadPhis() local 40 if (phi->IsDead()) { in MarkDeadPhis() 44 bool keep_alive = (graph_->IsDebuggable() && phi->HasEnvironmentUses()); in MarkDeadPhis() 46 for (const HUseListNode<HInstruction*>& use : phi->GetUses()) { in MarkDeadPhis() 55 worklist_.push_back(phi); in MarkDeadPhis() 57 phi->SetDead(); in MarkDeadPhis() 59 initially_live.insert(phi); in MarkDeadPhis() 67 HPhi* phi = worklist_.back(); in MarkDeadPhis() local 69 for (HInstruction* raw_input : phi->GetInputs()) { in MarkDeadPhis() 89 HPhi* phi; in EliminateDeadPhis() local [all …]
|
D | ssa_builder.cc | 64 HPhi* phi = it.Current()->AsPhi(); in EquivalentPhisCleanup() local 65 HPhi* next = phi->GetNextEquivalentPhiWithSameType(); in EquivalentPhisCleanup() 70 phi->ReplaceWith(next); in EquivalentPhisCleanup() 71 phi->SetDead(); in EquivalentPhisCleanup() 73 next->ReplaceWith(phi); in EquivalentPhisCleanup() 76 << "More then one phi equivalent with type " << phi->GetType() in EquivalentPhisCleanup() 77 << " found for phi" << phi->GetId(); in EquivalentPhisCleanup() 86 HPhi* phi = it_phis.Current()->AsPhi(); in FixEnvironmentPhis() local 88 if (!phi->IsDead() || !phi->HasEnvironmentUses()) continue; in FixEnvironmentPhis() 89 HInstruction* next = phi->GetNext(); in FixEnvironmentPhis() [all …]
|
D | select_generator.cc | 61 HPhi* phi = it.Current()->AsPhi(); in GetSingleChangedPhi() local 62 if (phi->InputAt(index1) != phi->InputAt(index2)) { in GetSingleChangedPhi() 65 select_phi = phi; in GetSingleChangedPhi() 111 HPhi* phi = GetSingleChangedPhi(merge_block, predecessor_index_true, predecessor_index_false); in Run() local 112 if (phi == nullptr) { in Run() 115 HInstruction* true_value = phi->InputAt(predecessor_index_true); in Run() 116 HInstruction* false_value = phi->InputAt(predecessor_index_false); in Run() 123 if (phi->GetType() == Primitive::kPrimNot) { in Run() 124 select->SetReferenceTypeInfo(phi->GetReferenceTypeInfo()); in Run() 130 phi->ReplaceInput(select, predecessor_index_false); in Run() [all …]
|
D | graph_checker.cc | 710 void GraphChecker::VisitPhi(HPhi* phi) { in VisitPhi() argument 711 VisitInstruction(phi); in VisitPhi() 714 ArrayRef<HUserRecord<HInstruction*>> input_records = phi->GetInputRecords(); in VisitPhi() 715 if (input_records[0].GetInstruction() == phi) { in VisitPhi() 717 phi->GetId(), in VisitPhi() 718 phi->GetBlock()->GetBlockId())); in VisitPhi() 724 if (Primitive::PrimitiveKind(input->GetType()) != Primitive::PrimitiveKind(phi->GetType())) { in VisitPhi() 728 input->GetId(), i, phi->GetId(), phi->GetBlock()->GetBlockId(), in VisitPhi() 730 Primitive::PrettyDescriptor(phi->GetType()))); in VisitPhi() 733 if (phi->GetType() != HPhi::ToPhiType(phi->GetType())) { in VisitPhi() [all …]
|
D | induction_var_analysis.cc | 33 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() 267 HInstruction* phi = scc_[0]; in ClassifyNonTrivial() local 268 if (!phi->IsLoopHeaderPhi()) { in ClassifyNonTrivial() 273 InductionInfo* initial = LookupInfo(loop, phi->InputAt(0)); in ClassifyNonTrivial() 287 InductionInfo* update = TransferPhi(loop, phi, /*input_index*/ 1, /*adjust_input_size*/ 0); in ClassifyNonTrivial() 289 AssignInfo(loop, phi, CreateInduction(kWrapAround, in ClassifyNonTrivial() 305 update = SolvePhiAllInputs(loop, phi, instruction); in ClassifyNonTrivial() [all …]
|
D | induction_var_range_test.cc | 103 HPhi* phi = new (&allocator_) HPhi(&allocator_, 0, 0, Primitive::kPrimInt); in BuildLoop() local 104 loop_header_->AddPhi(phi); in BuildLoop() 105 phi->AddInput(graph_->GetIntConstant(lower)); // i = l in BuildLoop() 107 condition_ = new (&allocator_) HLessThan(phi, upper); // i < u in BuildLoop() 109 condition_ = new (&allocator_) HGreaterThan(phi, upper); // i > u in BuildLoop() 113 increment_ = new (&allocator_) HAdd(Primitive::kPrimInt, phi, graph_->GetIntConstant(stride)); in BuildLoop() 115 phi->AddInput(increment_); in BuildLoop() 737 HInstruction* phi = condition_->InputAt(0); in TEST_F() local 741 range_.GetInductionRange(condition_, phi, x_, &v1, &v2, &needs_finite_test); in TEST_F() 747 range_.GetInductionRange(increment_, phi, x_, &v1, &v2, &needs_finite_test); in TEST_F() [all …]
|
D | bounds_check_elimination_test.cc | 391 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt); 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(Primitive::kPrimInt, phi, constant_increment); in BuildSSAGraph1() 422 phi->AddInput(add); in BuildSSAGraph1() 511 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt); in BuildSSAGraph2() local 514 cmp = new (allocator) HLessThanOrEqual(phi, constant_initial); in BuildSSAGraph2() [all …]
|
D | dead_code_elimination.cc | 203 HPhi* phi = block->GetFirstPhi()->AsPhi(); in SimplifyIfs() local 204 bool phi_input_is_left = (first->InputAt(0) == phi); in SimplifyIfs() 209 for (size_t i = 0; i < phi->InputCount();) { in SimplifyIfs() 210 HInstruction* input = phi->InputAt(i); in SimplifyIfs() 238 phi->RemoveInputAt(i); in SimplifyIfs() 245 if (phi->InputCount() == 1) { in SimplifyIfs() 251 phi->ReplaceWith(phi->InputAt(0)); in SimplifyIfs() 252 block->RemovePhi(phi); in SimplifyIfs()
|
D | ssa_builder.h | 108 bool TypeInputsOfPhi(HPhi* phi, ArenaVector<HPhi*>* worklist); 109 bool UpdatePrimitiveType(HPhi* phi, ArenaVector<HPhi*>* worklist); 114 HPhi* GetFloatDoubleOrReferenceEquivalentOfPhi(HPhi* phi, Primitive::Type type);
|
D | bounds_check_elimination.cc | 910 static bool HasSameInputAtBackEdges(HPhi* phi) { in HasSameInputAtBackEdges() argument 911 DCHECK(phi->IsLoopHeaderPhi()); in HasSameInputAtBackEdges() 912 HConstInputsRef inputs = phi->GetInputs(); in HasSameInputAtBackEdges() 915 DCHECK(phi->GetBlock()->GetLoopInformation()->IsBackEdge( in HasSameInputAtBackEdges() 916 *phi->GetBlock()->GetPredecessors()[1])); in HasSameInputAtBackEdges() 918 DCHECK(phi->GetBlock()->GetLoopInformation()->IsBackEdge( in HasSameInputAtBackEdges() 919 *phi->GetBlock()->GetPredecessors()[i])); in HasSameInputAtBackEdges() 927 void VisitPhi(HPhi* phi) OVERRIDE { in VisitPhi() argument 928 if (phi->IsLoopHeaderPhi() in VisitPhi() 929 && (phi->GetType() == Primitive::kPrimInt) in VisitPhi() [all …]
|
D | register_allocator_test.cc | 330 HPhi* phi = loop_header->GetFirstPhi()->AsPhi(); in Loop3() local 332 LiveInterval* phi_interval = phi->GetLiveInterval(); in Loop3() 333 LiveInterval* loop_update = phi->InputAt(1)->GetLiveInterval(); in Loop3() 490 HPhi** phi, in BuildIfElseWithPhi() argument 530 *phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt); in BuildIfElseWithPhi() 531 join->AddPhi(*phi); in BuildIfElseWithPhi() 553 (*phi)->AddInput(*input1); in BuildIfElseWithPhi() 554 (*phi)->AddInput(*input2); in BuildIfElseWithPhi() 564 HPhi *phi; in PhiHint() local 568 HGraph* graph = BuildIfElseWithPhi(&allocator, &phi, &input1, &input2); in PhiHint() [all …]
|
D | induction_var_analysis.h | 164 HInstruction* phi, 173 InductionInfo* SolvePhi(HInstruction* phi, size_t input_index, size_t adjust_input_size); 176 HInstruction* phi); 231 void AssignCycle(HPhi* phi); 232 ArenaSet<HInstruction*>* LookupCycle(HPhi* phi);
|
D | loop_optimization.cc | 440 HPhi* phi = it.Current()->AsPhi(); in SimplifyInduction() local 442 if (TrySetPhiInduction(phi, /*restrict_uses*/ true) && in SimplifyInduction() 443 TryAssignLastValue(node->loop_info, phi, preheader, /*collect_loop_uses*/ false)) { in SimplifyInduction() 528 HInstruction* phi = header->GetFirstPhi(); in OptimizeInnerLoop() local 533 TryAssignLastValue(node->loop_info, phi, preheader, /*collect_loop_uses*/ true)) { in OptimizeInnerLoop() 536 phi->ReplaceWith(phi->InputAt(0)); in OptimizeInnerLoop() 558 TryAssignLastValue(node->loop_info, phi, preheader, /*collect_loop_uses*/ true)) { in OptimizeInnerLoop() 778 HPhi* phi = new (global_allocator_) HPhi(global_allocator_, in GenerateNewLoop() local 785 HInstruction* cond = new (global_allocator_) HAboveOrEqual(phi, hi); in GenerateNewLoop() 786 vector_header_->AddPhi(phi); in GenerateNewLoop() [all …]
|
/art/test/481-regression-phi-cond/src/ |
D | Main.java | 26 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/ |
D | EquivalentPhi.smali | 29 # 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/ |
D | TestCase.smali | 204 # 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/510-checker-try-catch/smali/ |
D | Runtime.smali | 181 # 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/498-type-propagation/smali/ |
D | TypePropagation.smali | 22 # 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/ |
D | SsaBuilder.smali | 18 # 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
|
D | ArrayGet.smali | 19 # 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/431-type-propagation/smali/ |
D | TypePropagation.smali | 25 # 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
|
/art/test/533-regression-debugphi/ |
D | info.txt | 2 complicated phi dependencies.
|
/art/test/557-checker-ref-equivalent/ |
D | info.txt | 1 Checker tests to ensure we do not get reference and integer phi equivalents.
|
/art/test/596-checker-dead-phi/ |
D | info.txt | 2 phi with its first incoming input.
|
/art/test/429-ssa-builder/ |
D | info.txt | 2 compiler, that used to crash when dealing with phi floating-point
|