summaryrefslogtreecommitdiff
path: root/test/CodeGen/MIR
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-04 17:18:51 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-04 17:18:51 +0000
commitca0df55065b11f2310f55c731b2f990d09ae1c32 (patch)
treefff52bf80df56346069e50ec52b17a4e36907e87 /test/CodeGen/MIR
parent93356784e0e357e3f1f74d565480cc9c25ea4bc9 (diff)
[CodeGen] Unify MBB reference format in both MIR and debug output
As part of the unification of the debug format and the MIR format, print MBB references as '%bb.5'. The MIR printer prints the IR name of a MBB only for block definitions. * find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)->getNumber\(\)/" << printMBBReference(*\1)/g' * find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)\.getNumber\(\)/" << printMBBReference(\1)/g' * find . \( -name "*.txt" -o -name "*.s" -o -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#([0-9]+)/%bb.\1/g' * grep -nr 'BB#' and fix Differential Revision: https://reviews.llvm.org/D40422 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319665 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/MIR')
-rw-r--r--test/CodeGen/MIR/X86/frame-info-save-restore-points.mir18
-rw-r--r--test/CodeGen/MIR/X86/implicit-register-flag.mir6
-rw-r--r--test/CodeGen/MIR/X86/jump-table-info.mir18
-rw-r--r--test/CodeGen/MIR/X86/machine-basic-block-operands.mir6
-rw-r--r--test/CodeGen/MIR/X86/newline-handling.mir16
-rw-r--r--test/CodeGen/MIR/X86/successor-basic-blocks-weights.mir6
6 files changed, 35 insertions, 35 deletions
diff --git a/test/CodeGen/MIR/X86/frame-info-save-restore-points.mir b/test/CodeGen/MIR/X86/frame-info-save-restore-points.mir
index d9b117bd9c2..f5d63287aff 100644
--- a/test/CodeGen/MIR/X86/frame-info-save-restore-points.mir
+++ b/test/CodeGen/MIR/X86/frame-info-save-restore-points.mir
@@ -30,33 +30,33 @@ liveins:
- { reg: '%edi' }
- { reg: '%esi' }
# CHECK: frameInfo:
-# CHECK: savePoint: '%bb.2.true'
-# CHECK-NEXT: restorePoint: '%bb.2.true'
+# CHECK: savePoint: '%bb.2'
+# CHECK-NEXT: restorePoint: '%bb.2'
# CHECK: stack
frameInfo:
maxAlignment: 4
hasCalls: true
- savePoint: '%bb.2.true'
- restorePoint: '%bb.2.true'
+ savePoint: '%bb.2'
+ restorePoint: '%bb.2'
stack:
- { id: 0, name: tmp, offset: 0, size: 4, alignment: 4 }
body: |
bb.0:
- successors: %bb.2.true, %bb.1
+ successors: %bb.2, %bb.1
liveins: %edi, %esi
%eax = COPY %edi
CMP32rr %eax, killed %esi, implicit-def %eflags
- JL_1 %bb.2.true, implicit killed %eflags
+ JL_1 %bb.2, implicit killed %eflags
bb.1:
- successors: %bb.3.false
+ successors: %bb.3
liveins: %eax
- JMP_1 %bb.3.false
+ JMP_1 %bb.3
bb.2.true:
- successors: %bb.3.false
+ successors: %bb.3
liveins: %eax
MOV32mr %stack.0.tmp, 1, _, 0, _, killed %eax
diff --git a/test/CodeGen/MIR/X86/implicit-register-flag.mir b/test/CodeGen/MIR/X86/implicit-register-flag.mir
index 70b1cc50094..dddbfc90cf6 100644
--- a/test/CodeGen/MIR/X86/implicit-register-flag.mir
+++ b/test/CodeGen/MIR/X86/implicit-register-flag.mir
@@ -31,11 +31,11 @@
name: foo
body: |
bb.0.entry:
- successors: %bb.1.less, %bb.2.exit
+ successors: %bb.1, %bb.2
; CHECK: CMP32ri8 %edi, 10, implicit-def %eflags
- ; CHECK-NEXT: JG_1 %bb.2.exit, implicit %eflags
+ ; CHECK-NEXT: JG_1 %bb.2, implicit %eflags
CMP32ri8 %edi, 10, implicit-def %eflags
- JG_1 %bb.2.exit, implicit %eflags
+ JG_1 %bb.2, implicit %eflags
bb.1.less:
; CHECK: %eax = MOV32r0 implicit-def %eflags
diff --git a/test/CodeGen/MIR/X86/jump-table-info.mir b/test/CodeGen/MIR/X86/jump-table-info.mir
index 52d562c8212..71dd46b8218 100644
--- a/test/CodeGen/MIR/X86/jump-table-info.mir
+++ b/test/CodeGen/MIR/X86/jump-table-info.mir
@@ -61,23 +61,23 @@ name: test_jumptable
# CHECK-NEXT: kind: label-difference32
# CHECK-NEXT: entries:
# CHECK-NEXT: - id: 0
-# CHECK-NEXT: blocks: [ '%bb.3.lbl1', '%bb.4.lbl2', '%bb.5.lbl3', '%bb.6.lbl4' ]
+# CHECK-NEXT: blocks: [ '%bb.3', '%bb.4', '%bb.5', '%bb.6' ]
# CHECK-NEXT: body:
jumpTable:
kind: label-difference32
entries:
- id: 0
- blocks: [ '%bb.3.lbl1', '%bb.4.lbl2', '%bb.5.lbl3', '%bb.6.lbl4' ]
+ blocks: [ '%bb.3', '%bb.4', '%bb.5', '%bb.6' ]
body: |
bb.0.entry:
- successors: %bb.2.def, %bb.1.entry
+ successors: %bb.2, %bb.1
%eax = MOV32rr %edi, implicit-def %rax
CMP32ri8 %edi, 3, implicit-def %eflags
- JA_1 %bb.2.def, implicit %eflags
+ JA_1 %bb.2, implicit %eflags
bb.1.entry:
- successors: %bb.3.lbl1, %bb.4.lbl2, %bb.5.lbl3, %bb.6.lbl4
+ successors: %bb.3, %bb.4, %bb.5, %bb.6
; CHECK: %rcx = LEA64r %rip, 1, %noreg, %jump-table.0, %noreg
%rcx = LEA64r %rip, 1, _, %jump-table.0, _
%rax = MOVSX64rm32 %rcx, 4, %rax, 0, _
@@ -110,17 +110,17 @@ jumpTable:
kind: label-difference32
entries:
- id: 1
- blocks: [ '%bb.3.lbl1', '%bb.4.lbl2', '%bb.5.lbl3', '%bb.6.lbl4' ]
+ blocks: [ '%bb.3', '%bb.4', '%bb.5', '%bb.6' ]
body: |
bb.0.entry:
- successors: %bb.2.def, %bb.1.entry
+ successors: %bb.2, %bb.1
%eax = MOV32rr %edi, implicit-def %rax
CMP32ri8 %edi, 3, implicit-def %eflags
- JA_1 %bb.2.def, implicit %eflags
+ JA_1 %bb.2, implicit %eflags
bb.1.entry:
- successors: %bb.3.lbl1, %bb.4.lbl2, %bb.5.lbl3, %bb.6.lbl4
+ successors: %bb.3, %bb.4, %bb.5, %bb.6
; Verify that the printer will use an id of 0 for this jump table:
; CHECK: %rcx = LEA64r %rip, 1, %noreg, %jump-table.0, %noreg
%rcx = LEA64r %rip, 1, _, %jump-table.1, _
diff --git a/test/CodeGen/MIR/X86/machine-basic-block-operands.mir b/test/CodeGen/MIR/X86/machine-basic-block-operands.mir
index f5915738679..a7866f239be 100644
--- a/test/CodeGen/MIR/X86/machine-basic-block-operands.mir
+++ b/test/CodeGen/MIR/X86/machine-basic-block-operands.mir
@@ -36,13 +36,13 @@ name: foo
body: |
; CHECK: bb.0.entry
bb.0.entry:
- successors: %bb.1.less, %bb.2.exit
+ successors: %bb.1, %bb.2
%eax = MOV32rm %rdi, 1, _, 0, _
; CHECK: CMP32ri8 %eax, 10
- ; CHECK-NEXT: JG_1 %bb.2.exit
+ ; CHECK-NEXT: JG_1 %bb.2
CMP32ri8 %eax, 10, implicit-def %eflags
- JG_1 %bb.2.exit, implicit %eflags
+ JG_1 %bb.2, implicit %eflags
; CHECK: bb.1.less:
bb.1.less:
diff --git a/test/CodeGen/MIR/X86/newline-handling.mir b/test/CodeGen/MIR/X86/newline-handling.mir
index ce53e49eddb..1a93c1a6425 100644
--- a/test/CodeGen/MIR/X86/newline-handling.mir
+++ b/test/CodeGen/MIR/X86/newline-handling.mir
@@ -35,10 +35,10 @@ liveins:
# CHECK-LABEL: name: foo
# CHECK: body: |
# CHECK-NEXT: bb.0.entry:
-# CHECK-NEXT: successors: %bb.1.less(0x40000000), %bb.2.exit(0x40000000)
+# CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
# CHECK-NEXT: liveins: %edi
# CHECK: CMP32ri8 %edi, 10, implicit-def %eflags
-# CHECK-NEXT: JG_1 %bb.2.exit, implicit killed %eflags
+# CHECK-NEXT: JG_1 %bb.2, implicit killed %eflags
# CHECK: bb.1.less:
# CHECK-NEXT: %eax = MOV32r0 implicit-def dead %eflags
@@ -50,13 +50,13 @@ liveins:
# CHECK-NEXT: RETQ killed %eax
body: |
bb.0.entry:
- successors: %bb.1.less, %bb.2.exit
+ successors: %bb.1, %bb.2
liveins: %edi
CMP32ri8 %edi, 10, implicit-def %eflags
- JG_1 %bb.2.exit, implicit killed %eflags
+ JG_1 %bb.2, implicit killed %eflags
bb.1.less:
@@ -79,10 +79,10 @@ liveins:
# CHECK-LABEL: name: bar
# CHECK: body: |
# CHECK-NEXT: bb.0.entry:
-# CHECK-NEXT: successors: %bb.1.less(0x40000000), %bb.2.exit(0x40000000)
+# CHECK-NEXT: successors: %bb.1(0x40000000), %bb.2(0x40000000)
# CHECK-NEXT: liveins: %edi
# CHECK: CMP32ri8 %edi, 10, implicit-def %eflags
-# CHECK-NEXT: JG_1 %bb.2.exit, implicit killed %eflags
+# CHECK-NEXT: JG_1 %bb.2, implicit killed %eflags
# CHECK: bb.1.less:
# CHECK-NEXT: %eax = MOV32r0 implicit-def dead %eflags
@@ -95,10 +95,10 @@ liveins:
body: |
bb.0.entry:
- successors: %bb.1.less, %bb.2.exit
+ successors: %bb.1, %bb.2
liveins: %edi
CMP32ri8 %edi, 10, implicit-def %eflags
- JG_1 %bb.2.exit, implicit killed %eflags
+ JG_1 %bb.2, implicit killed %eflags
bb.1.less: %eax = MOV32r0 implicit-def dead %eflags
RETQ killed %eax
diff --git a/test/CodeGen/MIR/X86/successor-basic-blocks-weights.mir b/test/CodeGen/MIR/X86/successor-basic-blocks-weights.mir
index 512ba4e41aa..5a22557f324 100644
--- a/test/CodeGen/MIR/X86/successor-basic-blocks-weights.mir
+++ b/test/CodeGen/MIR/X86/successor-basic-blocks-weights.mir
@@ -21,14 +21,14 @@
name: foo
body: |
; CHECK-LABEL: bb.0.entry:
- ; CHECK: successors: %bb.1.less(0x2a3d70a4), %bb.2.exit(0x55c28f5c)
+ ; CHECK: successors: %bb.1(0x2a3d70a4), %bb.2(0x55c28f5c)
; CHECK-LABEL: bb.1.less:
bb.0.entry:
- successors: %bb.1.less (33), %bb.2.exit(67)
+ successors: %bb.1 (33), %bb.2(67)
liveins: %edi
CMP32ri8 %edi, 10, implicit-def %eflags
- JG_1 %bb.2.exit, implicit killed %eflags
+ JG_1 %bb.2, implicit killed %eflags
bb.1.less:
%eax = MOV32r0 implicit-def dead %eflags