Skip to content

Commit

Permalink
[AIE] Add 'original order' strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
Martien de Jong committed Dec 11, 2024
1 parent 1353d05 commit c9a87bf
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 34 deletions.
1 change: 1 addition & 0 deletions llvm/lib/Target/AIE/AIEPostPipeliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ static const struct {
} Strategies[] = {
// Loosely speaking, a lower value of the first parameter targets
// a lower stage count, which benefits code size.
{1, false, {ConfigStrategy::NodeNum}},
{1, false, {ConfigStrategy::Latest}},
{1, true, {ConfigStrategy::Critical}},
{1, true, {ConfigStrategy::Critical, ConfigStrategy::LCDLatest}},
Expand Down
24 changes: 12 additions & 12 deletions llvm/test/CodeGen/AIE/aie2/schedule/postpipeliner/conv2d.mir
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@
; CHECK-NEXT: vldb wh6, [p0], m6; nopa ; nops ; nopxm ; nopv
; CHECK-NEXT: vldb wl8, [p0], m6; nopa ; nops ; add r0, r5, #33; vshift.align x2, x2, s1, x8, r0; nopv
; CHECK-NEXT: vldb.3d wh8, [p0], d0; nopa ; nops ; nopx ; vshuffle x9, x4, x2, r2; nopv
; CHECK-NEXT: vldb wl10, [p1], #32; nopa ; nops ; nopx ; vshuffle x3, x4, x2, r3; nopv
; CHECK-NEXT: vldb wh10, [p1], #32; nopx ; vshuffle x1, x9, x0, r8; vmac cm1, cm1, x9, x10, r4
; CHECK-NEXT: vldb wl7, [p1], #32; vshuffle x5, x3, x0, r8; vmac cm3, cm3, x3, x10, r4
; CHECK-NEXT: vldb wh7, [p1], #32; mov r6, p0; vmac cm2, cm2, x1, x10, r4
; CHECK-NEXT: vldb wl10, [p1], #32; nopa ; nops ; nopx ; vshuffle x1, x9, x0, r8; nopv
; CHECK-NEXT: vldb wh10, [p1], #32; nopx ; vshuffle x3, x4, x2, r3; vmac cm1, cm1, x9, x10, r4
; CHECK-NEXT: vldb wl7, [p1], #32; vshuffle x5, x3, x0, r8; vmac cm2, cm2, x1, x10, r4
; CHECK-NEXT: vldb wh7, [p1], #32; mov r6, p0; vmac cm3, cm3, x3, x10, r4
; CHECK-NEXT: .p2align 4
; CHECK-NEXT: .LBB0_2: // %inner.loop
; CHECK-NEXT: // Parent Loop BB0_1 Depth=1
Expand All @@ -112,21 +112,21 @@
; CHECK-NEXT: nopa ; vldb wh6, [p0], m6; nopx ; vmac cm5, cm5, x9, x7, r4
; CHECK-NEXT: vldb wl8, [p0], m6; add r0, r5, #33; vshift.align x2, x2, s1, x8, r0; vmac cm6, cm6, x1, x7, r4
; CHECK-NEXT: vldb.3d wh8, [p0], d0; vshuffle x9, x4, x2, r2; vmac cm7, cm7, x3, x7, r4
; CHECK-NEXT: vldb wl10, [p1], #32; vshuffle x3, x4, x2, r3; vmac cm0, cm0, x5, x7, r4
; CHECK-NEXT: vldb wh10, [p1], #32; vshuffle x1, x9, x0, r8; vmac cm1, cm1, x9, x10, r4
; CHECK-NEXT: vldb wl7, [p1], #32; vshuffle x5, x3, x0, r8; vmac cm3, cm3, x3, x10, r4
; CHECK-NEXT: vldb wl10, [p1], #32; vshuffle x1, x9, x0, r8; vmac cm0, cm0, x5, x7, r4
; CHECK-NEXT: vldb wh10, [p1], #32; vshuffle x3, x4, x2, r3; vmac cm1, cm1, x9, x10, r4
; CHECK-NEXT: vldb wl7, [p1], #32; vshuffle x5, x3, x0, r8; vmac cm2, cm2, x1, x10, r4
; CHECK-NEXT: .L_LEnd0:
; CHECK-NEXT: vldb wh7, [p1], #32; nopa ; nops ; nopx ; mov r6, p0; vmac cm2, cm2, x1, x10, r4
; CHECK-NEXT: vldb wh7, [p1], #32; nopa ; nops ; nopx ; mov r6, p0; vmac cm3, cm3, x3, x10, r4
; CHECK-NEXT: // %bb.3: // %outer.loop.latch
; CHECK-NEXT: // in Loop: Header=BB0_1 Depth=1
; CHECK-NEXT: nopa ; and r5, r6, r9; vshift.align x4, x4, s1, x6, r0; vmac cm4, cm4, x5, x10, r4
; CHECK-NEXT: vmac cm5, cm5, x9, x7, r4
; CHECK-NEXT: add r0, r5, #33; vshift.align x2, x2, s1, x8, r0; vmac cm6, cm6, x1, x7, r4
; CHECK-NEXT: vshuffle x9, x4, x2, r2; vmac cm7, cm7, x3, x7, r4
; CHECK-NEXT: vshuffle x3, x4, x2, r3; vmac cm0, cm0, x5, x7, r4
; CHECK-NEXT: vshuffle x1, x9, x0, r8; vmac cm1, cm1, x9, x10, r4
; CHECK-NEXT: vshuffle x5, x3, x0, r8; vmac cm3, cm3, x3, x10, r4
; CHECK-NEXT: vmac cm2, cm2, x1, x10, r4
; CHECK-NEXT: vshuffle x1, x9, x0, r8; vmac cm0, cm0, x5, x7, r4
; CHECK-NEXT: vshuffle x3, x4, x2, r3; vmac cm1, cm1, x9, x10, r4
; CHECK-NEXT: vshuffle x5, x3, x0, r8; vmac cm2, cm2, x1, x10, r4
; CHECK-NEXT: vmac cm3, cm3, x3, x10, r4
; CHECK-NEXT: vmac cm4, cm4, x5, x10, r4
; CHECK-NEXT: vmac cm5, cm5, x9, x7, r4
; CHECK-NEXT: vmac cm6, cm6, x1, x7, r4
Expand Down
44 changes: 22 additions & 22 deletions llvm/test/CodeGen/AIE/aie2/schedule/postpipeliner/conv2d_bf16-1.mir
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,24 @@
; CHECK-NEXT: vlda wh7, [p4, #352]; vshift.align x0, x0, s0, x8, r3
; CHECK-NEXT: vlda wl7, [p4, #320]; movxm le, #.L_LEnd0
; CHECK-NEXT: nopb ; vlda wh9, [p4, #416]; nops ; nopx ; vshift.align x2, x2, s0, x10, r3; nopv
; CHECK-NEXT: nopb ; vlda wl9, [p4, #384]; nops ; nopx ; vshuffle x5, x0, x2, r25; nopv
; CHECK-NEXT: nopb ; vlda wh11, [p4, #480]; nops ; nopx ; vshift.align x4, x4, s0, x1, r3; nopv
; CHECK-NEXT: nopb ; vlda wl11, [p4, #448]; nops ; nopx ; vshuffle x8, x0, x2, r9; nopv
; CHECK-NEXT: vldb wh5, [p5, #32]; nopa ; nops ; nopx ; vshift.align x6, x6, s0, x3, r3; nopv
; CHECK-NEXT: nopb ; vlda wl5, [p5], #256; nops ; nopx ; vshuffle x3, x4, x6, r9; nopv
; CHECK-NEXT: nopb ; vlda wl9, [p4, #384]; nops ; nopx ; vshuffle x8, x0, x2, r9; nopv
; CHECK-NEXT: vldb wh5, [p5, #32]; nopa ; nops ; nopx ; vshift.align x4, x4, s0, x1, r3; nopv
; CHECK-NEXT: nopb ; vlda wl5, [p5], #256; nops ; nopx ; vshuffle x5, x0, x2, r25; nopv
; CHECK-NEXT: nopb ; vlda wh11, [p4, #480]; nops ; nopx ; vshift.align x6, x6, s0, x3, r3; nopv
; CHECK-NEXT: nopb ; vlda wl11, [p4, #448]; nops ; nopx ; vshuffle x3, x4, x6, r9; nopv
; CHECK-NEXT: nopb ; nopa ; nops ; nopx ; vshuffle x10, x4, x6, r25; vmac.f bml4, bml4, x8, x7, r29
; CHECK-NEXT: nopa ; vshuffle x1, x3, x5, r13
; CHECK-NEXT: vshuffle x3, x3, x5, r24; vmac.f bmh1, bmh1, x8, x9, r29
; CHECK-NEXT: mov r3, p0; vmac.f bmh0, bmh0, x1, x9, r29
; CHECK-NEXT: and r3, r3, r0; mov p4, p7; vmac.f bmh3, bmh3, x3, x9, r29
; CHECK-NEXT: add r3, r3, #34; vmac.f bmh2, bmh2, x10, x9, r29
; CHECK-NEXT: vmac.f bmh7, bmh7, x8, x5, r29
; CHECK-NEXT: vmac.f bmh5, bmh5, x1, x5, r29
; CHECK-NEXT: and r3, r3, r0; mov p4, p7; vmac.f bmh7, bmh7, x8, x5, r29
; CHECK-NEXT: add r3, r3, #34; vmac.f bmh5, bmh5, x1, x5, r29
; CHECK-NEXT: vmac.f bml2, bml2, x3, x5, r29
; CHECK-NEXT: vmac.f bml0, bml0, x10, x5, r29
; CHECK-NEXT: .p2align 4
; CHECK-NEXT: .LBB0_2: // %for.body
; CHECK-NEXT: // =>This Inner Loop Header: Depth=1
; CHECK-NEXT: vldb wh8, [p0, #32]; nopa ; nops ; nopx ; mov p7, p5; vmac.f bml2, bml2, x3, x5, r29
; CHECK-NEXT: nopa ; vldb wl8, [p0], m4; nopx ; vmac.f bml0, bml0, x10, x5, r29
; CHECK-NEXT: vldb wh8, [p0, #32]; nopa ; nops ; nopx ; mov p7, p5; vmac.f bmh3, bmh3, x3, x9, r29
; CHECK-NEXT: nopa ; vldb wl8, [p0], m4; nopx ; vmac.f bmh2, bmh2, x10, x9, r29
; CHECK-NEXT: vldb wh10, [p0, #32]; vmac.f bml3, bml3, x1, x7, r29
; CHECK-NEXT: vldb wl10, [p0], m4; vmac.f bml6, bml6, x3, x7, r29
; CHECK-NEXT: vldb wh1, [p0, #32]; vmac.f bml5, bml5, x10, x7, r29
Expand All @@ -63,23 +63,23 @@
; CHECK-NEXT: vlda wh7, [p4, #352]; vshift.align x0, x0, s0, x8, r3; vmac.f bmh8, bmh8, x10, x11, r29
; CHECK-NEXT: vlda wl7, [p4, #320]
; CHECK-NEXT: vlda wh9, [p4, #416]; vshift.align x2, x2, s0, x10, r3
; CHECK-NEXT: vlda wl9, [p4, #384]; vshuffle x5, x0, x2, r25
; CHECK-NEXT: vlda wh11, [p4, #480]; vshift.align x4, x4, s0, x1, r3
; CHECK-NEXT: vlda wl11, [p4, #448]; vshuffle x8, x0, x2, r9
; CHECK-NEXT: vldb wh5, [p5, #32]; vshift.align x6, x6, s0, x3, r3
; CHECK-NEXT: vlda wl5, [p5], #256; vshuffle x3, x4, x6, r9
; CHECK-NEXT: vlda wl9, [p4, #384]; vshuffle x8, x0, x2, r9
; CHECK-NEXT: vldb wh5, [p5, #32]; vshift.align x4, x4, s0, x1, r3
; CHECK-NEXT: vlda wl5, [p5], #256; vshuffle x5, x0, x2, r25
; CHECK-NEXT: vlda wh11, [p4, #480]; vshift.align x6, x6, s0, x3, r3
; CHECK-NEXT: vlda wl11, [p4, #448]; vshuffle x3, x4, x6, r9
; CHECK-NEXT: vshuffle x10, x4, x6, r25; vmac.f bml4, bml4, x8, x7, r29
; CHECK-NEXT: vshuffle x1, x3, x5, r13
; CHECK-NEXT: vshuffle x3, x3, x5, r24; vmac.f bmh1, bmh1, x8, x9, r29
; CHECK-NEXT: mov r3, p0; vmac.f bmh0, bmh0, x1, x9, r29
; CHECK-NEXT: and r3, r3, r0; mov p4, p7; vmac.f bmh3, bmh3, x3, x9, r29
; CHECK-NEXT: add r3, r3, #34; vmac.f bmh2, bmh2, x10, x9, r29
; CHECK-NEXT: vmac.f bmh7, bmh7, x8, x5, r29
; CHECK-NEXT: and r3, r3, r0; mov p4, p7; vmac.f bmh7, bmh7, x8, x5, r29
; CHECK-NEXT: add r3, r3, #34; vmac.f bmh5, bmh5, x1, x5, r29
; CHECK-NEXT: vmac.f bml2, bml2, x3, x5, r29
; CHECK-NEXT: .L_LEnd0:
; CHECK-NEXT: nopb ; nopa ; nops ; nopxm ; vmac.f bmh5, bmh5, x1, x5, r29
; CHECK-NEXT: nopb ; nopa ; nops ; nopxm ; vmac.f bml0, bml0, x10, x5, r29
; CHECK-NEXT: // %bb.3: // %for.cond.cleanup
; CHECK-NEXT: nopb ; nopa ; nops ; nopxm ; vmac.f bml2, bml2, x3, x5, r29
; CHECK-NEXT: vmac.f bml0, bml0, x10, x5, r29
; CHECK-NEXT: nopb ; nopa ; nops ; nopxm ; vmac.f bmh3, bmh3, x3, x9, r29
; CHECK-NEXT: vmac.f bmh2, bmh2, x10, x9, r29
; CHECK-NEXT: vmac.f bml3, bml3, x1, x7, r29
; CHECK-NEXT: vmac.f bml6, bml6, x3, x7, r29
; CHECK-NEXT: vmac.f bml5, bml5, x10, x7, r29
Expand Down

0 comments on commit c9a87bf

Please sign in to comment.