[PATCH] D40413: [CodeExtractor] Add debug locations for new call and branch instrs.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 24 02:54:10 PST 2017


fhahn created this revision.
Herald added subscribers: JDevlieghere, eraman.

If a partially inlined function has debug info, we have to add debug
locations to the call instruction calling the outlined function.
We use the debug location of the first instruction in the outlined
function, as the introduced call transfers control to this statement and
there is no other equivalent line in the source code.

We also use the same debug location for the branch instruction added
to jump from artificial entry block for the outlined function, which just
jumps to the first actual basic block of the outlined function.


https://reviews.llvm.org/D40413

Files:
  lib/Transforms/Utils/CodeExtractor.cpp
  test/Transforms/CodeExtractor/PartialInlineDebug.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40413.124145.patch
Type: text/x-patch
Size: 5113 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171124/91a8c940/attachment.bin>


More information about the llvm-commits mailing list