summaryrefslogtreecommitdiff
path: root/base/BinaryTree.regalloc
blob: 68a8265470ef0bedd8263132a40443b2981ffe37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
func Main
  in 0, out 0, callee-saves 0, spills 0
Live In:
  t.0: 30-31 34-36
  t.1: 35-36
  t.2: 37
Linear Range:
  t.0: 29-36
  t.1: 34-36
  t.2: 36-37
Allocation:
  t.0: t0
  t.1: t1
  t.2: t1

func BT.Start
  in 0, out 0, callee-saves 1, spills 0
Live In:
  this:
  t.0: 42-43
  root: 44 47-50 53-57 60-63 66-69 72-75 78-81 84-87 90-93 96-99 102-105 108-111 114-118 121-125 128-132 135-139 142-146 149-152 155-158 161-163
  t.1: 48-49
  ntb:
  t.2: 54-55
  t.3: 61-62
  t.4: 67-68
  t.5: 73-74
  t.6: 79-80
  t.7: 85-86
  t.8: 91-92
  t.9: 97-98
  t.10: 103-104
  t.11: 109-110
  t.12: 115-116
  t.13: 117
  t.14: 122-123
  t.15: 124
  t.16: 129-130
  t.17: 131
  t.18: 136-137
  t.19: 138
  t.20: 143-144
  t.21: 145
  t.22: 150-151
  t.23: 156-157
  t.24: 162-163
  t.25: 164
Linear Range:
  t.0: 41-43
  root: 43-163 (cross call)
  t.1: 47-49
  t.2: 53-55
  t.3: 60-62
  t.4: 66-68
  t.5: 72-74
  t.6: 78-80
  t.7: 84-86
  t.8: 90-92
  t.9: 96-98
  t.10: 102-104
  t.11: 108-110
  t.12: 114-116
  t.13: 116-117
  t.14: 121-123
  t.15: 123-124
  t.16: 128-130
  t.17: 130-131
  t.18: 135-137
  t.19: 137-138
  t.20: 142-144
  t.21: 144-145
  t.22: 149-151
  t.23: 155-157
  t.24: 161-163
  t.25: 163-164
Allocation:
  t.0: t0
  root: s0
  t.1: t0
  t.2: t0
  t.3: t0
  t.4: t0
  t.5: t0
  t.6: t0
  t.7: t0
  t.8: t0
  t.9: t0
  t.10: t0
  t.11: t0
  t.12: t0
  t.13: t0
  t.14: t0
  t.15: t0
  t.16: t0
  t.17: t0
  t.18: t0
  t.19: t0
  t.20: t0
  t.21: t0
  t.22: t0
  t.23: t0
  t.24: t0
  t.25: t0

func Tree.Init
  in 0, out 0, callee-saves 0, spills 0
Live In:
  this: 168-170
  v_key: 168
Linear Range:
  this: 167-170
  v_key: 167-168
Allocation:
  this: t0
  v_key: t1

func Tree.SetRight
  in 0, out 0, callee-saves 0, spills 0
Live In:
  this: 174
  rn: 174
Linear Range:
  this: 173-174
  rn: 173-174
Allocation:
  this: t0
  rn: t1

func Tree.SetLeft
  in 0, out 0, callee-saves 0, spills 0
Live In:
  this: 178
  ln: 178
Linear Range:
  this: 177-178
  ln: 177-178
Allocation:
  this: t0
  ln: t1

func Tree.GetRight
  in 0, out 0, callee-saves 0, spills 0
Live In:
  this: 182
  t.0: 183
Linear Range:
  this: 181-182
  t.0: 182-183
Allocation:
  this: t0
  t.0: t0

func Tree.GetLeft
  in 0, out 0, callee-saves 0, spills 0
Live In:
  this: 186
  t.0: 187
Linear Range:
  this: 185-186
  t.0: 186-187
Allocation:
  this: t0
  t.0: t0

func Tree.GetKey
  in 0, out 0, callee-saves 0, spills 0
Live In:
  this: 190
  t.0: 191
Linear Range:
  this: 189-190
  t.0: 190-191
Allocation:
  this: t0
  t.0: t0

func Tree.SetKey
  in 0, out 0, callee-saves 0, spills 0
Live In:
  this: 194
  v_key: 194
Linear Range:
  this: 193-194
  v_key: 193-194
Allocation:
  this: t0
  v_key: t1

func Tree.GetHas_Right
  in 0, out 0, callee-saves 0, spills 0
Live In:
  this: 198
  t.0: 199
