[PATCH] D78398: [DebugInfo] Factor out SalvageDebugInfoForDbgValues() from InstCombine
Chris Jackson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 13 07:32:44 PDT 2020
chrisjackson added a comment.
In D78398#1992390 <https://reviews.llvm.org/D78398#1992390>, @Orlando wrote:
> Assuming D78369 <https://reviews.llvm.org/D78369> lands as it is right now; IMO it might make sense to push the OrUndef behaviour of `salvageDebugInfo` into `salvageDebugInfoForDbgValues`, and have `salvageDebugInfo` simply call `salvageDebugInfoForDbgValues(I, findDbgUsers(I))`.
>
> This is pretty similar to what happens pre-D78369, except that `salvageDebugInfo` and `salvageDebugInfoForDbgValues` both MarkUndef if they fail to salvage. I'm fairly confident you could then simplify the instcombine sink salvaging with this setup.
>
> What do you both think?
This seems reasonable. I'll complete the requested changes to this diff then I'll submit one with @Orlando's suggested approach and we can see which is looks better.
In D78398#1992390 <https://reviews.llvm.org/D78398#1992390>, @Orlando wrote:
> Assuming D78369 <https://reviews.llvm.org/D78369> lands as it is right now; IMO it might make sense to push the OrUndef behaviour of `salvageDebugInfo` into `salvageDebugInfoForDbgValues`, and have `salvageDebugInfo` simply call `salvageDebugInfoForDbgValues(I, findDbgUsers(I))`.
>
> This is pretty similar to what happens pre-D78369, except that `salvageDebugInfo` and `salvageDebugInfoForDbgValues` both MarkUndef if they fail to salvage. I'm fairly confident you could then simplify the instcombine sink salvaging with this setup.
>
> What do you both think?
I have uploaded a diff implementing this suggested alternative, D79863 <https://reviews.llvm.org/D79863>.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78398/new/
https://reviews.llvm.org/D78398
More information about the llvm-commits
mailing list