[PATCH] D144677: [SelectionDAG] Transitively copy NodeExtraInfo on RAUW

Marco Elver via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 24 02:22:36 PST 2023


melver added a comment.

In D144677#4149483 <https://reviews.llvm.org/D144677#4149483>, @dvyukov wrote:

> The code looks sane to me. But I never looked at this part of the code before.
> Wonder if this also fixes debug info?

Debug info is handled differently. It's copied explicitly everywhere (incl. arch code), and attached to new nodes explicitly. While debug info and pcsections propagation is done similarly outside of SelectionDAG (BuildMI+MIMetadata for MachineInstrs will do it correctly for both), within SelectionDAG we have stashed pcsections (and some other things) in "extra info" to not increase complexity and cost since it's used infrequently. Therefore, the way extra info is copied is unique to SelectionDAG and different from debug info as well.

It might fix other users of NodeExtraInfo though, such as CallSiteInfo, HeapAllocSite, NoMerge - although it looks like the first 2 only apply to calls, and these don't seem to be replaced with more complex nodes (AFAIK?).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144677



More information about the llvm-commits mailing list