[PATCH] D27804: [SimplifyCFG] Merge debug locations when hoisting an instruction from a then/else branch. NFC.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 09:25:08 PST 2016


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

Awesome, thanks!



================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:1279
+    // I1 or I2.
     if (!isa<CallInst>(I1) &&  I1->getDebugLoc() != I2->getDebugLoc())
+      I1->setDebugLoc(
----------------
Wouldn't it make more sense to make getMergedLocation() be an identity operation if the locations are identical?


https://reviews.llvm.org/D27804





More information about the llvm-commits mailing list