[PATCH] D26256: [InstCombine] Don't set debug location when folding through a phi node

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 9 10:43:57 PST 2016


On Wed, Nov 9, 2016 at 10:32 AM Adrian Prantl <aprantl at apple.com> wrote:

> aprantl added a comment.
>
> I would still prefer adding an "mergeDebugLoc" API, even if it only
> returns an empty DebugLoc, so we:
>
> - make it explicit that the debug location is being intentionally dropped
> and that this code has been audited for correctly updating debug locations
> (otherwise the code looks no different from a pass that is just not
> handling debug info at all)
> - can improve on it later by, e.g., keeping identical DebugLocs
>

Sort of agree, though I'm not sure that a mergeDebugLoc that does nothing
would be less confusing than the code that just omits it... (might give
readers the mistaken impression that something's actually happening here,
when it isn't)... so I'm sort of on the fence.

- Dave


>
>
> https://reviews.llvm.org/D26256
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161109/f8a2559b/attachment.html>


More information about the llvm-commits mailing list