[all-commits] [llvm/llvm-project] 5f8741: [LICM] Try to merge debug locations when sinking.

Davide Italiano via All-commits all-commits at lists.llvm.org
Wed Apr 15 12:29:56 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5f87415efc1e57587272944a5f9b6745e4474660
      https://github.com/llvm/llvm-project/commit/5f87415efc1e57587272944a5f9b6745e4474660
  Author: Davide Italiano <ditaliano at apple.com>
  Date:   2020-04-15 (Wed, 15 Apr 2020)

  Changed paths:
    M llvm/include/llvm/IR/DebugInfoMetadata.h
    M llvm/lib/IR/DebugInfoMetadata.cpp
    M llvm/lib/Transforms/Scalar/LICM.cpp
    A llvm/test/Transforms/LICM/sink-debuginfo-preserve.ll

  Log Message:
  -----------
  [LICM] Try to merge debug locations when sinking.

The current strategy LICM uses when sinking for debuginfo is
that of picking the debug location of one of the uses.
This causes stepping to be wrong sometimes, see, e.g. PR45523.

This patch introduces a generalization of getMergedLocation(),
that operates on a vector of locations instead of two, and try
to merge all them together, and use the new API in LICM.

<rdar://problem/61750950>




More information about the All-commits mailing list