[PATCH] D71175: [DebugInfo][SelectionDAG] Change order while transferring SDDbgValue to another node

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 09:50:50 PST 2019


jmorse added a comment.

This risks changing the order in which variable assignments appear to occur, as there's no consideration of whether the new IROrder goes past a dbg.value intrinsic of the same variable.

This patch is potentially worth paying that price though: AFAIUI, SelectionDAG::transferDbgValues happens all the time, but multiple debug intrinsics for the same variable in the same block aren't necessarily common. Running a clang-3.4 build with this patch, I see a few thousand more locations, which is great, although there's no headline-grabbing impact.

Note that ScheduleDAGSDNodes does attempt to emit DBG_VALUEs immediately after node definitions (ProcessSourceNode and nearby), but it's fairly flakey. I also wrote up some details in [0] about the fact that nothing considers both

- where a value becomes available and
- where the value should become the variable location.

[0] https://bugs.llvm.org/show_bug.cgi?id=41583


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71175





More information about the llvm-commits mailing list