[PATCH] D39494: [SimplifyCFG] Discard speculated dbg intrinsics

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 1 08:52:42 PDT 2017


bjope created this revision.

SpeculativelyExecuteBB can flatten the CFG by doing
speculative execution followed by a select instruction.
When the speculatively executed BB contained dbg intrinsics
the result could be a little bit weird, since those dbg
intrinsics were inserted before the select in the flattened
CFG. So when single stepping in the debugger, printing the
value of the variable referenced in the dbg intrinsic, it
could happen that it looked like the variable had values
that never actually were assigned to the variable.

This patch simply discards all dbg intrinsics that were found
in the speculatively executed BB.


https://reviews.llvm.org/D39494

Files:
  lib/Transforms/Utils/SimplifyCFG.cpp
  test/Transforms/SimplifyCFG/speculate-dbgvalue.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39494.121136.patch
Type: text/x-patch
Size: 5812 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171101/f4ec9acf/attachment.bin>


More information about the llvm-commits mailing list