Searched refs:phi (Results 1 - 24 of 24) sorted by relevance

/art/test/481-regression-phi-cond/src/
H A DMain.java26 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 Dprimitive_type_propagation.cc42 bool PrimitiveTypePropagation::UpdateType(HPhi* phi) { argument
43 DCHECK(phi->IsLive());
44 Primitive::Type existing = phi->GetType();
47 for (size_t i = 0, e = phi->InputCount(); i < e; ++i) {
48 Primitive::Type input_type = phi->InputAt(i)->GetType();
51 phi->SetType(new_type);
56 // If the phi is of floating point type, we need to update its inputs to that
58 for (size_t i = 0, e = phi->InputCount(); i < e; ++i) {
59 HInstruction* input = phi->InputAt(i);
63 : SsaBuilder::GetFloatOrDoubleEquivalent(phi, inpu
90 HPhi* phi = it.Current()->AsPhi(); local
102 HPhi* phi = it.Current()->AsPhi(); local
126 HPhi* phi = it.Current()->GetUser()->AsPhi(); local
[all...]
H A Dssa_phi_elimination.cc27 // Add to the worklist phis referenced by non-phi instructions.
31 HPhi* phi = inst_it.Current()->AsPhi(); local
32 // Set dead ahead of running through uses. The phi may have no use.
33 phi->SetDead();
34 for (HUseIterator<HInstruction*> use_it(phi->GetUses()); !use_it.Done(); use_it.Advance()) {
38 worklist_.Add(phi);
39 phi->SetLive();
46 // Process the worklist by propagating liveness to phi inputs.
48 HPhi* phi = worklist_.Pop(); local
49 for (HInputIterator it(phi); !i
67 HPhi* phi; local
110 HPhi* phi = worklist_.Pop(); local
[all...]
H A Dssa_builder.cc45 void AddToWorklist(HPhi* phi);
46 void AddDependentInstructionsToWorklist(HPhi* phi);
47 bool UpdateType(HPhi* phi);
57 bool DeadPhiHandling::UpdateType(HPhi* phi) { argument
58 Primitive::Type existing = phi->GetType();
59 DCHECK(phi->IsLive());
63 for (size_t i = 0, e = phi->InputCount(); i < e; ++i) {
64 HInstruction* input = phi->InputAt(i);
68 // input is a phi, and it is dead (because its input types are
69 // conflicting), this phi mus
122 HPhi* phi = it.Current()->AsPhi(); local
157 HPhi* phi = it.Current()->GetUser()->AsPhi(); local
171 IsPhiEquivalentOf(HInstruction* instruction, HPhi* phi) argument
213 HPhi* phi = it.Current()->AsPhi(); local
243 HPhi* phi = it.Current()->AsPhi(); local
301 HPhi* phi = it_phis.Current()->AsPhi(); local
361 HPhi* phi = new (GetGraph()->GetArena()) HPhi( local
395 HPhi* phi = new (GetGraph()->GetArena()) HPhi( local
471 GetFloatDoubleOrReferenceEquivalentOfPhi(HPhi* phi, Primitive::Type type) argument
[all...]
H A Dprimitive_type_propagation.h35 void AddToWorklist(HPhi* phi);
37 bool UpdateType(HPhi* phi);
H A Dgraph_checker.cc94 AddError(StringPrintf("Block %d has a non-phi in its phi list.",
98 AddError(StringPrintf("The recorded last phi of block %d does not match "
99 "the actual last phi %d.",
111 AddError(StringPrintf("Block %d has a phi in its non-phi list.",
299 HPhi* phi = it.Current()->AsPhi(); local
300 if (phi->GetNextEquivalentPhiWithSameType() != nullptr) {
302 type_str << phi->GetType();
303 AddError(StringPrintf("Equivalent phi (
444 VisitPhi(HPhi* phi) argument
[all...]
H A Dreference_type_propagation.cc202 void ReferenceTypePropagation::VisitPhi(HPhi* phi) { argument
203 if (phi->GetType() != Primitive::kPrimNot) {
207 if (phi->GetBlock()->IsLoopHeader()) {
208 // Set the initial type for the phi. Use the non back edge input for reaching
210 AddToWorklist(phi);
211 phi->SetCanBeNull(phi->InputAt(0)->CanBeNull());
212 phi->SetReferenceTypeInfo(phi->InputAt(0)->GetReferenceTypeInfo());
214 // Eagerly compute the type of the phi, fo
305 HPhi* phi = instr->AsPhi(); local
[all...]
H A Dreference_type_propagation.h50 void VisitPhi(HPhi* phi);
54 void UpdatePhi(HPhi* phi) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
H A Dboolean_simplifier.cc115 HPhi* phi = merge_block->GetFirstPhi()->AsPhi(); local
116 HInstruction* true_value = phi->InputAt(merge_block->GetPredecessorIndexOf(true_block));
117 HInstruction* false_value = phi->InputAt(merge_block->GetPredecessorIndexOf(false_block));
135 phi->ReplaceWith(replacement);
136 merge_block->RemovePhi(phi);
H A Dbounds_check_elimination_test.cc397 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt); local
402 cmp = new (allocator) HGreaterThanOrEqual(phi, array_length);
405 cmp = new (allocator) HGreaterThan(phi, array_length);
408 loop_header->AddPhi(phi);
413 phi->AddInput(constant_initial);
417 *bounds_check = new (allocator) HBoundsCheck(phi, array_length, 0);
421 HInstruction* add = new (allocator) HAdd(Primitive::kPrimInt, phi, constant_increment);
428 phi->AddInput(add);
537 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt); local
540 cmp = new (allocator) HLessThanOrEqual(phi, constant_initia
661 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt); local
776 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt); local
[all...]
H A Dregister_allocator_test.cc186 * phi
228 * phi
284 * phi +
316 HPhi* phi = loop_header->GetFirstPhi()->AsPhi(); local
318 LiveInterval* phi_interval = phi->GetLiveInterval();
319 LiveInterval* loop_update = phi->InputAt(1)->GetLiveInterval();
370 /* Test for a dead loop phi taking as back-edge input a phi that also has
371 * this loop phi as input. Walking backwards in SsaDeadPhiElimination
372 * does not solve the problem because the loop phi wil
462 BuildIfElseWithPhi(ArenaAllocator* allocator, HPhi** phi, HInstruction** input1, HInstruction** input2) argument
515 HPhi *phi; local
[all...]
H A Dbounds_check_elimination.cc340 // a phi for the array length, and update all uses of the
341 // length in the loop to that phi. Therefore, inner loops having
342 // bounds checks on the same array will use that phi.
410 * of an existing value range, NewArray or a loop phi corresponding to an
888 // a phi array_length_in_loop_body_if_needed is used to replace it. In that case,
891 // array_length once the loop body is entered so all the uses of the phi will
972 // Replace array_length defined inside the loop body with a phi
973 // array_length_in_loop_body_if_needed. This is a synthetic phi so there is
975 HPhi* phi = new (graph->GetArena()) HPhi( local
978 phi
1466 HasSameInputAtBackEdges(HPhi* phi) argument
1482 VisitPhi(HPhi* phi) argument
[all...]
H A Dgraph_checker.h117 void VisitPhi(HPhi* phi) OVERRIDE;
H A Dssa_builder.h94 static HPhi* GetFloatDoubleOrReferenceEquivalentOfPhi(HPhi* phi, Primitive::Type type);
H A Dlive_ranges_test.cc154 * 22: phi
178 // Last use is the phi at the return block so instruction is live until
194 // Last use is the phi at the return block.
198 // Test for the phi.
224 * 14: phi
257 // Last use is the loop phi so instruction is live until
278 // Test for the phi.
302 * 10: phi
314 * We want to make sure the phi at 10 has a lifetime hole after the add at 20.
338 // Last use is the loop phi s
344 HPhi* phi = liveness.GetInstructionFromSsaIndex(1)->AsPhi(); local
448 HPhi* phi = liveness.GetInstructionFromSsaIndex(4)->AsPhi(); local
[all...]
H A Dnodes.cc248 // loop phi spill slots (which are not written to at back edge).
487 void HBasicBlock::AddPhi(HPhi* phi) { argument
488 Add(&phis_, this, phi);
518 void HBasicBlock::InsertPhiAfter(HPhi* phi, HPhi* cursor) { argument
519 DCHECK_EQ(phi->GetId(), -1);
522 phi->SetBlock(this);
523 phi->SetId(GetGraph()->GetNextInstructionId());
524 UpdateInputsUsers(phi);
525 phis_.InsertInstructionAfter(phi, cursor);
547 void HBasicBlock::RemovePhi(HPhi* phi, boo argument
1071 HPhi* phi = phi_it.Current()->AsPhi(); local
[all...]
H A Dssa_liveness_analysis.cc108 // start and end position. Non-phi instructions have a distinct lifetime position than
186 // Set phi inputs of successors of this block corresponding to this block
193 HInstruction* phi = inst_it.Current(); local
194 HInstruction* input = phi->InputAt(phi_input_index);
195 input->GetLiveInterval()->AddPhiUse(phi, phi_input_index, block);
196 // A phi input whose last user is the phi dies at the end of the predecessor block,
197 // and not at the phi's lifetime position.
367 // If the phi has a register, try to use the same.
377 // If the instruction dies at the phi assignmen
[all...]
H A Dgraph_visualizer.cc192 void VisitPhi(HPhi* phi) OVERRIDE {
193 output_ << " " << phi->GetRegNumber();
H A Dregister_allocator.cc1364 // We may insert moves for split siblings and phi spills at the beginning of the block.
1423 // We insert moves at exit for phi predecessors and connecting blocks.
1756 // Resolve phi inputs. Order does not matter.
1760 HInstruction* phi = inst_it.Current(); local
1764 HInstruction* input = phi->InputAt(i);
1767 Location destination = phi->GetLiveInterval()->ToLocation();
1768 InsertParallelMoveAtExitOf(predecessor, phi, source, destination);
H A Dnodes.h164 // The SSA builder requires loops to all be natural. Specifically, the dead phi
166 // visit for eliminating dead phis: a dead phi can only have loop header phi
690 void AddPhi(HPhi* phi);
696 void RemovePhi(HPhi* phi, bool ensure_safety = true);
1153 // Copy from `env`. If it's a loop phi for `loop_header`, copy the first
1154 // input to the loop phi instead. This is for inserting instructions that
3067 // Returns the next equivalent phi (starting from the current one) or null if there is none.
3068 // An equivalent phi is a phi havin
[all...]
/art/compiler/dex/
H A Dgvn_dead_code_elimination.cc523 MIR* phi = mir_graph_->NewMIR(); local
524 phi->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpPhi);
525 phi->dalvikInsn.vA = v_reg;
526 phi->offset = bb_->start_offset;
527 phi->m_unit_index = 0; // Arbitrarily assign all Phi nodes to outermost method.
529 phi->ssa_rep = static_cast<struct SSARepresentation *>(mir_graph_->GetArena()->Alloc(
532 mir_graph_->AllocateSSADefData(phi, 1);
533 phi->ssa_rep->defs[0] = s_reg;
536 mir_graph_->AllocateSSAUseData(phi, num_uses);
541 phi
569 MIR* phi = CreatePhi(new_s_reg); local
864 MIR* phi = RenameSRegDefOrCreatePhi(data->prev_value.change, change, last_data->mir); local
[all...]
H A Dgvn_dead_code_elimination_test.cc1623 MIR* phi = bb4->first_mir_insn; local
1624 ASSERT_TRUE(phi != nullptr);
1625 ASSERT_EQ(kMirOpPhi, static_cast<int>(phi->dalvikInsn.opcode));
1626 ASSERT_EQ(1, phi->ssa_rep->num_uses);
1627 EXPECT_EQ(0, phi->ssa_rep->uses[0]);
1628 ASSERT_EQ(1, phi->ssa_rep->num_defs);
1629 EXPECT_EQ(1, phi->ssa_rep->defs[0]);
1630 EXPECT_EQ(0u, phi->dalvikInsn.vA);
1660 MIR* phi = bb4->first_mir_insn; local
1661 ASSERT_TRUE(phi !
1716 MIR* phi = bb6->first_mir_insn; local
1840 MIR* phi = bb4->first_mir_insn; local
1889 MIR* phi = bb4->first_mir_insn; local
[all...]
H A Dmir_dataflow.cc1191 * Pruned SSA form: Insert phi nodes for each dalvik register marked in phi_node_blocks
1198 /* Variable will be clobbered before being used - no need for phi */
1202 MIR *phi = NewMIR(); local
1203 phi->dalvikInsn.opcode = static_cast<Instruction::Code>(kMirOpPhi);
1204 phi->dalvikInsn.vA = dalvik_reg;
1205 phi->offset = bb->start_offset;
1206 phi->m_unit_index = 0; // Arbitrarily assign all Phi nodes to outermost method.
1207 bb->PrependMIR(phi);
H A Dmir_optimization.cc636 MIR* phi = FindPhi(tk_tk, if_true->ssa_rep->defs[0]); local
637 if ((phi != nullptr) && (if_true->dalvikInsn.vA == if_false->dalvikInsn.vA)) {
686 if (phi->ssa_rep->num_uses == 2) {
687 mir->ssa_rep->defs[0] = phi->ssa_rep->defs[0];
690 tk_tk->RemoveMIR(phi);
1009 // The algorithm was written in a phi agnostic way.

Completed in 725 milliseconds