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/AVR | |
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/AVR')
-rw-r--r-- | llvm/test/CodeGen/AVR/atomics/fence.ll | 2 | ||||
-rw-r--r-- | llvm/test/CodeGen/AVR/select-must-add-unconditional-jump.ll | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/llvm/test/CodeGen/AVR/atomics/fence.ll b/llvm/test/CodeGen/AVR/atomics/fence.ll index 6ea49bc7e3f..b4cd215f3a2 100644 --- a/llvm/test/CodeGen/AVR/atomics/fence.ll +++ b/llvm/test/CodeGen/AVR/atomics/fence.ll @@ -4,7 +4,7 @@ ; AVR is always singlethreaded so fences do nothing. ; CHECK_LABEL: atomic_fence8 -; CHECK: ; BB#0: +; CHECK: ; %bb.0: ; CHECK-NEXT: ret define void @atomic_fence8() { fence acquire diff --git a/llvm/test/CodeGen/AVR/select-must-add-unconditional-jump.ll b/llvm/test/CodeGen/AVR/select-must-add-unconditional-jump.ll index 64faff70a33..5c247f6e8e6 100644 --- a/llvm/test/CodeGen/AVR/select-must-add-unconditional-jump.ll +++ b/llvm/test/CodeGen/AVR/select-must-add-unconditional-jump.ll @@ -9,18 +9,18 @@ ; ; This issue manifests in a CFG that looks something like this: ; -; BB#2: derived from LLVM BB %finish -; Predecessors according to CFG: BB#0 BB#1 -; %0<def> = PHI %3, <BB#0>, %5, <BB#1> +; %bb.2: derived from LLVM BB %finish +; Predecessors according to CFG: %bb.0 %bb.1 +; %0<def> = PHI %3, <%bb.0>, %5, <%bb.1> ; %7<def> = LDIRdK 2 ; %8<def> = LDIRdK 1 ; CPRdRr %2, %0, %SREG<imp-def> -; BREQk <BB#6>, %SREG<imp-use> -; Successors according to CFG: BB#5(?%) BB#6(?%) +; BREQk <%bb.6>, %SREG<imp-use> +; Successors according to CFG: %bb.5(?%) %bb.6(?%) ; -; The code assumes it the fallthrough block after this is BB#5, but -; it's actually BB#3! To be proper, there should be an unconditional -; jump tying this block to BB#5. +; The code assumes it the fallthrough block after this is %bb.5, but +; it's actually %bb.3! To be proper, there should be an unconditional +; jump tying this block to %bb.5. define i8 @select_must_add_unconditional_jump(i8 %arg0, i8 %arg1) unnamed_addr { entry-block: @@ -49,10 +49,10 @@ dead: ; basic block containing `select` needs to contain explicit jumps to ; both successors. -; CHECK: BB#2: derived from LLVM BB %finish -; CHECK: BREQk <[[BRANCHED:BB#[0-9]+]]> -; CHECK: RJMPk <[[DIRECT:BB#[0-9]+]]> +; CHECK: %bb.2: derived from LLVM BB %finish +; CHECK: BREQk <[[BRANCHED:%bb.[0-9]+]]> +; CHECK: RJMPk <[[DIRECT:%bb.[0-9]+]]> ; CHECK: Successors according to CFG ; CHECK-SAME-DAG: {{.*}}[[BRANCHED]] ; CHECK-SAME-DAG: {{.*}}[[DIRECT]] -; CHECK: BB#3: derived from LLVM BB +; CHECK: %bb.3: derived from LLVM BB |