summaryrefslogtreecommitdiff
path: root/docs
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 /docs
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 'docs')
-rw-r--r--docs/MIRLangRef.rst16
-rw-r--r--docs/NVPTXUsage.rst8
2 files changed, 18 insertions, 6 deletions
diff --git a/docs/MIRLangRef.rst b/docs/MIRLangRef.rst
index b4ca8f2347a..fff0d3ef0eb 100644
--- a/docs/MIRLangRef.rst
+++ b/docs/MIRLangRef.rst
@@ -246,13 +246,25 @@ blocks are referenced using the following syntax:
.. code-block:: text
- %bb.<id>[.<name>]
+ %bb.<id>
-Examples:
+Example:
.. code-block:: llvm
%bb.0
+
+The following syntax is also supported, but the former syntax is preferred for
+block references:
+
+.. code-block:: text
+
+ %bb.<id>[.<name>]
+
+Example:
+
+.. code-block:: llvm
+
%bb.1.then
Successors
diff --git a/docs/NVPTXUsage.rst b/docs/NVPTXUsage.rst
index 159fe078653..38222afbc63 100644
--- a/docs/NVPTXUsage.rst
+++ b/docs/NVPTXUsage.rst
@@ -499,7 +499,7 @@ The output we get from ``llc`` (as of LLVM 3.4):
.reg .s32 %r<2>;
.reg .s64 %rl<8>;
- // BB#0: // %entry
+ // %bb.0: // %entry
ld.param.u64 %rl1, [kernel_param_0];
mov.u32 %r1, %tid.x;
mul.wide.s32 %rl2, %r1, 4;
@@ -897,7 +897,7 @@ This gives us the following PTX (excerpt):
.reg .s32 %r<21>;
.reg .s64 %rl<8>;
- // BB#0: // %entry
+ // %bb.0: // %entry
ld.param.u64 %rl2, [kernel_param_0];
mov.u32 %r3, %tid.x;
ld.param.u64 %rl3, [kernel_param_1];
@@ -921,7 +921,7 @@ This gives us the following PTX (excerpt):
abs.f32 %f4, %f1;
setp.gtu.f32 %p4, %f4, 0f7F800000;
@%p4 bra BB0_4;
- // BB#3: // %__nv_isnanf.exit5.i
+ // %bb.3: // %__nv_isnanf.exit5.i
abs.f32 %f5, %f2;
setp.le.f32 %p5, %f5, 0f7F800000;
@%p5 bra BB0_5;
@@ -953,7 +953,7 @@ This gives us the following PTX (excerpt):
selp.f32 %f110, 0f7F800000, %f99, %p16;
setp.eq.f32 %p17, %f110, 0f7F800000;
@%p17 bra BB0_28;
- // BB#27:
+ // %bb.27:
fma.rn.f32 %f110, %f110, %f108, %f110;
BB0_28: // %__internal_accurate_powf.exit.i
setp.lt.f32 %p18, %f1, 0f00000000;