[PATCH] D133295: [Assignment Tracking][12/*] Account for assignment tracking in mem2reg

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 7 07:34:54 PDT 2022


jmorse added a comment.

Possibly I've missed something -- there's nothing here that's converting dbg.declares to dbg.assigns, so it's up to the frontend to produce appropriate dbg.assigns initially, yes?



================
Comment at: llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:105
 
+class AssignmentTrackingInfo {
+  /// DbgAssignIntrinsics linked to the alloca.
----------------
This will want a top-level docu-comment if there are members that are docucommented.


================
Comment at: llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:324
   SmallVector<AllocaInfo::DbgUserVec, 8> AllocaDbgUsers;
+  SmallVector<AssignmentTrackingInfo, 8> AllocaATInfo;
 
----------------
Docu-comment etc


================
Comment at: llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:692
       AllocaDbgUsers[AllocaNum] = Info.DbgUsers;
+    AllocaATInfo[AllocaNum] = Info.AssignmentTracking;
 
----------------
The original authors saw fit to guard the copying of Info.DbgUsers by `empty()`, best to continue the pattern by guarding the copying of Info.AssignmentTracking.


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

https://reviews.llvm.org/D133295



More information about the llvm-commits mailing list