[all-commits] [llvm/llvm-project] 086635: [Assignment Tracking][SROA] Fix fragment when slic...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Thu Apr 6 07:34:04 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 086635d6b9f74ec5f4b7cedb2aee94f07c3b8fde
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2023-04-06 (Thu, 06 Apr 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SROA.cpp
    A llvm/test/DebugInfo/Generic/assignment-tracking/sroa/var-sized-fragment.ll

  Log Message:
  [Assignment Tracking][SROA] Fix fragment when slice size equals variable size

Correctly handle the case of splitting an alloca which backs contiguous
distinct variables, where a slice's size equals the size of a backed variable.

We need to ensure that we don't generate fragments expressions with fragments
of the same size as the variable as this is a verifier error.

Prior to this patch a fragment expression would be created in this
situation. e.g. splitting an alloca i64 with two adjacent 32-bit variables into
two 32-bit allocas, the new dbg.assign expressions would contain
(DW_OP_LLVM_fragment, 0, 32) and (DW_OP_LLVM_fragment, 32, 32) even though
those fragments cover each variable entirely.

Reviewed By: jmorse

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

  Commit: 91a0740474e3c4fe0bde8ff5699115bf808ca23f
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2023-04-06 (Thu, 06 Apr 2023)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/test/CodeGen/assignment-tracking/flag.cpp

  Log Message:
  Reapply "[Assignment Tracking] Enable by default"

Re-land D146987.

This reverts commit 43825d19318695be48abe6f042369da00fbb808b (revert)
which reverts aa32490bfe0b957c4f5583e14304f5e34b2b9bce (original commit).

Compare: https://github.com/llvm/llvm-project/compare/0c049ea60a9f...91a0740474e3

More information about the All-commits mailing list