Linear Range:
  this: 197-198
  t.0: 198-199
Allocation:
  this: t0
  t.0: t0

func Tree.GetHas_Left
  in 0, out 0, callee-saves 0, spills 0
Live In:
  this: 202
  t.0: 203
Linear Range:
  this: 201-202
  t.0: 202-203
Allocation:
  this: t0
  t.0: t0

func Tree.SetHas_Left
  in 0, out 0, callee-saves 0, spills 0
Live In:
  this: 206
  val: 206
Linear Range:
  this: 205-206
  val: 205-206
Allocation:
  this: t0
  val: t1

func Tree.SetHas_Right
  in 0, out 0, callee-saves 0, spills 0
Live In:
  this: 210
  val: 210
Linear Range:
  this: 209-210
  val: 209-210
Allocation:
  this: t0
  val: t1

func Tree.Compare
  in 0, out 0, callee-saves 0, spills 0
Live In:
  this:
  num1: 214-217 221
  num2: 214-216
  ntb: 219 225 230
  nti: 216-217 221
  t.0: 217
  t.1: 222
  t.2: 223
Linear Range:
  num1: 213-221
  num2: 213-216
  ntb: 218-230
  nti: 215-221
  t.0: 216-217
  t.1: 221-222
  t.2: 222-223
Allocation:
  num1: t0
  num2: t1
  ntb: t1
  nti: t2
  t.0: t1
  t.1: t2
  t.2: t2

func Tree.Insert
  in 0, out 0, callee-saves 4, spills 0
Live In:
  this: 233-236 239-242
  v_key: 233-236 239-246 249-254 257-261 264-270 273-276 279-285 288-292 295-301 304-307 310-315
  t.0: 234-235
  new_node: 236 239-246 249-254 257-261 264-270 273-276 279-285 288-292 295-301 304-307 310-315
  t.1: 240-241
  ntb:
  current_node: 243-246 249-254 257-261 264-270 273-276 279-285 288-292 295-301 304-307 310-315
  cont: 245-246 249-254 257-261 264-267 270 273-276 279-285 288-292 295-298 301 304-307 310-315
  t.2: 250-251
  key_aux: 252
  t.3: 253
  t.4: 258-259
  t.5: 260
  t.6: 265-266
  t.7: 274-275
  t.8: 280-281
  t.9: 289-290
  t.10: 291
  t.11: 296-297
  t.12: 305-306
  t.13: 311-312
Linear Range:
  this: 232-242 (cross call)
  v_key: 232-315 (cross call)
  t.0: 233-235
  new_node: 235-315 (cross call)
  t.1: 239-241
  current_node: 242-315 (cross call)
  cont: 243-315 (cross call)
  t.2: 249-251
  key_aux: 251-252
  t.3: 252-253
  t.4: 257-259
  t.5: 259-260
  t.6: 264-266
  t.7: 273-275
  t.8: 279-281
  t.9: 288-290
  t.10: 290-291
  t.11: 295-297
  t.12: 304-306
  t.13: 310-312
Allocation:
  this: s0
  v_key: s1
  t.0: t0
  new_node: s2
  t.1: t0
  current_node: s0
  cont: s3
  t.2: t0
  key_aux: t0
  t.3: t0
  t.4: t0
  t.5: t0
  t.6: t0
  t.7: t0
  t.8: t0
  t.9: t0
  t.10: t0
  t.11: t0
  t.12: t0
  t.13: t0

func Tree.Delete
  in 0, out 0, callee-saves 7, spills 0
Live In:
  this: 320-327 330-335 338-343 346-357 360-365 368-378 381-386 389-416
  v_key: 320-327 330-335 338-343 346-357 360-365 368-378 381-386 389-416
  current_node: 321-327 330-335 338-343 346-357 360-365 368-378 381-386 389-416
  parent_node: 322-327 330-335 338-341 343 346-357 360-363 365 368-378 381-386 389-416
  cont: 323-327 330-335 338-343 346-349 353-357 360-365 368-371 375 415-416
  found: 324-327 330-335 338-343 346-357 360-365 368-375 412-418
  is_root: 326-327 330-334 355-356 377 416
  t.0: 331-332
  key_aux: 333-334 355
  t.1: 334
  t.2: 339-340
  t.3: 341
  t.4: 347-348
  t.5: 356
  t.6: 361-362
  t.7: 363
  t.8: 369-370
  t.10: 382-383
  t.11: 384
  t.12: 385
  t.13: 390-391
  t.14: 392
  t.9: 393 397
  ntb:
  t.15: 402-403
  t.16: 408-409
