[llvm] Refine the examples in the debug info document (PR #86272)

Shan Huang via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 21 19:25:32 PDT 2024


================
@@ -91,8 +91,12 @@ 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 or
----------------
Apochens wrote:

> if every path (sw1, sw2, exit1) out of a block has the same location, then I think it's OK to merge and preserve, rather than drop.

So, could this be a mishandled update? (I have not found any case indicating that here needs a drop. Just as you said, they can be merged.)

> So I don't think this is the scenario I was describing above - where two out of three (sw1 and sw2, but not exit1) might share an expression, then it has to be dropped.

I understand whay you mean. However, I could't find such a case right now. Or maybe I can try to describe the scenario in natural language with a brief example (For example, adding a small code snippet below)?

https://github.com/llvm/llvm-project/pull/86272


More information about the llvm-commits mailing list