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

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 12:56:38 PDT 2016


aprantl added a comment.

Shouldn't it only drop the location if the two locations are distinct (and perhaps add a discriminator)?

I mentioned this previously: I think it would be great to add an API that goes something like:
`DILocation mergeDebugLoc(DILocation A, DILocation B)`
that is invoked in cases like this and then decides what to do depending on the two incoming locations.

- adrian


https://reviews.llvm.org/D26256





More information about the llvm-commits mailing list