Linear Range:
  this: 319-416 (cross call)
  v_key: 319-416 (cross call)
  current_node: 320-416 (cross call)
  parent_node: 321-416 (cross call)
  cont: 322-416 (cross call)
  found: 323-418 (cross call)
  is_root: 324-416 (cross call)
  t.0: 330-332
  key_aux: 332-355
  t.1: 333-334
  t.2: 338-340
  t.3: 340-341
  t.4: 346-348
  t.5: 355-356
  t.6: 360-362
  t.7: 362-363
  t.8: 368-370
  t.10: 381-383
  t.11: 383-384
  t.12: 384-385
  t.13: 389-391
  t.14: 391-392
  t.9: 392-397
  t.15: 401-403
  t.16: 407-409
Allocation:
  this: s0
  v_key: s1
  current_node: s2
  parent_node: s3
  cont: s4
  found: s5
  is_root: s6
  t.0: t0
  key_aux: t0
  t.1: t1
  t.2: t1
  t.3: t1
  t.4: t1
  t.5: t0
  t.6: t0
  t.7: t0
  t.8: t0
  t.10: t0
  t.11: t0
  t.12: t0
  t.13: t0
  t.14: t0
  t.9: t0
  t.15: t0
  t.16: t0

func Tree.Remove
  in 0, out 0, callee-saves 3, spills 0
Live In:
  this: 421 424-430 433 436-442 445 448-451 454-457 460-467 470-472 482 485-487
  p_node: 421 424-430 433 436-442 445 448-451 454-457 460-467 470-474 477-479 482 485-489 492-494
  c_node: 421 424-430 433 436-442 445 448-450
  t.0: 425-426
  t.1: 427
  t.2: 429-430
  ntb:
  t.3: 437-438
  t.4: 439
  t.5: 441-442
  t.6: 449-450
  auxkey1: 451 454-457 460-465
  t.7: 455-456
  t.8: 457 460-462
  t.9: 461-462
  auxkey2: 463-465
  t.10: 464-465
  t.11: 466
  t.12: 471-473
  t.13: 473
  t.14: 478-479
  t.15: 486-488
  t.16: 488
  t.17: 493-494
Linear Range:
  this: 420-487 (cross call)
  p_node: 420-494 (cross call)
  c_node: 420-450 (cross call)
  t.0: 424-426
  t.1: 426-427
  t.2: 428-430
  t.3: 436-438
  t.4: 438-439
  t.5: 440-442
  t.6: 448-450
  auxkey1: 450-465 (cross call)
  t.7: 454-456
  t.8: 456-462
  t.9: 460-462
  auxkey2: 462-465
  t.10: 463-465
  t.11: 465-466
  t.12: 470-473
  t.13: 472-473
  t.14: 477-479
  t.15: 485-488
  t.16: 487-488
  t.17: 492-494
Allocation:
  this: s0
  p_node: s1
  c_node: s2
  t.0: t0
  t.1: t0
  t.2: t0
  t.3: t0
  t.4: t0
  t.5: t0
  t.6: t0
  auxkey1: s2
  t.7: t0
  t.8: t0
  t.9: t1
  auxkey2: t1
  t.10: t0
  t.11: t0
  t.12: t0
  t.13: t1
  t.14: t1
  t.15: t1
  t.16: t0
  t.17: t0

func Tree.RemoveRight
  in 0, out 0, callee-saves 4, spills 0
Live In:
  this: 502 505-509 512-514 517-520 523-528 531-536 539-541
  p_node: 502 505-508 528 531-536 539-543 546-548
  c_node: 502 505-509 512-514 517-520 523-528 531-534
  t.0: 506-507
  t.1: 508
  t.2: 513-514 517-520 523-526
  t.3: 518-519
  t.4: 520 523-525
  t.5: 524-525
  t.6: 526
  ntb:
  t.7: 532-533
  t.8: 540-542
  t.9: 542
  t.10: 547-548
Linear Range:
  this: 500-541 (cross call)
  p_node: 500-548 (cross call)
  c_node: 500-534 (cross call)
  t.0: 505-507
  t.1: 507-508
  t.2: 512-526 (cross call)
  t.3: 517-519
  t.4: 519-525
  t.5: 523-525
  t.6: 525-526
  t.7: 531-533
  t.8: 539-542
  t.9: 541-542
  t.10: 546-548
