[all-commits] [llvm/llvm-project] df69c6: [DebugInfo] Handle multiple variable location oper...

Stephen Tozer via All-commits all-commits at lists.llvm.org
Tue Mar 9 08:45:53 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: df69c69427dea7f5b3b3a4d4564bc77b0926ec88
      https://github.com/llvm/llvm-project/commit/df69c69427dea7f5b3b3a4d4564bc77b0926ec88
  Author: gbtozers <stephen.tozer at sony.com>
  Date:   2021-03-09 (Tue, 09 Mar 2021)

  Changed paths:
    M llvm/include/llvm/IR/IntrinsicInst.h
    M llvm/include/llvm/Transforms/Utils/Local.h
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/IR/IntrinsicInst.cpp
    M llvm/lib/IR/User.cpp
    M llvm/lib/Target/AArch64/AArch64StackTagging.cpp
    M llvm/lib/Transforms/Coroutines/CoroFrame.cpp
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
    M llvm/lib/Transforms/Scalar/ADCE.cpp
    M llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
    M llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp
    M llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
    M llvm/lib/Transforms/Utils/CodeExtractor.cpp
    M llvm/lib/Transforms/Utils/Debugify.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    M llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
    M llvm/unittests/IR/DebugInfoTest.cpp

  Log Message:
  -----------
  [DebugInfo] Handle multiple variable location operands in IR

This patch updates the various IR passes to correctly handle dbg.values with a
DIArgList location. This patch does not actually allow DIArgLists to be produced
by salvageDebugInfo, and it does not affect any pass after codegen-prepare.
Other than that, it should cover every IR pass.

Most of the changes simply extend code that operated on a single debug value to
operate on the list of debug values in the style of any_of, all_of, for_each,
etc. Instances of setOperand(0, ...) have been replaced with with
replaceVariableLocationOp, which takes the value that is being replaced as an
additional argument. In places where this value isn't readily available, we have
to track the old value through to the point where it gets replaced.

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




More information about the All-commits mailing list