Skip to content

Commit dacea90

Browse files
DinoVmeta-codesync[bot]
authored andcommitted
Update expected HIR for 3.14
Summary: On D88116848 the 3.14 runtime tests apparently didn't run... this updates the expected HIR. Reviewed By: mpage Differential Revision: D88280122 fbshipit-source-id: 2c3a1e73d8985a846253ceec2f392a110745ce99
1 parent 1fab20e commit dacea90

10 files changed

Lines changed: 671 additions & 259 deletions

cinderx/RuntimeTests/hir_tests/all_passes_static_test.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,18 +277,17 @@ fun jittestmodule:test {
277277
}
278278
}
279279
Incref v57
280-
UpdatePrevInstr<idx:36 line_no:3: no parent>
280+
UpdatePrevInstr<idx:42 line_no:3: no parent>
281281
XDecref v34
282-
v51:Nullptr = LoadConst<Nullptr>
283-
v52:Object = CallMethod<3> v50 v51 v57 {
284-
LiveValues<5> b:v19 s:v46 b:v50 unc:v51 o:v57
282+
v58:Object = VectorCall<1> v50 v57 {
283+
LiveValues<4> b:v19 s:v46 b:v50 o:v57
285284
FrameState {
286285
CurInstrOffset 84
287286
Locals<3> v19 v46 v57
288287
Stack<1> v19
289288
}
290289
}
291-
Decref v52
290+
Decref v58
292291
Branch<6>
293292
}
294293

cinderx/RuntimeTests/hir_tests/all_passes_test.txt

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -240,26 +240,38 @@ fun jittestmodule:test {
240240
Stack<2> v20 v21
241241
}
242242
}
243+
v34:Type = LoadField<ob_type@8, Type, borrowed> v14
244+
v35:CBool = PrimitiveCompare<Equal> v34 v23
245+
CondBranch<5, 6> v35
246+
}
247+
248+
bb 5 (preds 3) {
249+
Branch<7>
250+
}
251+
252+
bb 6 (preds 3) {
243253
UpdatePrevInstr<idx:12 line_no:2: no parent>
244-
v24:Bool = CallMethod<4> v20 v21 v14 v23 {
245-
LiveValues<4> b:v14 b:v20 unc:v21 unc:v23
254+
v36:CBool = IsInstance v14 v23 {
255+
LiveValues<2> b:v14 unc:v23
246256
FrameState {
247257
CurInstrOffset 24
248258
Locals<1> v14
249259
}
250260
}
251-
v31:ImmortalBool[True] = LoadConst<ImmortalBool[True]>
252-
v32:CBool = PrimitiveCompare<Equal> v24 v31
253-
Decref v24
254-
CondBranch<1, 2> v32
261+
Branch<7>
262+
}
263+
264+
bb 7 (preds 5, 6) {
265+
v37:CBool = Phi<5, 6> v35 v36
266+
CondBranch<1, 2> v37
255267
}
256268

257-
bb 1 (preds 3) {
269+
bb 1 (preds 7) {
258270
v29:ImmortalLongExact[1] = LoadConst<ImmortalLongExact[1]>
259271
Return v29
260272
}
261273

262-
bb 2 (preds 3) {
274+
bb 2 (preds 7) {
263275
v30:ImmortalLongExact[2] = LoadConst<ImmortalLongExact[2]>
264276
Return v30
265277
}
@@ -382,14 +394,14 @@ fun jittestmodule:test {
382394
Stack<2> v11 v12
383395
}
384396
}
385-
UpdatePrevInstr<idx:11 line_no:3: no parent>
386-
v15:LongExact = CallMethod<3> v11 v12 v14 {
387-
LiveValues<3> b:v11 unc:v12 b:v14
397+
v18:CInt64 = LoadField<ob_size@16, CInt64, borrowed> v14
398+
v19:LongExact = PrimitiveBox<CInt64> v18 {
399+
LiveValues<1> s:v18
388400
FrameState {
389401
CurInstrOffset 22
390402
}
391403
}
392-
Return v15
404+
Return v19
393405
}
394406
}
395407
--- Test Name ---
@@ -492,17 +504,16 @@ fun jittestmodule:test {
492504
Locals<1> v8
493505
}
494506
}
495-
v15:Nullptr = LoadConst<Nullptr>
496507
v16:MortalUnicodeExact["foo"] = LoadConst<MortalUnicodeExact["foo"]>
497508
UpdatePrevInstr<idx:8 line_no:2: no parent>
498-
v17:Bool = CallMethod<4> v14 v15 v8 v16 {
499-
LiveValues<4> b:v8 b:v14 unc:v15 b:v16
509+
v18:Bool = VectorCall<2> v14 v8 v16 {
510+
LiveValues<3> b:v8 b:v14 b:v16
500511
FrameState {
501512
CurInstrOffset 16
502513
Locals<1> v8
503514
}
504515
}
505-
Return v17
516+
Return v18
506517
}
507518
}
508519
--- Test Name ---

