[llvm][docs] Update old metadata syntax in examples
This patch updates examples in the documentation to match the existing convention. Calls to intrinsics that have metadata arguments were not included. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D142651
This commit is contained in:
@@ -37,7 +37,7 @@ For example, consider this IR:
|
||||
br i1 %cond, label %B, label %C, !prof !0
|
||||
; ...
|
||||
}
|
||||
!0 = metadata !{metadata !"branch_weights", i32 7, i32 8}
|
||||
!0 = !{!"branch_weights", i32 7, i32 8}
|
||||
|
||||
and this simple graph representation::
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ operands for the true and the false branch.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
!0 = metadata !{
|
||||
metadata !"branch_weights",
|
||||
!0 = !{
|
||||
!"branch_weights",
|
||||
i32 <TRUE_BRANCH_WEIGHT>,
|
||||
i32 <FALSE_BRANCH_WEIGHT>
|
||||
}
|
||||
@@ -45,8 +45,8 @@ is always case #0).
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
!0 = metadata !{
|
||||
metadata !"branch_weights",
|
||||
!0 = !{
|
||||
!"branch_weights",
|
||||
i32 <DEFAULT_BRANCH_WEIGHT>
|
||||
[ , i32 <CASE_BRANCH_WEIGHT> ... ]
|
||||
}
|
||||
@@ -58,8 +58,8 @@ Branch weights are assigned to every destination.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
!0 = metadata !{
|
||||
metadata !"branch_weights",
|
||||
!0 = !{
|
||||
!"branch_weights",
|
||||
i32 <LABEL_BRANCH_WEIGHT>
|
||||
[ , i32 <LABEL_BRANCH_WEIGHT> ... ]
|
||||
}
|
||||
@@ -73,8 +73,8 @@ block and entry counts which may not be accurate with sampling.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
!0 = metadata !{
|
||||
metadata !"branch_weights",
|
||||
!0 = !{
|
||||
!"branch_weights",
|
||||
i32 <CALL_BRANCH_WEIGHT>
|
||||
}
|
||||
|
||||
@@ -93,8 +93,8 @@ is used.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
!0 = metadata !{
|
||||
metadata !"branch_weights",
|
||||
!0 = !{
|
||||
!"branch_weights",
|
||||
i32 <INVOKE_NORMAL_WEIGHT>
|
||||
[ , i32 <INVOKE_UNWIND_WEIGHT> ]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user