[all-commits] [llvm/llvm-project] e932d2: [Assignment Tracking] Fix fragments for assignment...

Orlando Cazalet-Hyams via All-commits all-commits at lists.llvm.org
Sun Apr 9 02:02:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e932d2e62610f57b551016d24932d856956d4818
      https://github.com/llvm/llvm-project/commit/e932d2e62610f57b551016d24932d856956d4818
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2023-04-09 (Sun, 09 Apr 2023)

  Changed paths:
    M llvm/lib/IR/DebugInfo.cpp
    A llvm/test/DebugInfo/Generic/assignment-tracking/inline/shared-alloca.ll

  Log Message:
  -----------
  [Assignment Tracking] Fix fragments for assignments to variables smaller than the alloca

Prior to this patch the trackAssignments function would attribute all stores to
an alloca to all variables linked to the alloca. This is wrong in the case
where the alloca contains variables which are smaller than the alloca, and
caused erroneous fragment information to be generated.

Now stores outside the variable bounds are discarded, and we check whether a
fragment is needed based on whether the store covers the entire variable as
opposed to whether it covers the entire alloca (except for variables of unknown
size).

Note that trackAssignments doesn't yet understand whole variables sitting at
anything other than offset 0 in an alloca - those variables are still tracked
using dbg.declares.

Fixes https://lab.llvm.org/buildbot/#/builders/70/builds/36007

Reviewed By: jmorse

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


  Commit: f11e1475c97c1ba6b418838f3592de930677c3d0
      https://github.com/llvm/llvm-project/commit/f11e1475c97c1ba6b418838f3592de930677c3d0
  Author: OCHyams <orlando.hyams at sony.com>
  Date:   2023-04-09 (Sun, 09 Apr 2023)

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

  Log Message:
  -----------
  Reapply (2) "[Assignment Tracking] Enable by default"

Re-land D146987.

This reverts commit 64fba207a683a355d9059cd57adb8a139c2f5dda
which reverts D146987.


Compare: https://github.com/llvm/llvm-project/compare/9f5951f11a0e...f11e1475c97c


More information about the All-commits mailing list