Lines Matching refs:t
187 LoopFinderTester& t; member
193 While(LoopFinderTester& R, Node* cond) : t(R) { in While()
194 loop = t.graph.NewNode(t.common.Loop(2), t.start, t.start); in While()
195 branch = t.graph.NewNode(t.common.Branch(), cond, loop); in While()
196 if_true = t.graph.NewNode(t.common.IfTrue(), branch); in While()
197 exit = t.graph.NewNode(t.common.IfFalse(), branch); in While()
216 : base(w.t.jsgraph.Int32Constant(b)), inc(w.t.jsgraph.Int32Constant(k)) { in Counter()
223 phi = w.t.graph.NewNode(w.t.op(2, false), base, base, w.loop); in Build()
224 add = w.t.graph.NewNode(&kIntAdd, phi, inc); in Build()
237 : base(w.t.graph.start()), val(w.t.jsgraph.Int32Constant(13)) { in StoreLoop()
244 phi = w.t.graph.NewNode(w.t.op(2, true), base, base, w.loop); in Build()
245 store = w.t.graph.NewNode(&kStore, val, phi, w.loop); in Build()
253 LoopFinderTester t; in TEST() local
254 While w(t, t.p0); in TEST()
255 t.Return(t.p0, t.start, w.exit); in TEST()
258 t.CheckNestedLoops(chain, 1); in TEST()
262 t.CheckLoop(header, 1, body, 2); in TEST()
268 LoopFinderTester t; in TEST() local
269 While w(t, t.p0); in TEST()
270 Node* phi = t.graph.NewNode(t.common.Phi(MachineRepresentation::kTagged, 2), in TEST()
271 t.zero, t.one, w.loop); in TEST()
272 t.Return(phi, t.start, w.exit); in TEST()
275 t.CheckNestedLoops(chain, 1); in TEST()
279 t.CheckLoop(header, 2, body, 2); in TEST()
285 LoopFinderTester t; in TEST() local
286 While w(t, t.p0); in TEST()
288 t.Return(c.phi, t.start, w.exit); in TEST()
291 t.CheckNestedLoops(chain, 1); in TEST()
295 t.CheckLoop(header, 2, body, 3); in TEST()
301 LoopFinderTester t; in TEST() local
302 While w(t, t.p0); in TEST()
304 t.Return(t.p0, c.phi, w.exit); in TEST()
307 t.CheckNestedLoops(chain, 1); in TEST()
311 t.CheckLoop(header, 2, body, 3); in TEST()
317 LoopFinderTester t; in TEST() local
318 While w(t, t.p0); in TEST()
321 t.Return(t.graph.NewNode(&kIntAdd, c1.phi, c2.phi), t.start, w.exit); in TEST()
324 t.CheckNestedLoops(chain, 1); in TEST()
328 t.CheckLoop(header, 3, body, 4); in TEST()
334 LoopFinderTester t; in TEST() local
335 While w1(t, t.p0); in TEST()
336 While w2(t, t.p0); in TEST()
338 t.Return(t.p0, t.start, w2.exit); in TEST()
342 t.CheckNestedLoops(chain, 1); in TEST()
346 t.CheckLoop(header, 1, body, 2); in TEST()
351 t.CheckNestedLoops(chain, 1); in TEST()
355 t.CheckLoop(header, 1, body, 2); in TEST()
362 LoopFinderTester t; in TEST() local
363 While w1(t, t.p0); in TEST()
364 While w2(t, t.p0); in TEST()
368 t.Return(t.graph.NewNode(&kIntAdd, c1.phi, c2.phi), t.start, w2.exit); in TEST()
372 t.CheckNestedLoops(chain, 1); in TEST()
376 t.CheckLoop(header, 2, body, 3); in TEST()
381 t.CheckNestedLoops(chain, 1); in TEST()
385 t.CheckLoop(header, 2, body, 3); in TEST()
393 LoopFinderTester t; in TEST() local
394 While w1(t, t.p0); in TEST()
395 While w2(t, t.p0); in TEST()
399 Counter c2(w2, i & 1 ? t.p0 : c1.phi, i & 2 ? t.p0 : c1.phi); in TEST()
403 t.Return(t.graph.NewNode(&kIntAdd, c1.phi, c2.phi), t.start, w2.exit); in TEST()
407 t.CheckNestedLoops(chain, 1); in TEST()
411 t.CheckLoop(header, 2, body, 3); in TEST()
416 t.CheckNestedLoops(chain, 1); in TEST()
420 t.CheckLoop(header, 2, body, 3); in TEST()
428 LoopFinderTester t; in TEST() local
429 While w1(t, t.p0); in TEST()
430 While w2(t, t.p0); in TEST()
432 t.Return(t.p0, t.start, w1.exit); in TEST()
435 t.CheckNestedLoops(chain, 2); in TEST()
439 t.CheckLoop(h1, 1, b1, 6); in TEST()
443 t.CheckLoop(h2, 1, b2, 2); in TEST()
449 LoopFinderTester t; in TEST() local
450 While w1(t, t.p0); in TEST()
451 While w2(t, t.p0); in TEST()
456 t.Return(c1.phi, t.start, w1.exit); in TEST()
459 t.CheckNestedLoops(chain, 2); in TEST()
464 t.CheckLoop(h1, 2, b1, 9); in TEST()
468 t.CheckLoop(h2, 2, b2, 3); in TEST()
474 LoopFinderTester t; in TEST() local
475 While w1(t, t.p0); in TEST()
476 While w2(t, t.p0); in TEST()
479 const Operator* op = t.common.Phi(MachineRepresentation::kWord32, 2); in TEST()
480 Node* p1a = t.graph.NewNode(op, t.p0, t.p0, w1.loop); in TEST()
481 Node* p1b = t.graph.NewNode(op, t.p0, t.p0, w1.loop); in TEST()
482 Node* p2a = t.graph.NewNode(op, p1a, t.p0, w2.loop); in TEST()
483 Node* p2b = t.graph.NewNode(op, p1b, t.p0, w2.loop); in TEST()
491 t.Return(t.p0, t.start, w1.exit); in TEST()
494 t.CheckNestedLoops(chain, 2); in TEST()
499 t.CheckLoop(h1, 3, b1, 8); in TEST()
503 t.CheckLoop(h2, 3, b2, 2); in TEST()
509 LoopFinderTester t; in TEST() local
510 While w1(t, t.p0); in TEST()
511 While w2(t, t.p0); in TEST()
512 While w3(t, t.p0); in TEST()
516 t.Return(t.p0, t.start, w1.exit); in TEST()
519 t.CheckNestedLoops(chain1, 2); in TEST()
522 t.CheckNestedLoops(chain2, 2); in TEST()
527 t.CheckLoop(h1, 1, b1, 10); in TEST()
531 t.CheckLoop(h2, 1, b2, 2); in TEST()
535 t.CheckLoop(h3, 1, b3, 2); in TEST()
541 LoopFinderTester t; in TEST() local
542 While w1(t, t.p0); in TEST()
543 While w2(t, t.p0); in TEST()
544 While w3(t, t.p0); in TEST()
549 t.Return(t.p0, t.start, w1.exit); in TEST()
552 t.CheckNestedLoops(chain, 3); in TEST()
557 t.CheckLoop(h1, 1, b1, 10); in TEST()
561 t.CheckLoop(h2, 1, b2, 6); in TEST()
565 t.CheckLoop(h3, 1, b3, 2); in TEST()
571 LoopFinderTester t; in TEST() local
572 While w1(t, t.p0); in TEST()
574 While w2(t, t.p0); in TEST()
576 While w3(t, t.p0); in TEST()
585 t.Return(c1.phi, t.start, w1.exit); in TEST()
588 t.CheckNestedLoops(chain, 3); in TEST()
594 t.CheckLoop(h1, 2, b1, 15); in TEST()
599 t.CheckLoop(h2, 2, b2, 9); in TEST()
603 t.CheckLoop(h3, 2, b3, 3); in TEST()
614 LoopFinderTester t; in TEST() local
615 Node* cond = t.p0; in TEST()
619 Node* loop = t.graph.NewNode(t.common.Loop(2), t.start, t.start); in TEST()
623 Node* branch = t.graph.NewNode(t.common.Branch(), cond, last); in TEST()
624 Node* if_true = t.graph.NewNode(t.common.IfTrue(), branch); in TEST()
625 Node* exit = t.graph.NewNode(t.common.IfFalse(), branch); in TEST()
634 Node* end = t.graph.NewNode(t.common.Merge(i), i, merge); // form exit. in TEST()
635 t.graph.SetEnd(end); in TEST()
638 t.CheckLoop(h, 1, body, body_count); in TEST()
650 LoopFinderTester t; in TEST() local
652 for (int j = 0; j <= i; j++) loop_inputs[j] = t.start; in TEST()
653 Node* loop = t.graph.NewNode(t.common.Loop(1 + i), 1 + i, loop_inputs); in TEST()
655 Node* cond = t.p0; in TEST()
660 Node* branch = t.graph.NewNode(t.common.Branch(), cond, exit); in TEST()
661 Node* if_true = t.graph.NewNode(t.common.IfTrue(), branch); in TEST()
662 Node* if_false = t.graph.NewNode(t.common.IfFalse(), branch); in TEST()
672 t.graph.SetEnd(exit); in TEST()
675 t.CheckLoop(h, 1, body, body_count); in TEST()
685 LoopFinderTester t; in TEST() local
687 Node* p1 = t.jsgraph.Int32Constant(11); in TEST()
688 Node* p2 = t.jsgraph.Int32Constant(22); in TEST()
689 Node* p3 = t.jsgraph.Int32Constant(33); in TEST()
691 Node* loop = t.graph.NewNode(t.common.Loop(2), t.start, t.start); in TEST()
692 Node* phi = t.graph.NewNode( in TEST()
693 t.common.Phi(MachineRepresentation::kWord32, 2), t.one, p1, loop); in TEST()
694 Node* cond = t.graph.NewNode(&kIntAdd, phi, p2); in TEST()
695 Node* branch = t.graph.NewNode(t.common.Branch(), cond, loop); in TEST()
696 Node* if_true = t.graph.NewNode(t.common.IfTrue(), branch); in TEST()
697 Node* exit = t.graph.NewNode(t.common.IfFalse(), branch); in TEST()
699 Node* ret = t.graph.NewNode(t.common.Return(), p3, t.start, exit); in TEST()
700 t.graph.SetEnd(ret); in TEST()
709 t.CheckLoop(header, 2, body, 3); in TEST()
720 LoopFinderTester t; in RunEdgeMatrix2() local
722 Node* p1 = t.jsgraph.Int32Constant(11); in RunEdgeMatrix2()
723 Node* p2 = t.jsgraph.Int32Constant(22); in RunEdgeMatrix2()
724 Node* p3 = t.jsgraph.Int32Constant(33); in RunEdgeMatrix2()
727 Node* loop1 = t.graph.NewNode(t.common.Loop(2), t.start, t.start); in RunEdgeMatrix2()
728 Node* phi1 = t.graph.NewNode( in RunEdgeMatrix2()
729 t.common.Phi(MachineRepresentation::kWord32, 2), t.one, p1, loop1); in RunEdgeMatrix2()
730 Node* cond1 = t.graph.NewNode(&kIntAdd, phi1, t.one); in RunEdgeMatrix2()
731 Node* branch1 = t.graph.NewNode(t.common.Branch(), cond1, loop1); in RunEdgeMatrix2()
732 Node* if_true1 = t.graph.NewNode(t.common.IfTrue(), branch1); in RunEdgeMatrix2()
733 Node* exit1 = t.graph.NewNode(t.common.IfFalse(), branch1); in RunEdgeMatrix2()
736 Node* loop2 = t.graph.NewNode(t.common.Loop(2), if_true1, t.start); in RunEdgeMatrix2()
737 Node* phi2 = t.graph.NewNode( in RunEdgeMatrix2()
738 t.common.Phi(MachineRepresentation::kWord32, 2), t.one, p2, loop2); in RunEdgeMatrix2()
739 Node* cond2 = t.graph.NewNode(&kIntAdd, phi2, p3); in RunEdgeMatrix2()
740 Node* branch2 = t.graph.NewNode(t.common.Branch(), cond2, loop2); in RunEdgeMatrix2()
741 Node* if_true2 = t.graph.NewNode(t.common.IfTrue(), branch2); in RunEdgeMatrix2()
742 Node* exit2 = t.graph.NewNode(t.common.IfFalse(), branch2); in RunEdgeMatrix2()
746 Node* ret = t.graph.NewNode(t.common.Return(), phi1, t.start, exit1); in RunEdgeMatrix2()
747 t.graph.SetEnd(ret); in RunEdgeMatrix2()
757 t.CheckLoop(header1, 2, body1, 9); in RunEdgeMatrix2()
761 t.CheckLoop(header2, 2, body2, 3); in RunEdgeMatrix2()
764 t.CheckNestedLoops(chain, 2); in RunEdgeMatrix2()
790 LoopFinderTester t; in RunEdgeMatrix3() local
792 Node* p1a = t.jsgraph.Int32Constant(11); in RunEdgeMatrix3()
793 Node* p1b = t.jsgraph.Int32Constant(22); in RunEdgeMatrix3()
794 Node* p1c = t.jsgraph.Int32Constant(33); in RunEdgeMatrix3()
795 Node* p2a = t.jsgraph.Int32Constant(44); in RunEdgeMatrix3()
796 Node* p2b = t.jsgraph.Int32Constant(55); in RunEdgeMatrix3()
797 Node* p2c = t.jsgraph.Int32Constant(66); in RunEdgeMatrix3()
798 Node* p3a = t.jsgraph.Int32Constant(77); in RunEdgeMatrix3()
799 Node* p3b = t.jsgraph.Int32Constant(88); in RunEdgeMatrix3()
800 Node* p3c = t.jsgraph.Int32Constant(99); in RunEdgeMatrix3()
803 Node* loop1 = t.graph.NewNode(t.common.Loop(2), t.start, t.start); in RunEdgeMatrix3()
804 Node* phi1 = t.graph.NewNode(t.common.Phi(MachineRepresentation::kWord32, 2), in RunEdgeMatrix3()
806 Node* cond1 = t.graph.NewNode(&kIntAdd, phi1, p1b); in RunEdgeMatrix3()
807 Node* branch1 = t.graph.NewNode(t.common.Branch(), cond1, loop1); in RunEdgeMatrix3()
808 Node* if_true1 = t.graph.NewNode(t.common.IfTrue(), branch1); in RunEdgeMatrix3()
809 Node* exit1 = t.graph.NewNode(t.common.IfFalse(), branch1); in RunEdgeMatrix3()
812 Node* loop2 = t.graph.NewNode(t.common.Loop(2), if_true1, t.start); in RunEdgeMatrix3()
813 Node* phi2 = t.graph.NewNode(t.common.Phi(MachineRepresentation::kWord32, 2), in RunEdgeMatrix3()
815 Node* cond2 = t.graph.NewNode(&kIntAdd, phi2, p2b); in RunEdgeMatrix3()
816 Node* branch2 = t.graph.NewNode(t.common.Branch(), cond2, loop2); in RunEdgeMatrix3()
817 Node* if_true2 = t.graph.NewNode(t.common.IfTrue(), branch2); in RunEdgeMatrix3()
818 Node* exit2 = t.graph.NewNode(t.common.IfFalse(), branch2); in RunEdgeMatrix3()
821 Node* loop3 = t.graph.NewNode(t.common.Loop(2), if_true2, t.start); in RunEdgeMatrix3()
822 Node* phi3 = t.graph.NewNode(t.common.Phi(MachineRepresentation::kWord32, 2), in RunEdgeMatrix3()
824 Node* cond3 = t.graph.NewNode(&kIntAdd, phi3, p3b); in RunEdgeMatrix3()
825 Node* branch3 = t.graph.NewNode(t.common.Branch(), cond3, loop3); in RunEdgeMatrix3()
826 Node* if_true3 = t.graph.NewNode(t.common.IfTrue(), branch3); in RunEdgeMatrix3()
827 Node* exit3 = t.graph.NewNode(t.common.IfFalse(), branch3); in RunEdgeMatrix3()
833 Node* ret = t.graph.NewNode(t.common.Return(), phi1, t.start, exit1); in RunEdgeMatrix3()
834 t.graph.SetEnd(ret); in RunEdgeMatrix3()
838 Node* o1[] = {t.one}; in RunEdgeMatrix3()
839 Node* o2[] = {t.one, phi1, cond1}; in RunEdgeMatrix3()
840 Node* o3[] = {t.one, phi1, cond1, phi2, cond2}; in RunEdgeMatrix3()
861 t.CheckNestedLoops(chain, 3); in RunEdgeMatrix3()
867 t.CheckLoop(header1, 2, body1, 15); in RunEdgeMatrix3()
872 t.CheckLoop(header2, 2, body2, 9); in RunEdgeMatrix3()
876 t.CheckLoop(header3, 2, body3, 3); in RunEdgeMatrix3()
922 LoopFinderTester t; in RunManyChainedLoops_i() local
923 Node** nodes = t.zone()->NewArray<Node*>(count * 4); in RunManyChainedLoops_i()
924 Node* k11 = t.jsgraph.Int32Constant(11); in RunManyChainedLoops_i()
925 Node* k12 = t.jsgraph.Int32Constant(12); in RunManyChainedLoops_i()
926 Node* last = t.start; in RunManyChainedLoops_i()
930 Node* loop = t.graph.NewNode(t.common.Loop(2), last, t.start); in RunManyChainedLoops_i()
931 Node* phi = t.graph.NewNode(t.common.Phi(MachineRepresentation::kWord32, 2), in RunManyChainedLoops_i()
933 Node* branch = t.graph.NewNode(t.common.Branch(), phi, loop); in RunManyChainedLoops_i()
934 Node* if_true = t.graph.NewNode(t.common.IfTrue(), branch); in RunManyChainedLoops_i()
935 Node* exit = t.graph.NewNode(t.common.IfFalse(), branch); in RunManyChainedLoops_i()
946 Node* ret = t.graph.NewNode(t.common.Return(), t.p0, t.start, last); in RunManyChainedLoops_i()
947 t.graph.SetEnd(ret); in RunManyChainedLoops_i()
951 t.CheckLoop(nodes + i * 4, 2, nodes + i * 4 + 2, 2); in RunManyChainedLoops_i()
957 LoopFinderTester t; in RunManyNestedLoops_i() local
958 Node** nodes = t.zone()->NewArray<Node*>(count * 5); in RunManyNestedLoops_i()
959 Node* k11 = t.jsgraph.Int32Constant(11); in RunManyNestedLoops_i()
960 Node* k12 = t.jsgraph.Int32Constant(12); in RunManyNestedLoops_i()
962 Node* entry = t.start; in RunManyNestedLoops_i()
966 Node* loop = t.graph.NewNode(t.common.Loop(2), entry, t.start); in RunManyNestedLoops_i()
967 Node* phi = t.graph.NewNode(t.common.Phi(MachineRepresentation::kWord32, 2), in RunManyNestedLoops_i()
969 Node* branch = t.graph.NewNode(t.common.Branch(), phi, loop); in RunManyNestedLoops_i()
970 Node* if_true = t.graph.NewNode(t.common.IfTrue(), branch); in RunManyNestedLoops_i()
971 Node* exit = t.graph.NewNode(t.common.IfFalse(), branch); in RunManyNestedLoops_i()
984 Node* ret = t.graph.NewNode(t.common.Return(), t.p0, t.start, exit); in RunManyNestedLoops_i()
985 t.graph.SetEnd(ret); in RunManyNestedLoops_i()
995 t.CheckLoop(nodes + k + 1, 2, nodes + k + 3, count * 5 - k - 3); in RunManyNestedLoops_i()
1019 TEST(LaPhiTangle) { LoopFinderTester t; } in TEST() local