[all-commits] [llvm/llvm-project] 76f3ff: [DebugInfo][LoopStrengthReduction] SCEV-based salv...

chrisjbris via All-commits all-commits at lists.llvm.org
Tue Jul 27 05:01:04 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 76f3ffb2b285998f02639db8fd42fb0de8a540d0
      https://github.com/llvm/llvm-project/commit/76f3ffb2b285998f02639db8fd42fb0de8a540d0
  Author: Chris Jackson <chris.jackson at sony.com>
  Date:   2021-07-27 (Tue, 27 Jul 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
    M llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
    M llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
    M llvm/test/Transforms/LoopStrengthReduce/dbg-preserve-0.ll
    M llvm/test/Transforms/LoopStrengthReduce/dbg-preserve-2.ll
    A llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-salvage-0.ll
    A llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-salvage-1.ll
    A llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-salvage-2.ll
    A llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-salvage-3.ll
    A llvm/test/Transforms/LoopStrengthReduce/debuginfo-scev-salvage-4.ll

  Log Message:
  -----------
  [DebugInfo][LoopStrengthReduction] SCEV-based salvaging for LSR

This patch extends salvaging of debuginfo in the Loop Strength Reduction
(LSR) pass by translating Scalar Evaluations (SCEV) into DIExpressions.
The method is as follows:
- Cache dbg.value intrinsics that are salvageable.
- Obtain a loop Induction Variable (IV) from ScalarExpressionExpander or
  the loop header.
- Translate the IV SCEV into an expression that recovers the current
  loop iteration count. Combine this with the dbg.value's location
  op SCEV to create a DIExpression that salvages the value.

Review by: jmorse

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




More information about the All-commits mailing list