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

Carlos Alberto Enciso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 15 07:13:05 PDT 2018


CarlosAlbertoEnciso created this revision.
CarlosAlbertoEnciso added reviewers: aprantl, vsk, dblaikie, dstenb.
CarlosAlbertoEnciso added a project: debug-info.
Herald added subscribers: llvm-commits, JDevlieghere.

For the below test:

  int main() {
    volatile int foo = 0;
    int read1 = foo;
    int brains = foo;
  
    if (read1 > 3) {
      brains *= 2;
      brains += 1;
    }
  
    return brains;
  }

When in the debugger, on the line "if (read1 > 3)", and we step from the
'if' condition, onto the addition, then back to the 'if' again, which is
misleading, as described by:

PR38762 <https://bugs.llvm.org/show_bug.cgi?id=38762>

Notes:

- The revision D52887 <https://reviews.llvm.org/D52887> closed by commit rL344120 <https://reviews.llvm.org/rL344120> introduced a regression and now is abandoned.
- Reverted in https://reviews.llvm.org/rL344135 as it was causing buildbot failure.
- This patch includes a fix for the regression described by PR39243 <https://bugs.llvm.org/show_bug.cgi?id=39243> as well.


Repository:
  rL LLVM

https://reviews.llvm.org/D53287

Files:
  include/llvm/Transforms/Utils/Local.h
  lib/Transforms/Utils/Local.cpp
  lib/Transforms/Utils/SimplifyCFG.cpp
  test/CodeGen/X86/pr38762.ll
  test/CodeGen/X86/pr38763.ll
  test/CodeGen/X86/pr39243.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53287.169699.patch
Type: text/x-patch
Size: 17373 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181015/a4bb26e2/attachment.bin>


More information about the llvm-commits mailing list