[all-commits] [llvm/llvm-project] 44736c: [CloneFunction][DebugInfo] Avoid cloning DILexical...

chbessonova via All-commits all-commits at lists.llvm.org
Mon Jul 18 04:15:57 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 44736c1d497f2c269f6ef86ef7bf0e47f4869a4d
      https://github.com/llvm/llvm-project/commit/44736c1d497f2c269f6ef86ef7bf0e47f4869a4d
  Author: Kristina Bessonova <kbessonova at accesssoftek.com>
  Date:   2022-07-18 (Mon, 18 Jul 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/CloneFunction.cpp
    M llvm/test/Transforms/Coroutines/coro-debug-frame-variable.ll
    M llvm/unittests/Transforms/Utils/CloningTest.cpp

  Log Message:
  -----------
  [CloneFunction][DebugInfo] Avoid cloning DILexicalBlocks of inlined subprograms

If DISubpogram was not cloned (e.g. we are cloning a function that has other
functions inlined into it, and subprograms of the inlined functions are
not supposed to be cloned), it doesn't make sense to clone its DILexicalBlocks
as well. Otherwise we'll get duplicated DILexicalBlocks that may confuse
debug info emission in AsmPrinter.

I believe it also makes no sense cloning any DILocalVariables or maybe
other local entities, if their parent subprogram was not cloned, cause
they will be dangling and will not participate in futher emission.

Reviewed By: aprantl

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




More information about the All-commits mailing list