[PATCH] D79868: [DebugInfo] Correct debuginfo for post-ra hoist and sink in Machine LICM

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 09:44:28 PDT 2020


probinson added a comment.

In D79868#2034196 <https://reviews.llvm.org/D79868#2034196>, @aprantl wrote:

> Can you explain why the sunk instruction's location is considered incorrect? I would have naively assumed that for profiling particularly, you would want to retain the original location to ensure that it is counted.


I should think profiling is mostly concerned about control flow, and a sampling profiler would infer control flow from the source location of the instruction.  If you sink an instruction but retain the original source location, a hit would be tallied for the moved-from block not the moved-to block, but the moved-to block would be more appropriate.  I might be misunderstanding the profiler's needs though, this is not an area I am super familiar with.


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

https://reviews.llvm.org/D79868





More information about the llvm-commits mailing list