[llvm] Refine the examples in the debug info document (PR #86272)
Shan Huang via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 22 08:08:29 PDT 2024
https://github.com/Apochens updated https://github.com/llvm/llvm-project/pull/86272
>From 7727a9d99398494cd6ab58983b3e67ac859e9256 Mon Sep 17 00:00:00 2001
From: Apochens <52285902006 at stu.ecnu.edu.cn>
Date: Fri, 22 Mar 2024 12:08:52 +0000
Subject: [PATCH 1/2] refine the examples of merging locations
---
llvm/docs/HowToUpdateDebugInfo.rst | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/llvm/docs/HowToUpdateDebugInfo.rst b/llvm/docs/HowToUpdateDebugInfo.rst
index c64b5d1d0d98b6..1e36c0c45c8490 100644
--- a/llvm/docs/HowToUpdateDebugInfo.rst
+++ b/llvm/docs/HowToUpdateDebugInfo.rst
@@ -91,8 +91,11 @@ misattributed to a block containing one of the instructions-to-be-merged.
Examples of transformations that should follow this rule include:
-* Merging identical loads/stores which occur on both sides of a CFG diamond
- (see the ``MergedLoadStoreMotion`` pass).
+* Hoisting identical instructions from successors of a conditional branch. For
+ example, merging identical loads/stores which occur on both sides of a CFG
+ diamond (see the ``MergedLoadStoreMotion`` pass). If there are more than one
+ group of identical instructions hoisted, apply merging instruction locations
+ for each single merged instruction.
* Merging identical loop-invariant stores (see the LICM utility
``llvm::promoteLoopAccessesToScalars``).
@@ -115,11 +118,6 @@ Examples of transformations for which this rule *does not* apply include:
single-stepping experience. The rule for
:ref:`dropping locations<WhenToDropLocation>` should apply here.
-* Hoisting identical instructions which appear in several successor blocks into
- a predecessor block (see ``BranchFolder::HoistCommonCodeInSuccs``). In this
- case there is no single merged instruction. The rule for
- :ref:`dropping locations<WhenToDropLocation>` applies.
-
.. _WhenToDropLocation:
When to drop an instruction location
>From 6d5ad3f8c83aa2d6e888c6a88ec6bdea1e42f42d Mon Sep 17 00:00:00 2001
From: Apochens <52285902006 at stu.ecnu.edu.cn>
Date: Fri, 22 Mar 2024 15:08:15 +0000
Subject: [PATCH 2/2] refine description
---
llvm/docs/HowToUpdateDebugInfo.rst | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/llvm/docs/HowToUpdateDebugInfo.rst b/llvm/docs/HowToUpdateDebugInfo.rst
index 1e36c0c45c8490..e410125ddaee0b 100644
--- a/llvm/docs/HowToUpdateDebugInfo.rst
+++ b/llvm/docs/HowToUpdateDebugInfo.rst
@@ -91,11 +91,12 @@ misattributed to a block containing one of the instructions-to-be-merged.
Examples of transformations that should follow this rule include:
-* Hoisting identical instructions from successors of a conditional branch. For
- example, merging identical loads/stores which occur on both sides of a CFG
- diamond (see the ``MergedLoadStoreMotion`` pass). If there are more than one
- group of identical instructions hoisted, apply merging instruction locations
- for each single merged instruction.
+* Hoisting identical instructions from successors of a conditional branch or
+ sinking those from different predecessors. For example, merging identical
+ loads/stores which occur on both sides of a CFG diamond (see the
+ ``MergedLoadStoreMotion`` pass). For each group of identical instructions
+ being hoisted/sunk, the merge of all their locations should be applied to
+ the merged instruction.
* Merging identical loop-invariant stores (see the LICM utility
``llvm::promoteLoopAccessesToScalars``).
More information about the llvm-commits
mailing list