[all-commits] [llvm/llvm-project] 5ba802: [DebugInfo][LSR] Emit shorter expressions from sce...

chrisjbris via All-commits all-commits at lists.llvm.org
Sun Sep 19 13:42:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ba8020326a522c0dfa32f59a472fe20bee4908a
      https://github.com/llvm/llvm-project/commit/5ba8020326a522c0dfa32f59a472fe20bee4908a
  Author: Chris Jackson <chris.jackson at sony.com>
  Date:   2021-09-19 (Sun, 19 Sep 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
    M llvm/test/Transforms/LoopStrengthReduce/dbg-preserve-0.ll

  Log Message:
  -----------
  [DebugInfo][LSR] Emit shorter expressions from scev-based salvaging

The scev-based salvaging for LSR can sometimes produce unnecessarily
verbose expressions. This patch adds logic to detect when the value to
be recovered and the induction variable differ by only a constant
offset. Then, the expression to derive the current iteration count can
be omitted from the dbg.value in favour of the offset.

Reviewed by: aprantl

Differential Revision: https://reviews.llvm.org/D109044




More information about the All-commits mailing list