/art/test/481-regression-phi-cond/src/ |
H A D | Main.java | 26 boolean phi; 28 phi = x; 30 phi = y; 32 return phi; 41 boolean phi = inlinePhi(x, y, z); 42 // Now use the phi as a condition which the boolean simplifier will try to 44 // the original condition (phi) and crash. 45 return dontUseParam(phi == false ? false : true);
|
/art/compiler/optimizing/ |
H A D | ssa_phi_elimination.cc | 36 // Add to the worklist phis referenced by non-phi instructions. 40 HPhi* phi = inst_it.Current()->AsPhi(); local 41 if (phi->IsDead()) { 45 bool keep_alive = (graph_->IsDebuggable() && phi->HasEnvironmentUses()); 47 for (const HUseListNode<HInstruction*>& use : phi->GetUses()) { 56 worklist_.push_back(phi); 58 phi->SetDead(); 60 initially_live.insert(phi); 66 // Process the worklist by propagating liveness to phi inputs. 68 HPhi* phi local 91 HPhi* phi; local 138 HPhi* phi = worklist_.back(); local [all...] |
H A D | ssa_builder.cc | 49 // Both type propagation and redundant phi elimination ensure `int_operand` 62 HPhi* phi = it.Current()->AsPhi(); local 63 HPhi* next = phi->GetNextEquivalentPhiWithSameType(); 65 // Make sure we do not replace a live phi with a dead phi. A live phi 66 // has been handled by the type propagation phase, unlike a dead phi. 68 phi->ReplaceWith(next); 69 phi->SetDead(); 71 next->ReplaceWith(phi); 85 HPhi* phi = it_phis.Current()->AsPhi(); local 123 TypePhiFromInputs(HPhi* phi) argument 165 TypeInputsOfPhi(HPhi* phi, ArenaVector<HPhi*>* worklist) argument 216 UpdatePrimitiveType(HPhi* phi, ArenaVector<HPhi*>* worklist) argument 242 HPhi* phi = phi_it.Current()->AsPhi(); local 254 HPhi* phi = phi_it.Current()->AsPhi(); local 269 HPhi* phi = worklist->back(); local 602 GetFloatDoubleOrReferenceEquivalentOfPhi(HPhi* phi, Primitive::Type type) argument [all...] |
H A D | select_generator.cc | 54 // Returns nullptr if `block` has either no phis or there is more than one phi 55 // with different inputs at `index1` and `index2`. Otherwise returns that phi. 61 HPhi* phi = it.Current()->AsPhi(); local 62 if (phi->InputAt(index1) != phi->InputAt(index2)) { 64 // First phi with different inputs for the two indices found. 65 select_phi = phi; 112 HPhi* phi = GetSingleChangedPhi(merge_block, predecessor_index_true, predecessor_index_false); local 113 if (phi == nullptr) { 116 HInstruction* true_value = phi [all...] |
H A D | graph_checker.cc | 123 AddError(StringPrintf("Block %d has a non-phi in its phi list.", 127 AddError(StringPrintf("The recorded last phi of block %d does not match " 128 "the actual last phi %d.", 140 AddError(StringPrintf("Block %d has a phi in its non-phi list.", 476 "with catch phi %d for vreg %d but its " 697 void GraphChecker::VisitPhi(HPhi* phi) { argument 698 VisitInstruction(phi); 700 // Ensure the first input of a phi i [all...] |
H A D | ssa_builder.h | 106 bool TypeInputsOfPhi(HPhi* phi, ArenaVector<HPhi*>* worklist); 107 bool UpdatePrimitiveType(HPhi* phi, ArenaVector<HPhi*>* worklist); 112 HPhi* GetFloatDoubleOrReferenceEquivalentOfPhi(HPhi* phi, Primitive::Type type);
|
H A D | bounds_check_elimination_test.cc | 391 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt); local 396 cmp = new (allocator) HGreaterThanOrEqual(phi, array_length); 399 cmp = new (allocator) HGreaterThan(phi, array_length); 402 loop_header->AddPhi(phi); 407 phi->AddInput(constant_initial); 411 HInstruction* bounds_check = new (allocator) HBoundsCheck(phi, array_length, 0); 415 HInstruction* add = new (allocator) HAdd(Primitive::kPrimInt, phi, constant_increment); 422 phi->AddInput(add); 511 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt); local 514 cmp = new (allocator) HLessThanOrEqual(phi, constant_initia 621 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt); local 720 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt); local [all...] |
H A D | reference_type_propagation.h | 73 void VisitPhi(HPhi* phi); 76 void UpdatePhi(HPhi* phi) SHARED_REQUIRES(Locks::mutator_lock_);
|
H A D | induction_var_analysis.cc | 26 * classification, the lexicographically first entry-phi is rotated to the front. 31 // Find very first entry-phi. 33 HInstruction* phi = nullptr; local 38 if (other->IsLoopHeaderPhi() && (phi == nullptr || phis.FoundBefore(other, phi))) { 39 phi = other; 44 // If found, bring that entry-phi to front. 45 if (phi != nullptr) { 126 // Visit phi-operations and instructions. 248 // Rotate proper entry-phi t 255 HInstruction* phi = scc_[0]; local 340 TransferPhi(HLoopInformation* loop, HInstruction* phi, size_t input_index) argument 464 SolvePhi(HInstruction* phi, size_t input_index) argument 483 SolvePhiAllInputs( HLoopInformation* loop, HInstruction* entry_phi, HInstruction* phi) argument [all...] |
H A D | bounds_check_elimination.cc | 300 * of an existing value range, NewArray or a loop phi corresponding to an 892 static bool HasSameInputAtBackEdges(HPhi* phi) { argument 893 DCHECK(phi->IsLoopHeaderPhi()); 895 HInstruction* input1 = phi->InputAt(1); 896 DCHECK(phi->GetBlock()->GetLoopInformation()->IsBackEdge( 897 *phi->GetBlock()->GetPredecessors()[1])); 898 for (size_t i = 2, e = phi->InputCount(); i < e; ++i) { 899 DCHECK(phi->GetBlock()->GetLoopInformation()->IsBackEdge( 900 *phi->GetBlock()->GetPredecessors()[i])); 901 if (input1 != phi 1643 HPhi* phi = nullptr; local 1693 HPhi* phi = new (graph->GetArena()) local [all...] |
H A D | register_allocator_test.cc | 182 * phi 224 * phi 271 * phi + 303 HPhi* phi = loop_header->GetFirstPhi()->AsPhi(); local 305 LiveInterval* phi_interval = phi->GetLiveInterval(); 306 LiveInterval* loop_update = phi->InputAt(1)->GetLiveInterval(); 357 /* Test for a dead loop phi taking as back-edge input a phi that also has 358 * this loop phi as input. Walking backwards in SsaDeadPhiElimination 359 * does not solve the problem because the loop phi wil 456 BuildIfElseWithPhi(ArenaAllocator* allocator, HPhi** phi, HInstruction** input1, HInstruction** input2) argument 532 HPhi *phi; local [all...] |
H A D | reference_type_propagation.cc | 663 void ReferenceTypePropagation::VisitPhi(HPhi* phi) { argument 664 if (phi->IsDead() || phi->GetType() != Primitive::kPrimNot) { 668 if (phi->GetBlock()->IsLoopHeader()) { 669 // Set the initial type for the phi. Use the non back edge input for reaching 671 HInstruction* first_input = phi->InputAt(0); 674 phi->SetCanBeNull(first_input->CanBeNull()); 675 phi->SetReferenceTypeInfo(first_input_rti); 677 AddToWorklist(phi); 679 // Eagerly compute the type of the phi, fo 880 HPhi* phi = instr->AsPhi(); local [all...] |
H A D | induction_var_analysis.h | 156 InductionInfo* TransferPhi(HLoopInformation* loop, HInstruction* phi, size_t input_index); 164 InductionInfo* SolvePhi(HInstruction* phi, size_t input_index); 167 HInstruction* phi);
|
H A D | live_ranges_test.cc | 150 * 22: phi 174 // Last use is the phi at the return block so instruction is live until 190 // Last use is the phi at the return block. 194 // Test for the phi. 220 * 14: phi 253 // Last use is the loop phi so instruction is live until 274 // Test for the phi. 298 * 10: phi 309 * We want to make sure the phi at 10 has a lifetime hole after the add at 20. 333 // Last use is the loop phi s 339 HPhi* phi = liveness.GetInstructionFromSsaIndex(1)->AsPhi(); local 443 HPhi* phi = liveness.GetInstructionFromSsaIndex(4)->AsPhi(); local [all...] |
H A D | graph_checker.h | 51 void VisitPhi(HPhi* phi) OVERRIDE;
|
H A D | register_allocator.h | 110 // Allocate a spill slot for the given catch phi. Will allocate the same slot 113 void AllocateSpillSlotForCatchPhi(HPhi* phi);
|
H A D | instruction_builder.cc | 46 // is encountered. Unused phis will be removed by dead phi analysis. 48 // No point in creating the catch phi if it is already undefined at 52 HPhi* phi = new (arena_) HPhi( local 57 block->AddPhi(phi); 58 (*locals)[i] = phi; 104 HPhi* phi = new (arena_) HPhi( local 109 current_block_->AddPhi(phi); 110 (*current_locals_)[local] = phi; 143 HPhi* phi = new (arena_) HPhi( local 150 phi 233 HPhi* phi = it.Current()->AsPhi(); local [all...] |
H A D | nodes.cc | 821 void HBasicBlock::AddPhi(HPhi* phi) { argument 822 Add(&phis_, this, phi); 852 void HBasicBlock::InsertPhiAfter(HPhi* phi, HPhi* cursor) { argument 853 DCHECK_EQ(phi->GetId(), -1); 856 phi->SetBlock(this); 857 phi->SetId(GetGraph()->GetNextInstructionId()); 858 UpdateInputsUsers(phi); 859 phis_.InsertInstructionAfter(phi, cursor); 881 void HBasicBlock::RemovePhi(HPhi* phi, bool ensure_safety) { argument 882 Remove(&phis_, this, phi, ensure_safet 1744 HPhi* phi = phi_it.Current()->AsPhi(); local [all...] |
H A D | induction_var_range_test.cc | 90 HPhi* phi = new (&allocator_) HPhi(&allocator_, 0, 0, Primitive::kPrimInt); local 91 loop_header->AddPhi(phi); 92 phi->AddInput(graph_->GetIntConstant(lower)); // i = l 94 condition_ = new (&allocator_) HLessThan(phi, upper); // i < u 96 condition_ = new (&allocator_) HGreaterThan(phi, upper); // i > u 100 increment_ = new (&allocator_) HAdd(Primitive::kPrimInt, phi, graph_->GetIntConstant(stride)); 102 phi->AddInput(increment_);
|
H A D | ssa_liveness_analysis.cc | 109 // start and end position. Non-phi instructions have a distinct lifetime position than 201 // Check that the inlined input is not a phi. Recursing on loop phis could 218 // Set phi inputs of successors of this block corresponding to this block 225 // catch phi spill slots when an exception is thrown. 234 HInstruction* phi = phi_it.Current(); local 235 HInstruction* input = phi->InputAt(phi_input_index); 236 input->GetLiveInterval()->AddPhiUse(phi, phi_input_index, block); 237 // A phi input whose last user is the phi dies at the end of the predecessor block, 238 // and not at the phi' [all...] |
H A D | inliner.cc | 570 // If the methods we are inlining return a value, we create a phi in the merge block 573 HPhi* phi = new (allocator) HPhi( local 575 merge->AddPhi(phi); 576 invoke_instruction->ReplaceWith(phi); 577 phi->AddInput(return_replacement); 578 phi->AddInput(invoke_instruction); 1330 // TODO: we could be more precise by merging the phi inputs but that requires
|
H A D | register_allocator.cc | 1385 void RegisterAllocator::AllocateSpillSlotForCatchPhi(HPhi* phi) { argument 1386 LiveInterval* interval = phi->GetLiveInterval(); 1388 HInstruction* previous_phi = phi->GetPrevious(); 1390 previous_phi->AsPhi()->GetRegNumber() <= phi->GetRegNumber()) 1393 if (phi->IsVRegEquivalentOf(previous_phi)) { 1394 // This is an equivalent of the previous phi. We need to assign the same 1395 // catch phi slot. 1399 // Allocate a new spill slot for this catch phi. 1476 // We may insert moves for split siblings and phi spills at the beginning of the block. 1535 // We insert moves at exit for phi predecessor 1959 HInstruction* phi = inst_it.Current(); local [all...] |
H A D | graph_visualizer.cc | 361 void VisitPhi(HPhi* phi) OVERRIDE { 362 StartAttributeStream("reg") << phi->GetRegNumber(); 363 StartAttributeStream("is_catch_phi") << std::boolalpha << phi->IsCatchPhi() << std::noboolalpha;
|
H A D | induction_var_analysis_test.cc | 138 // Inserts a phi to loop header at depth d and returns it. 140 HPhi* phi = new (&allocator_) HPhi(&allocator_, vreg, 0, Primitive::kPrimInt); local 141 loop_header_[d]->AddPhi(phi); 142 return phi; 327 // Merge over a phi. 359 // Merge over a phi. 570 // Avoid exact phi number, since that depends on the SSA building phase.
|
H A D | nodes.h | 1052 void AddPhi(HPhi* phi); 1058 void RemovePhi(HPhi* phi, bool ensure_safety = true); 1689 // Copy from `env`. If it's a loop phi for `loop_header`, copy the first 1690 // input to the loop phi instead. This is for inserting instructions that 2355 // Individual steps of SsaBuilder should assume that if a phi has been 2402 // Returns the next equivalent phi (starting from the current one) or null if there is none. 2403 // An equivalent phi is a phi having the same dex register and type. 6270 // for moving an input in the expected locations of user (including a phi user).
|