cinderx/RuntimeTests/hir_tests/dead_code_elimination_test.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,7 @@ fun jittestmodule:test {
397397
}
398398
}
399399
Snapshot
400-
v19:Nullptr = LoadConst<Nullptr>
401-
v20:Object = CallMethod<2> v17 v19 {
400+
v22:Object = VectorCall<0> v17 {
402401
FrameState {
403402
CurInstrOffset 12
404403
Locals<1> v17

cinderx/RuntimeTests/hir_tests/dynamic_comparison_elimination_test.txt

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -341,30 +341,45 @@ fun jittestmodule:test {
341341
Descr 'LOAD_GLOBAL: str'
342342
}
343343
Snapshot
344-
v24:Bool = CallMethod<4> v20 v21 v14 v23 {
344+
v34:Type = LoadField<ob_type@8, Type, borrowed> v14
345+
v35:CBool = PrimitiveCompare<Equal> v34 v23
346+
CondBranch<5, 6> v35
347+
}
348+
349+
bb 5 (preds 3) {
350+
Branch<7>
351+
}
352+
353+
bb 6 (preds 3) {
354+
v36:CBool = IsInstance v14 v23 {
345355
FrameState {
346356
CurInstrOffset 24
347357
Locals<1> v14
348358
}
349359
}
360+
Branch<7>
361+
}
362+
363+
bb 7 (preds 5, 6) {
364+
v37:CBool = Phi<5, 6> v35 v36
365+
v38:Bool = PrimitiveBoxBool v37
350366
Snapshot
351-
UseType<Bool> v24
352-
v31:ImmortalBool[True] = LoadConst<ImmortalBool[True]>
353-
v32:CBool = PrimitiveCompare<Equal> v24 v31
354-
v26:Bool = PrimitiveBoxBool v32
367+
UseType<Bool> v38
368+
v32:ImmortalBool[True] = LoadConst<ImmortalBool[True]>
369+
v26:Bool = PrimitiveBoxBool v37
355370
Snapshot
356371
v27:ImmortalBool[True] = LoadConst<ImmortalBool[True]>
357-
CondBranch<1, 2> v32
372+
CondBranch<1, 2> v37
358373
}
359374

360-
bb 1 (preds 3) {
375+
bb 1 (preds 7) {
361376
Snapshot
362377
v29:ImmortalLongExact[1] = LoadConst<ImmortalLongExact[1]>
363378
Snapshot
364379
Return v29
365380
}
366381

367-
bb 2 (preds 3) {
382+
bb 2 (preds 7) {
368383
Snapshot
369384
v30:ImmortalNoneType = LoadConst<ImmortalNoneType>
370385
Return v30

cinderx/RuntimeTests/hir_tests/inliner_elimination_test.txt

Lines changed: 106 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,34 @@ fun jittestmodule:test {
113113
}
114114
v11:Nullptr = LoadConst<Nullptr>
115115
Snapshot
116-
v12:Object = CallMethod<2> v10 v11 {
116+
v22:Object = LoadField<func_code@48, Object, borrowed> v10
117+
v23:MortalCode["foo"] = GuardIs<0xdeadbeef> v22 {
118+
}
119+
BeginInlinedFunction<jittestmodule:foo> {
120+
CurInstrOffset 12
121+
}
122+
Snapshot
123+
v18:CInt64 = LoadEvalBreaker
124+
CondBranch<5, 4> v18
125+
}
126+
127+
bb 5 (preds 1) {
128+
Snapshot
129+
v19:CInt32 = RunPeriodicTasks {
117130
FrameState {
118-
CurInstrOffset 12
131+
CurInstrOffset 0
119132
}
120133
}
134+
Branch<4>
135+
}
136+
137+
bb 4 (preds 1, 5) {
138+
Snapshot
139+
v20:ImmortalLongExact[4] = LoadConst<ImmortalLongExact[4]>
121140
Snapshot
122-
Return v12
141+
EndInlinedFunction
142+
Snapshot
143+
Return v20
123144
}
124145
}
125146
--- Test Name ---
@@ -288,32 +309,74 @@ fun jittestmodule:test {
288309
}
289310
v15:Nullptr = LoadConst<Nullptr>
290311
Snapshot
291-
v16:Object = CallMethod<2> v14 v15 {
312+
v32:Object = LoadField<func_code@48, Object, borrowed> v14
313+
v33:MortalCode["foo"] = GuardIs<0xdeadbeef> v32 {
314+
}
315+
BeginInlinedFunction<jittestmodule:foo> {
316+
CurInstrOffset 12
317+
}
318+
Snapshot
319+
v28:CInt64 = LoadEvalBreaker
320+
CondBranch<5, 4> v28
321+
}
322+
323+
bb 5 (preds 1) {
324+
Snapshot
325+
v29:CInt32 = RunPeriodicTasks {
292326
FrameState {
293-
CurInstrOffset 12
327+
CurInstrOffset 0
294328
}
295329
}
330+
Branch<4>
331+
}
332+
333+
bb 4 (preds 1, 5) {
334+
Snapshot
335+
v30:ImmortalLongExact[3] = LoadConst<ImmortalLongExact[3]>
336+
Snapshot
337+
EndInlinedFunction
296338
Snapshot
297339
v17:OptObject = LoadGlobalCached<1; "bar">
298340
v18:MortalFunc[function:0xdeadbeef] = GuardIs<0xdeadbeef> v17 {
299341
Descr 'LOAD_GLOBAL: bar'
300342
}
301343
v19:Nullptr = LoadConst<Nullptr>
302344
Snapshot
303-
v20:Object = CallMethod<2> v18 v19 {
304-
FrameState {
305-
CurInstrOffset 30
306-
Stack<1> v16
307-
}
345+
v42:Object = LoadField<func_code@48, Object, borrowed> v18
346+
v43:MortalCode["bar"] = GuardIs<0xdeadbeef> v42 {
347+
}
348+
BeginInlinedFunction<jittestmodule:bar> {
349+
CurInstrOffset 30
350+
Stack<1> v30
308351
}
309352
Snapshot
310-
v21:Object = BinaryOp<Add> v16 v20 {
353+
v38:CInt64 = LoadEvalBreaker
354+
CondBranch<10, 9> v38
355+
}
356+
357+
bb 10 (preds 4) {
358+
Snapshot
359+
v39:CInt32 = RunPeriodicTasks {
311360
FrameState {
312-
CurInstrOffset 38
361+
CurInstrOffset 0
313362
}
314363
}
364+
Branch<9>
365+
}
366+
367+
bb 9 (preds 4, 10) {
368+
Snapshot
369+
v40:ImmortalLongExact[4] = LoadConst<ImmortalLongExact[4]>
315370
Snapshot
316-
Return v21
371+
EndInlinedFunction
372+
Snapshot
373+
UseType<LongExact> v30
374+
UseType<LongExact> v40
375+
UseType<ImmortalLongExact[3]> v30
376+
UseType<ImmortalLongExact[4]> v40
377+
v45:ImmortalLongExact[7] = LoadConst<ImmortalLongExact[7]>
378+
Snapshot
379+
Return v45
317380
}
318381
}
319382
--- Test Name ---
@@ -449,13 +512,40 @@ fun jittestmodule:test {
449512
v14:ImmortalLongExact[3] = LoadConst<ImmortalLongExact[3]>
450513
Snapshot
451514
v15:ImmortalUnicodeExact["x"] = LoadConst<ImmortalUnicodeExact["x"]>
452-
v16:Object = CallMethod<4> v12 v13 v14 v15 {
515+
v32:Object = LoadField<func_code@48, Object, borrowed> v12
516+
v33:MortalCode["add"] = GuardIs<0xdeadbeef> v32 {
517+
}
518+
BeginInlinedFunction<jittestmodule:add> {
519+
CurInstrOffset 16
520+
}
521+
Snapshot
522+
v26:CInt64 = LoadEvalBreaker
523+
CondBranch<5, 4> v26
524+
}
525+
526+
bb 5 (preds 1) {
527+
Snapshot
528+
v27:CInt32 = RunPeriodicTasks {
529+
FrameState {
530+
CurInstrOffset 0
531+
Locals<2> v14 v15
532+
}
533+
}
534+
Branch<4>
535+
}
536+
537+
bb 4 (preds 1, 5) {
538+
Snapshot
539+
v30:Object = BinaryOp<Add> v14 v15 {
453540
FrameState {
454-
CurInstrOffset 16
541+
CurInstrOffset 4
542+
Locals<2> v14 v15
455543
}
456544
}
457545
Snapshot
458-
Return v16
546+
EndInlinedFunction
547+
Snapshot
548+
Return v30
459549
}
460550
}
461551
--- End ---

cinderx/RuntimeTests/hir_tests/inliner_static_test.txt

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,16 +595,32 @@ fun jittestmodule:test {
595595
Descr 'LOAD_GLOBAL: bool'
596596
}
597597
Snapshot
598-
v30:Bool = CallMethod<4> v26 v27 v6 v29 {
598+
v34:Type = LoadField<ob_type@8, Type, borrowed> v6
599+
v35:CBool = PrimitiveCompare<Equal> v34 v29
600+
CondBranch<8, 9> v35
601+
}
602+
603+
bb 8 (preds 4) {
604+
Branch<10>
605+
}
606+
607+
bb 9 (preds 4) {
608+
v36:CBool = IsInstance v6 v29 {
599609
FrameState {
600610
CurInstrOffset 24
601611
Locals<1> v6
602612
}
603613
}
614+
Branch<10>
615+
}
616+
617+
bb 10 (preds 8, 9) {
618+
v37:CBool = Phi<8, 9> v35 v36
619+
v38:Bool = PrimitiveBoxBool v37
604620
Snapshot
605621
EndInlinedFunction
606622
Snapshot
607-
Return v30
623+
Return v38
608624
}
609625
}
610626
--- End ---

0 commit comments

Comments
 (0)