[PATCH] D43850: [CodeGen] Avoid handling DBG_VALUE instructions for stepBackwards

Matt Davis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 18:08:42 PST 2018


mattd created this revision.
mattd added reviewers: kparzysz, MatzeB.
mattd added a project: debug-info.

This patch prevents DBG_VALUE instructions from influencing
LivePhysRegs::stepBackwards. In at least one case, specifically branch
folding, the stepBackwards logic was having an influence on code generation.
The result was that certain code compiled with '-g -O2' would differ from that
compiled with '-O2' alone. It seems that the original logic, accounting for DBG_VALUE,
was influencing the placement of an IMPLICIT_DEF which had a later impact on
how blocks were processed in branch folding.


https://reviews.llvm.org/D43850

Files:
  lib/CodeGen/LivePhysRegs.cpp
  test/CodeGen/X86/dbg-changes-codegen-branch-folding2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43850.136210.patch
Type: text/x-patch
Size: 12497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180228/f18f36ba/attachment.bin>


More information about the llvm-commits mailing list