[PATCH] D37877: Update getMergedLocation to check the instruction type and merge properly.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 12:48:07 PDT 2017


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

Looks good, thanks!

Adrian - dunno what you think about the API changes here. Open to iterating (probably just post-commit) if you reckon this doesn't add enough, or have other ideas.



================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:1543
+      // loop below.
+      DILocation::applyMergedLocation(I0, I0->getDebugLoc(), I->getDebugLoc());
       combineMetadataForCSE(I0, I);
----------------
This probably needs a similar assert/comment that I0 isn't a CallInst?


https://reviews.llvm.org/D37877





More information about the llvm-commits mailing list