Adaptation for IRTools is relatively straightforward in the sense that IRTools operates on untyped IR which does not contains inlined statements.
However, IRTools contains an inlining pass but it did not account for linetable information previously. In this change, I have made the choice to use the source line for all inlined statements. This can be further improved in the future by supporting stacked debuginfos.
[!note]
The second commit (https://github.com/FluxML/IRTools.jl/commit/cc97588d963c84aa6f3d67ac1eb6923de2a43ed4) moves the definition of LineInfoNode inside IRTools to prevent future breaking changes. But this can create a breakage for people using IR(lines::Vector{LineInfoNode}) constructor so we may not want to include it yet or add conversions.
Core.Compiler.LineInfoNode
was removed in https://github.com/JuliaLang/julia/pull/52415 but kept inCore
for serializer compatibility reasons (see https://github.com/JuliaLang/julia/blob/e07c0f1ddbfc89ad1ac4dda7246d8ed5d0d57c19/base/boot.jl#L491).Adaptation for IRTools is relatively straightforward in the sense that IRTools operates on untyped IR which does not contains inlined statements.
However, IRTools contains an inlining pass but it did not account for linetable information previously. In this change, I have made the choice to use the source line for all inlined statements. This can be further improved in the future by supporting stacked debuginfos.
Closes #121