[PATCH] D53130: [DebugInfo][LCSSA] Rewrite pre-existing debug values outside loop

Matt Davis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 12 09:08:27 PDT 2018


mattd added inline comments.


================
Comment at: lib/Transforms/Utils/LCSSA.cpp:117
 
+    SmallVector<DbgValueInst *, 4> DbgValues;
+    llvm::findDbgValues(DbgValues, I);
----------------
dstenb wrote:
> mattd wrote:
> > Can we move this container and accompanying findDbgValue call closer to where it's used, around line 208, or is it necessary that we get the debug value early before we create the new PHIs?
> I have moved it now! We should not drop nor add any metadata uses of `I` between this and the use, so it should be equivalent.
> 
> The only reason I put it here was to keep the collection of `I`'s uses near each other, but yes, it is probably better to move DbgValues closer to its use! 
Great,  thanks!


https://reviews.llvm.org/D53130





More information about the llvm-commits mailing list