[PATCH] D27290: When hoisting instructions out of loops their debug loc should be removed (MLICM pass).

Wolfgang Pieb via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 30 17:37:33 PST 2016


wolfgangp created this revision.
wolfgangp added reviewers: aprantl, andreadb, danielcdh, dblaikie, probinson.
wolfgangp added a subscriber: llvm-commits.

The Machine Loop Invariant Code Motion pass (MLICM) hoists loop invariant instructions out of loops, e.g. address and other constant generating instructions. Retaining their debug location can cause erratic stepping behavior during debugging as well as incorrect source attribution wrt AutoFDO.
This patch proposes to remove debug locations for these instructions.

This is the first of 3 patches with the theme of instruction hoisting. I'm keeping them separate b/c 3 different passes are involved.

This is a case of true code motion, so retaining the original debug location is not justified.


https://reviews.llvm.org/D27290

Files:
  lib/CodeGen/MachineLICM.cpp
  test/CodeGen/ARM/debug-info-branch-folding.ll
  test/DebugInfo/MIR/X86/mlicm-hoist.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27290.79844.patch
Type: text/x-patch
Size: 10959 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161201/136af36d/attachment.bin>


More information about the llvm-commits mailing list