[PATCH] D25742: Remove debug location from common tail when tail-merging

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 18 11:41:57 PDT 2016

aprantl added a comment.

This approach seems generally fine, but I have one question:

If the code were on a single line, and both locations share a common ancestor scope, it seems make sense to create a new location using the common ancestor scope and line and only remove the column information.

How about adding an API to DebugLoc to merge two DebugLocs to handle situations like this? I could imagine that this happens in multiple places in the optimizer.


More information about the llvm-commits mailing list