[PATCH] D148536: [Assignment Tracking] Fix fragment error for some DSE-shortened stores

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 09:40:31 PDT 2023


jmorse accepted this revision.
jmorse added a comment.
This revision is now accepted and ready to land.

Cool, that's a lot easier to understand now -- it's a verbose comment block, but vital for understanding the full context of what's going on for future readers.

Again, this is a gnarly corner but let's hope it's a final one. I've got a curiosity comment, one grammar comment added plus an outstanding one on shorten.ll, but I think this is good to go in.



================
Comment at: llvm/include/llvm/IR/DebugInfo.h:227-235
+/// Calculate the fragment of the variable in \p DAI covered
+/// from (Dest + SliceOffsetInBits) to
+///   to (Dest + SliceOffsetInBits + SliceSizeInBits)
+///
+/// Return false if it can't be calculated for any reason.
+/// Result is set to nullopt if the intersect equals the variable fragment (or
+/// variable size) in DAI.
----------------
Is there a meaningful distinction between a zero-sized fragment and returning false? (just curious)


================
Comment at: llvm/lib/IR/DebugInfo.cpp:1816
+  // # Example 1
+  // Obviously, not all stores are alloca-sized have zero offset. Imagine the
+  // lower 32 bits of this store are dead and are going to be DSEd:
----------------



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148536/new/

https://reviews.llvm.org/D148536



More information about the llvm-commits mailing list