Allocation:
  this: s0
  p_node: s1
  c_node: s2
  t.0: t0
  t.1: t0
  t.2: s3
  t.3: t0
  t.4: t0
  t.5: t1
  t.6: t1
  t.7: t1
  t.8: t1
  t.9: t0
  t.10: t0

func Tree.RemoveLeft
  in 0, out 0, callee-saves 4, spills 0
Live In:
  this: 553 556-560 563-565 568-571 574-579 582-587 590-592
  p_node: 553 556-559 579 582-587 590-594 597-599
  c_node: 553 556-560 563-565 568-571 574-579 582-585
  t.0: 557-558
  t.1: 559
  t.2: 564-565 568-571 574-577
  t.3: 569-570
  t.4: 571 574-576
  t.5: 575-576
  t.6: 577
  ntb:
  t.7: 583-584
  t.8: 591-593
  t.9: 593
  t.10: 598-599
Linear Range:
  this: 551-592 (cross call)
  p_node: 551-599 (cross call)
  c_node: 551-585 (cross call)
  t.0: 556-558
  t.1: 558-559
  t.2: 563-577 (cross call)
  t.3: 568-570
  t.4: 570-576
  t.5: 574-576
  t.6: 576-577
  t.7: 582-584
  t.8: 590-593
  t.9: 592-593
  t.10: 597-599
Allocation:
  this: s0
  p_node: s1
  c_node: s2
  t.0: t0
  t.1: t0
  t.2: s3
  t.3: t0
  t.4: t0
  t.5: t1
  t.6: t1
  t.7: t1
  t.8: t1
  t.9: t0
  t.10: t0

func Tree.Search
  in 0, out 0, callee-saves 4, spills 0
Live In:
  this: 603
  v_key: 603-608 611-616 619-623 626-637 640-644 647-660
  current_node: 604-608 611-616 619-623 626-637 640-644 647-660
  cont: 605-608 611-616 619-623 626-629 633-637 640-644 647-650 654 660
  ifound: 607-608 611-616 619-623 626-637 640-644 647-654 657-662
  t.0: 612-613
  key_aux: 614-615 635
  t.1: 615
  t.2: 620-621
  t.3: 622
  t.4: 627-628
  t.5: 636
  t.6: 641-642
  t.7: 643
  t.8: 648-649
Linear Range:
  this: 602-603
  v_key: 602-660 (cross call)
  current_node: 603-660 (cross call)
  cont: 604-660 (cross call)
  ifound: 605-662 (cross call)
  t.0: 611-613
  key_aux: 613-635
  t.1: 614-615
  t.2: 619-621
  t.3: 621-622
  t.4: 626-628
  t.5: 635-636
  t.6: 640-642
  t.7: 642-643
  t.8: 647-649
Allocation:
  this: t0
  v_key: s0
  current_node: s1
  cont: s2
  ifound: s3
  t.0: t0
  key_aux: t0
  t.1: t1
  t.2: t1
  t.3: t1
  t.4: t1
  t.5: t0
  t.6: t0
  t.7: t0
  t.8: t0

func Tree.Print
  in 0, out 0, callee-saves 0, spills 0
Live In:
  this: 665-668
  current_node: 666-668
  t.0: 667-668
  ntb:
Linear Range:
  this: 664-668
  current_node: 665-668
  t.0: 666-668
Allocation:
  this: t0
  current_node: t1
  t.0: t2

func Tree.RecPrint
  in 0, out 0, callee-saves 3, spills 0
Live In:
  this: 672 675-681 684-692 695-699 702-708 711-714
  node: 672 675-681 684-692 695-699 702-708 711-713
  t.0: 676-677
  t.1: 678
  t.2: 680-681 684-687
  t.3: 685-686
  t.4: 687
  ntb:
  t.5: 696-697
  t.6: 698
  t.7: 703-704
  t.8: 705
  t.9: 707-708 711-714
  t.10: 712-713
  t.11: 714
Linear Range:
  this: 671-714 (cross call)
  node: 671-713 (cross call)
  t.0: 675-677
  t.1: 677-678
  t.2: 679-687 (cross call)
  t.3: 684-686
  t.4: 686-687
  t.5: 695-697
  t.6: 697-698
  t.7: 702-704
  t.8: 704-705
  t.9: 706-714 (cross call)
  t.10: 711-713
  t.11: 713-714
Allocation:
  this: s0
  node: s1
  t.0: t0
  t.1: t0
  t.2: s2
  t.3: t0
  t.4: t0
  t.5: t0
  t.6: t0
  t.7: t0
  t.8: t0
  t.9: s2
  t.10: t0
  t.11: t0