[PATCH] D53390: [DebugInfo][Dexter] Unreachable line stepped onto after SimplifyCFG.

Carlos Alberto Enciso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 30 05:51:28 PDT 2018


CarlosAlbertoEnciso added inline comments.


================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:1393
+  // location (DILocation); instead use the value from the reference insertion
+  // point.
+  NT->setDebugLoc(InsertPt->getDebugLoc());
----------------
aprantl wrote:
> This comment explains *what* the code is doing but not *why*. Could you explain why this is being done in the comment? 
Very good point. I have changed the comment to include the reason for that change.


================
Comment at: test/CodeGen/X86/pr39187.ll:62
+  %beards.0 = phi i32 [ 8, %if.then ], [ 4, %if.else ], !dbg !25
+  call void @llvm.dbg.value(metadata i32 %beards.0, metadata !14, metadata !DIExpression()), !dbg !20
+  ret i32 %beards.0
----------------
aprantl wrote:
> Since this test is only about DILocations, stripping out the dbg.value would make the the metadata a lot shorter.
I have removed any unnecessary metadata. 


https://reviews.llvm.org/D53390





More information about the llvm-commits mailing list