diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-04 17:18:51 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-04 17:18:51 +0000 |
commit | 25528d6de70e98683722e28655d8568d5f09b5c7 (patch) | |
tree | 061a9b3bfa623e3f38efd5fc02c6ec234acfcfde /llvm/test/CodeGen/X86/machine-cse.ll | |
parent | 2b4385846c86078e0012e7bfb2e8dc6476ae8dd0 (diff) | |
download | bcm5719-llvm-25528d6de70e98683722e28655d8568d5f09b5c7.tar.gz bcm5719-llvm-25528d6de70e98683722e28655d8568d5f09b5c7.zip |
[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
llvm-svn: 319665
Diffstat (limited to 'llvm/test/CodeGen/X86/machine-cse.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/machine-cse.ll | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/llvm/test/CodeGen/X86/machine-cse.ll b/llvm/test/CodeGen/X86/machine-cse.ll index b7441577c63..e5e9e6c1163 100644 --- a/llvm/test/CodeGen/X86/machine-cse.ll +++ b/llvm/test/CodeGen/X86/machine-cse.ll @@ -9,7 +9,7 @@ define fastcc i8* @t(i32 %base) nounwind { ; CHECK-LABEL: t: -; CHECK: # BB#0: # %entry +; CHECK: # %bb.0: # %entry ; CHECK-NEXT: pushq %rax ; CHECK-NEXT: movl %edi, %eax ; CHECK-NEXT: shlq $9, %rax @@ -17,7 +17,7 @@ define fastcc i8* @t(i32 %base) nounwind { ; CHECK-NEXT: xorl %eax, %eax ; CHECK-NEXT: testb %al, %al ; CHECK-NEXT: jne .LBB0_2 -; CHECK-NEXT: # BB#1: # %bb1 +; CHECK-NEXT: # %bb.1: # %bb1 ; CHECK-NEXT: callq bar ; CHECK-NEXT: .LBB0_2: # %bb2 ; CHECK-NEXT: callq foo @@ -49,17 +49,17 @@ declare void @printf(...) nounwind define void @commute(i32 %test_case, i32 %scale) nounwind ssp { ; CHECK-LABEL: commute: -; CHECK: # BB#0: # %entry +; CHECK: # %bb.0: # %entry ; CHECK-NEXT: # kill: %esi<def> %esi<kill> %rsi<def> ; CHECK-NEXT: # kill: %edi<def> %edi<kill> %rdi<def> ; CHECK-NEXT: leal -1(%rdi), %eax ; CHECK-NEXT: cmpl $2, %eax ; CHECK-NEXT: ja .LBB1_4 -; CHECK-NEXT: # BB#1: # %sw.bb +; CHECK-NEXT: # %bb.1: # %sw.bb ; CHECK-NEXT: xorl %eax, %eax ; CHECK-NEXT: testb %al, %al ; CHECK-NEXT: jne .LBB1_4 -; CHECK-NEXT: # BB#2: # %if.end34 +; CHECK-NEXT: # %bb.2: # %if.end34 ; CHECK-NEXT: pushq %rax ; CHECK-NEXT: imull %edi, %esi ; CHECK-NEXT: leal (%rsi,%rsi,2), %esi @@ -107,11 +107,11 @@ sw.bb307: ; rdar://10660865 define i32 @cross_mbb_phys_cse(i32 %a, i32 %b) nounwind ssp { ; CHECK-LABEL: cross_mbb_phys_cse: -; CHECK: # BB#0: # %entry +; CHECK: # %bb.0: # %entry ; CHECK-NEXT: movl $1, %eax ; CHECK-NEXT: cmpl %esi, %edi ; CHECK-NEXT: ja .LBB2_2 -; CHECK-NEXT: # BB#1: # %if.end +; CHECK-NEXT: # %bb.1: # %if.end ; CHECK-NEXT: sbbl %eax, %eax ; CHECK-NEXT: .LBB2_2: # %return ; CHECK-NEXT: retq @@ -132,17 +132,17 @@ return: ; rdar://11393714 define i8* @bsd_memchr(i8* %s, i32 %a, i32 %c, i64 %n) nounwind ssp { ; CHECK-LABEL: bsd_memchr: -; CHECK: # BB#0: # %entry +; CHECK: # %bb.0: # %entry ; CHECK-NEXT: testq %rcx, %rcx ; CHECK-NEXT: je .LBB3_4 -; CHECK-NEXT: # BB#1: # %preheader +; CHECK-NEXT: # %bb.1: # %preheader ; CHECK-NEXT: movzbl %dl, %eax ; CHECK-NEXT: .p2align 4, 0x90 ; CHECK-NEXT: .LBB3_2: # %do.body ; CHECK-NEXT: # =>This Inner Loop Header: Depth=1 ; CHECK-NEXT: cmpl %eax, %esi ; CHECK-NEXT: je .LBB3_5 -; CHECK-NEXT: # BB#3: # %do.cond +; CHECK-NEXT: # %bb.3: # %do.cond ; CHECK-NEXT: # in Loop: Header=BB3_2 Depth=1 ; CHECK-NEXT: incq %rdi ; CHECK-NEXT: decq %rcx @@ -184,13 +184,13 @@ declare i1 @t2_func() define i32 @t2() nounwind { ; CHECK-LABEL: t2: -; CHECK: # BB#0: +; CHECK: # %bb.0: ; CHECK-NEXT: pushq %rax ; CHECK-NEXT: movl $42, {{.*}}(%rip) ; CHECK-NEXT: callq t2_func ; CHECK-NEXT: testb $1, %al ; CHECK-NEXT: je .LBB4_2 -; CHECK-NEXT: # BB#1: # %a +; CHECK-NEXT: # %bb.1: # %a ; CHECK-NEXT: movl {{.*}}(%rip), %eax ; CHECK-NEXT: popq %rcx ; CHECK-NEXT: retq |