[PATCH] D133296: [Assignment Tracking][13/*] Account for assignment tracking in SROA

Orlando Cazalet-Hyams via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 05:00:31 PDT 2022


Orlando updated this revision to Diff 460037.
Orlando marked 7 inline comments as done.
Orlando added a comment.

+ Addressed review comments.

> As far as I understand it, all the code above splitAlloca is about splitting some alloca that already has dbg.assigns, and creating the appropriate dbg.assigns with an updated fragment. Isn't the additions to splitAlloca doing exactly the same thing? My feeling is that this is something to do with splitting stores being distinct in some way from splitting based on uses?

The code added to `splitAlloca` only splits the dbg.assign intrinsics linked to the alloca. Each use of the alloca that is split also needs to update its linked dbg.assigns.

This was one of the first changes made in the prototype - there could well be a better way of approaching this. I will have a think about it. E.g. splitting all the dbg.assign intrinsics at once after SROA has run. I'll mark this as "changes planned" for now and have a little look.


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

https://reviews.llvm.org/D133296

Files:
  llvm/lib/Transforms/Scalar/SROA.cpp
  llvm/test/DebugInfo/Generic/assignment-tracking/sroa/after-inlining.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag-2.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/sroa/id.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memcpy.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/sroa/rewrite.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/sroa/store.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/sroa/user-memcpy.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-1.ll
  llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-2.ll
  out.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133296.460037.patch
Type: text/x-patch
Size: 154217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220914/e8c0973b/attachment-0001.bin>


More information about the llvm-commits mailing list