Lines Matching refs:allocator

43   ArenaAllocator allocator(&pool);
45 HGraph* graph = CreateGraph(&allocator);
48 HBasicBlock* entry = new (&allocator) HBasicBlock(graph);
51 HInstruction* parameter1 = new (&allocator)
53 HInstruction* parameter2 = new (&allocator)
61 HBasicBlock* block1 = new (&allocator) HBasicBlock(graph);
63 HInstruction* cmp = new (&allocator) HGreaterThanOrEqual(parameter2, constant_0);
64 HIf* if_inst = new (&allocator) HIf(cmp);
69 HBasicBlock* block2 = new (&allocator) HBasicBlock(graph);
71 HNullCheck* null_check = new (&allocator) HNullCheck(parameter1, 0);
72 HArrayLength* array_length = new (&allocator) HArrayLength(null_check);
73 HBoundsCheck* bounds_check2 = new (&allocator)
75 HArraySet* array_set = new (&allocator) HArraySet(
82 HBasicBlock* block3 = new (&allocator) HBasicBlock(graph);
84 null_check = new (&allocator) HNullCheck(parameter1, 0);
85 array_length = new (&allocator) HArrayLength(null_check);
86 cmp = new (&allocator) HLessThan(parameter2, array_length);
87 if_inst = new (&allocator) HIf(cmp);
93 HBasicBlock* block4 = new (&allocator) HBasicBlock(graph);
95 null_check = new (&allocator) HNullCheck(parameter1, 0);
96 array_length = new (&allocator) HArrayLength(null_check);
97 HBoundsCheck* bounds_check4 = new (&allocator)
99 array_set = new (&allocator) HArraySet(
106 HBasicBlock* block5 = new (&allocator) HBasicBlock(graph);
108 null_check = new (&allocator) HNullCheck(parameter1, 0);
109 array_length = new (&allocator) HArrayLength(null_check);
110 HBoundsCheck* bounds_check5 = new (&allocator)
112 array_set = new (&allocator) HArraySet(
119 HBasicBlock* exit = new (&allocator) HBasicBlock(graph);
124 exit->AddInstruction(new (&allocator) HExit());
148 ArenaAllocator allocator(&pool);
150 HGraph* graph = CreateGraph(&allocator);
153 HBasicBlock* entry = new (&allocator) HBasicBlock(graph);
156 HInstruction* parameter1 = new (&allocator)
158 HInstruction* parameter2 = new (&allocator)
167 HBasicBlock* block1 = new (&allocator) HBasicBlock(graph);
169 HInstruction* cmp = new (&allocator) HLessThanOrEqual(parameter2, constant_0);
170 HIf* if_inst = new (&allocator) HIf(cmp);
175 HBasicBlock* block2 = new (&allocator) HBasicBlock(graph);
177 HInstruction* add = new (&allocator) HAdd(Primitive::kPrimInt, parameter2, constant_max_int);
178 HNullCheck* null_check = new (&allocator) HNullCheck(parameter1, 0);
179 HArrayLength* array_length = new (&allocator) HArrayLength(null_check);
180 HInstruction* cmp2 = new (&allocator) HGreaterThanOrEqual(add, array_length);
181 if_inst = new (&allocator) HIf(cmp2);
188 HBasicBlock* block3 = new (&allocator) HBasicBlock(graph);
190 HBoundsCheck* bounds_check = new (&allocator)
192 HArraySet* array_set = new (&allocator) HArraySet(
197 HBasicBlock* exit = new (&allocator) HBasicBlock(graph);
199 exit->AddInstruction(new (&allocator) HExit());
220 ArenaAllocator allocator(&pool);
222 HGraph* graph = CreateGraph(&allocator);
225 HBasicBlock* entry = new (&allocator) HBasicBlock(graph);
228 HInstruction* parameter1 = new (&allocator)
230 HInstruction* parameter2 = new (&allocator)
239 HBasicBlock* block1 = new (&allocator) HBasicBlock(graph);
241 HNullCheck* null_check = new (&allocator) HNullCheck(parameter1, 0);
242 HArrayLength* array_length = new (&allocator) HArrayLength(null_check);
243 HInstruction* cmp = new (&allocator) HGreaterThanOrEqual(parameter2, array_length);
244 HIf* if_inst = new (&allocator) HIf(cmp);
251 HBasicBlock* block2 = new (&allocator) HBasicBlock(graph);
253 HInstruction* sub1 = new (&allocator) HSub(Primitive::kPrimInt, parameter2, constant_max_int);
254 HInstruction* sub2 = new (&allocator) HSub(Primitive::kPrimInt, sub1, constant_max_int);
255 HInstruction* cmp2 = new (&allocator) HLessThanOrEqual(sub2, constant_0);
256 if_inst = new (&allocator) HIf(cmp2);
262 HBasicBlock* block3 = new (&allocator) HBasicBlock(graph);
264 HBoundsCheck* bounds_check = new (&allocator)
266 HArraySet* array_set = new (&allocator) HArraySet(
271 HBasicBlock* exit = new (&allocator) HBasicBlock(graph);
273 exit->AddInstruction(new (&allocator) HExit());
292 ArenaAllocator allocator(&pool);
294 HGraph* graph = CreateGraph(&allocator);
297 HBasicBlock* entry = new (&allocator) HBasicBlock(graph);
300 HInstruction* parameter = new (&allocator) HParameterValue(0, Primitive::kPrimNot);
308 HBasicBlock* block = new (&allocator) HBasicBlock(graph);
312 HNullCheck* null_check = new (&allocator) HNullCheck(parameter, 0);
313 HArrayLength* array_length = new (&allocator) HArrayLength(null_check);
314 HBoundsCheck* bounds_check6 = new (&allocator)
316 HInstruction* array_set = new (&allocator) HArraySet(
323 null_check = new (&allocator) HNullCheck(parameter, 0);
324 array_length = new (&allocator) HArrayLength(null_check);
325 HBoundsCheck* bounds_check5 = new (&allocator)
327 array_set = new (&allocator) HArraySet(
334 null_check = new (&allocator) HNullCheck(parameter, 0);
335 array_length = new (&allocator) HArrayLength(null_check);
336 HBoundsCheck* bounds_check4 = new (&allocator)
338 array_set = new (&allocator) HArraySet(
345 block->AddInstruction(new (&allocator) HGoto());
347 HBasicBlock* exit = new (&allocator) HBasicBlock(graph);
350 exit->AddInstruction(new (&allocator) HExit());
362 static HGraph* BuildSSAGraph1(ArenaAllocator* allocator,
367 HGraph* graph = CreateGraph(allocator);
370 HBasicBlock* entry = new (allocator) HBasicBlock(graph);
373 HInstruction* parameter = new (allocator) HParameterValue(0, Primitive::kPrimNot);
380 HBasicBlock* block = new (allocator) HBasicBlock(graph);
383 block->AddInstruction(new (allocator) HGoto());
385 HBasicBlock* loop_header = new (allocator) HBasicBlock(graph);
386 HBasicBlock* loop_body = new (allocator) HBasicBlock(graph);
387 HBasicBlock* exit = new (allocator) HBasicBlock(graph);
397 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt);
398 HInstruction* null_check = new (allocator) HNullCheck(parameter, 0);
399 HInstruction* array_length = new (allocator) HArrayLength(null_check);
402 cmp = new (allocator) HGreaterThanOrEqual(phi, array_length);
405 cmp = new (allocator) HGreaterThan(phi, array_length);
407 HInstruction* if_inst = new (allocator) HIf(cmp);
415 null_check = new (allocator) HNullCheck(parameter, 0);
416 array_length = new (allocator) HArrayLength(null_check);
417 *bounds_check = new (allocator) HBoundsCheck(phi, array_length, 0);
418 HInstruction* array_set = new (allocator) HArraySet(
421 HInstruction* add = new (allocator) HAdd(Primitive::kPrimInt, phi, constant_increment);
427 loop_body->AddInstruction(new (allocator) HGoto());
430 exit->AddInstruction(new (allocator) HExit());
437 ArenaAllocator allocator(&pool);
441 HGraph* graph = BuildSSAGraph1(&allocator, &bounds_check, 0, 1);
450 graph = BuildSSAGraph1(&allocator, &bounds_check, 1, 1);
459 graph = BuildSSAGraph1(&allocator, &bounds_check, -1, 1);
468 graph = BuildSSAGraph1(&allocator, &bounds_check, 0, 1, kCondGT);
478 graph = BuildSSAGraph1(&allocator, &bounds_check, 0, 2);
487 graph = BuildSSAGraph1(&allocator, &bounds_check, 1, 2);
497 static HGraph* BuildSSAGraph2(ArenaAllocator* allocator,
502 HGraph* graph = CreateGraph(allocator);
505 HBasicBlock* entry = new (allocator) HBasicBlock(graph);
508 HInstruction* parameter = new (allocator) HParameterValue(0, Primitive::kPrimNot);
516 HBasicBlock* block = new (allocator) HBasicBlock(graph);
519 HInstruction* null_check = new (allocator) HNullCheck(parameter, 0);
520 HInstruction* array_length = new (allocator) HArrayLength(null_check);
523 block->AddInstruction(new (allocator) HGoto());
525 HBasicBlock* loop_header = new (allocator) HBasicBlock(graph);
526 HBasicBlock* loop_body = new (allocator) HBasicBlock(graph);
527 HBasicBlock* exit = new (allocator) HBasicBlock(graph);
537 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt);
540 cmp = new (allocator) HLessThanOrEqual(phi, constant_initial);
543 cmp = new (allocator) HLessThan(phi, constant_initial);
545 HInstruction* if_inst = new (allocator) HIf(cmp);
551 HInstruction* add = new (allocator) HAdd(Primitive::kPrimInt, phi, constant_minus_1);
552 null_check = new (allocator) HNullCheck(parameter, 0);
553 array_length = new (allocator) HArrayLength(null_check);
554 *bounds_check = new (allocator) HBoundsCheck(add, array_length, 0);
555 HInstruction* array_set = new (allocator) HArraySet(
557 HInstruction* add_phi = new (allocator) HAdd(Primitive::kPrimInt, phi, constant_increment);
564 loop_body->AddInstruction(new (allocator) HGoto());
567 exit->AddInstruction(new (allocator) HExit());
574 ArenaAllocator allocator(&pool);
578 HGraph* graph = BuildSSAGraph2(&allocator, &bounds_check, 0);
587 graph = BuildSSAGraph2(&allocator, &bounds_check, 1);
596 graph = BuildSSAGraph2(&allocator, &bounds_check, -1);
605 graph = BuildSSAGraph2(&allocator, &bounds_check, 0, -1, kCondLT);
614 graph = BuildSSAGraph2(&allocator, &bounds_check, 0, -2);
625 static HGraph* BuildSSAGraph3(ArenaAllocator* allocator,
630 HGraph* graph = CreateGraph(allocator);
633 HBasicBlock* entry = new (allocator) HBasicBlock(graph);
641 HBasicBlock* block = new (allocator) HBasicBlock(graph);
644 HInstruction* new_array = new (allocator)
647 block->AddInstruction(new (allocator) HGoto());
649 HBasicBlock* loop_header = new (allocator) HBasicBlock(graph);
650 HBasicBlock* loop_body = new (allocator) HBasicBlock(graph);
651 HBasicBlock* exit = new (allocator) HBasicBlock(graph);
661 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt);
664 cmp = new (allocator) HGreaterThanOrEqual(phi, constant_10);
667 cmp = new (allocator) HGreaterThan(phi, constant_10);
669 HInstruction* if_inst = new (allocator) HIf(cmp);
675 HNullCheck* null_check = new (allocator) HNullCheck(new_array, 0);
676 HArrayLength* array_length = new (allocator) HArrayLength(null_check);
677 *bounds_check = new (allocator) HBoundsCheck(phi, array_length, 0);
678 HInstruction* array_set = new (allocator) HArraySet(
680 HInstruction* add = new (allocator) HAdd(Primitive::kPrimInt, phi, constant_increment);
686 loop_body->AddInstruction(new (allocator) HGoto());
689 exit->AddInstruction(new (allocator) HExit());
696 ArenaAllocator allocator(&pool);
701 HGraph* graph = BuildSSAGraph3(&allocator, &bounds_check, 0, 1, kCondGE);
711 graph = BuildSSAGraph3(&allocator, &bounds_check, 1, 1, kCondGE);
721 graph = BuildSSAGraph3(&allocator, &bounds_check, 0, 1, kCondGT);
731 graph = BuildSSAGraph3(&allocator, &bounds_check, 1, 8, kCondGE);
741 static HGraph* BuildSSAGraph4(ArenaAllocator* allocator,
745 HGraph* graph = CreateGraph(allocator);
748 HBasicBlock* entry = new (allocator) HBasicBlock(graph);
751 HInstruction* parameter = new (allocator) HParameterValue(0, Primitive::kPrimNot);
759 HBasicBlock* block = new (allocator) HBasicBlock(graph);
762 block->AddInstruction(new (allocator) HGoto());
764 HBasicBlock* loop_header = new (allocator) HBasicBlock(graph);
765 HBasicBlock* loop_body = new (allocator) HBasicBlock(graph);
766 HBasicBlock* exit = new (allocator) HBasicBlock(graph);
776 HPhi* phi = new (allocator) HPhi(allocator, 0, 0, Primitive::kPrimInt);
777 HInstruction* null_check = new (allocator) HNullCheck(parameter, 0);
778 HInstruction* array_length = new (allocator) HArrayLength(null_check);
781 cmp = new (allocator) HGreaterThanOrEqual(phi, array_length);
783 cmp = new (allocator) HGreaterThan(phi, array_length);
785 HInstruction* if_inst = new (allocator) HIf(cmp);
793 null_check = new (allocator) HNullCheck(parameter, 0);
794 array_length = new (allocator) HArrayLength(null_check);
795 HInstruction* sub = new (allocator) HSub(Primitive::kPrimInt, array_length, phi);
796 HInstruction* add_minus_1 = new (allocator)
798 *bounds_check = new (allocator) HBoundsCheck(add_minus_1, array_length, 0);
799 HInstruction* array_set = new (allocator) HArraySet(
801 HInstruction* add = new (allocator) HAdd(Primitive::kPrimInt, phi, constant_1);
809 loop_body->AddInstruction(new (allocator) HGoto());
812 exit->AddInstruction(new (allocator) HExit());
819 ArenaAllocator allocator(&pool);
823 HGraph* graph = BuildSSAGraph4(&allocator, &bounds_check, 0);
832 graph = BuildSSAGraph4(&allocator, &bounds_check, 1);
841 graph = BuildSSAGraph4(&allocator, &bounds_check, 0, kCondGT);
863 ArenaAllocator allocator(&pool);
865 HGraph* graph = CreateGraph(&allocator);
868 HBasicBlock* entry = new (&allocator) HBasicBlock(graph);
871 HInstruction* parameter = new (&allocator) HParameterValue(0, Primitive::kPrimNot);
878 HBasicBlock* block = new (&allocator) HBasicBlock(graph);
881 block->AddInstruction(new (&allocator) HGoto());
883 HBasicBlock* exit = new (&allocator) HBasicBlock(graph);
885 exit->AddInstruction(new (&allocator) HExit());
887 HBasicBlock* outer_header = new (&allocator) HBasicBlock(graph);
889 HPhi* phi_i = new (&allocator) HPhi(&allocator, 0, 0, Primitive::kPrimInt);
890 HNullCheck* null_check = new (&allocator) HNullCheck(parameter, 0);
891 HArrayLength* array_length = new (&allocator) HArrayLength(null_check);
892 HAdd* add = new (&allocator) HAdd(Primitive::kPrimInt, array_length, constant_minus_1);
893 HInstruction* cmp = new (&allocator) HGreaterThanOrEqual(phi_i, add);
894 HIf* if_inst = new (&allocator) HIf(cmp);
903 HBasicBlock* inner_header = new (&allocator) HBasicBlock(graph);
905 HPhi* phi_j = new (&allocator) HPhi(&allocator, 0, 0, Primitive::kPrimInt);
906 null_check = new (&allocator) HNullCheck(parameter, 0);
907 array_length = new (&allocator) HArrayLength(null_check);
908 HSub* sub = new (&allocator) HSub(Primitive::kPrimInt, array_length, phi_i);
909 add = new (&allocator) HAdd(Primitive::kPrimInt, sub, constant_minus_1);
910 cmp = new (&allocator) HGreaterThanOrEqual(phi_j, add);
911 if_inst = new (&allocator) HIf(cmp);
921 HBasicBlock* inner_body_compare = new (&allocator) HBasicBlock(graph);
923 null_check = new (&allocator) HNullCheck(parameter, 0);
924 array_length = new (&allocator) HArrayLength(null_check);
925 HBoundsCheck* bounds_check1 = new (&allocator) HBoundsCheck(phi_j, array_length, 0);
926 HArrayGet* array_get_j = new (&allocator)
932 HInstruction* j_plus_1 = new (&allocator) HAdd(Primitive::kPrimInt, phi_j, constant_1);
933 null_check = new (&allocator) HNullCheck(parameter, 0);
934 array_length = new (&allocator) HArrayLength(null_check);
935 HBoundsCheck* bounds_check2 = new (&allocator) HBoundsCheck(j_plus_1, array_length, 0);
936 HArrayGet* array_get_j_plus_1 = new (&allocator)
938 cmp = new (&allocator) HGreaterThanOrEqual(array_get_j, array_get_j_plus_1);
939 if_inst = new (&allocator) HIf(cmp);
948 HBasicBlock* inner_body_swap = new (&allocator) HBasicBlock(graph);
950 j_plus_1 = new (&allocator) HAdd(Primitive::kPrimInt, phi_j, constant_1);
952 null_check = new (&allocator) HNullCheck(parameter, 0);
953 array_length = new (&allocator) HArrayLength(null_check);
954 HInstruction* bounds_check3 = new (&allocator) HBoundsCheck(j_plus_1, array_length, 0);
955 array_get_j_plus_1 = new (&allocator)
963 null_check = new (&allocator) HNullCheck(parameter, 0);
964 array_length = new (&allocator) HArrayLength(null_check);
965 HInstruction* bounds_check4 = new (&allocator) HBoundsCheck(phi_j, array_length, 0);
966 array_get_j = new (&allocator)
972 null_check = new (&allocator) HNullCheck(parameter, 0);
973 array_length = new (&allocator) HArrayLength(null_check);
974 HInstruction* bounds_check5 = new (&allocator) HBoundsCheck(j_plus_1, array_length, 0);
975 HArraySet* array_set_j_plus_1 = new (&allocator)
982 null_check = new (&allocator) HNullCheck(parameter, 0);
983 array_length = new (&allocator) HArrayLength(null_check);
984 HInstruction* bounds_check6 = new (&allocator) HBoundsCheck(phi_j, array_length, 0);
985 HArraySet* array_set_j = new (&allocator)
991 inner_body_swap->AddInstruction(new (&allocator) HGoto());
993 HBasicBlock* inner_body_add = new (&allocator) HBasicBlock(graph);
995 add = new (&allocator) HAdd(Primitive::kPrimInt, phi_j, constant_1);
997 inner_body_add->AddInstruction(new (&allocator) HGoto());
1000 HBasicBlock* outer_body_add = new (&allocator) HBasicBlock(graph);
1002 add = new (&allocator) HAdd(Primitive::kPrimInt, phi_i, constant_1);
1004 outer_body_add->AddInstruction(new (&allocator) HGoto());