HomePhabricator

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

Description

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

Summary:
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.

Reviewers: davide, aprantl, rriddle, dblaikie, danielcdh, wmi

Reviewed By: aprantl, rriddle, danielcdh

Subscribers: eraman, JDevlieghere, llvm-commits

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

Details

Committed
fhahnDec 8 2017, 1:49 PM
Reviewer
aprantl
Differential Revision
D40413: [CodeExtractor] Add debug locations for new call and branch instrs.
Parents
rL320198: Make findSection a static function. NFC.
Branches
Unknown
Tags
Unknown