[all-commits] [llvm/llvm-project] e5d958: [DebugInfo] Support DIArgList in DbgVariableIntrinsic

Stephen Tozer via All-commits all-commits at lists.llvm.org
Mon Mar 8 06:37:22 PST 2021


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

  Changed paths:
    M llvm/include/llvm/IR/IntrinsicInst.h
    M llvm/lib/Bitcode/Reader/MetadataLoader.cpp
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/IR/Constants.cpp
    M llvm/lib/IR/IntrinsicInst.cpp
    M llvm/lib/IR/Verifier.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/CodeExtractor.cpp
    M llvm/lib/Transforms/Utils/LCSSA.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    M llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
    M llvm/unittests/Transforms/Utils/LocalTest.cpp

  Log Message:
  -----------
  [DebugInfo] Support DIArgList in DbgVariableIntrinsic

This patch updates DbgVariableIntrinsics to support use of a DIArgList for the
location operand, resulting in a significant change to its interface. This patch
does not update all IR passes to support multiple location operands in a
dbg.value; the only change is to update the DbgVariableIntrinsic interface and
its uses. All code outside of the intrinsic classes assumes that an intrinsic
will always have exactly one location operand; they will still support
DIArgLists, but only if they contain exactly one Value.

Among other changes, the setOperand and setArgOperand functions in
DbgVariableIntrinsic have been made private. This is to prevent code from
setting the operands of these intrinsics directly, which could easily result in
incorrect/invalid operands being set. This does not prevent these functions from
being called on a debug intrinsic at all, as they can still be called on any
CallInst pointer; it is assumed that any code directly setting the operands on a
generic call instruction is doing so safely. The intention for making these
functions private is to prevent DIArgLists from being overwritten by code that's
naively trying to replace one of the Values it points to, and also to fail fast
if a DbgVariableIntrinsic is updated to use a DIArgList without a valid
corresponding DIExpression.




More information about the All-commits mailing list