[PATCH] D40413: [CodeExtractor] Add debug locations for new call and branch instrs.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 1 08:59:06 PST 2017
aprantl added a comment.
This is probably okay. Is there an introduction into partial inlining somewhere? I'd like to better understand what the transformation is doing, so I can give more helpful review feedback.
================
Comment at: lib/Transforms/Utils/CodeExtractor.cpp:750
+ // Add debug location to new call, if the original function has debug info.
+ if (codeReplacer->getParent()->getSubprogram() != nullptr) {
+ // Try to find debug location in the first block of the outlined function.
----------------
we usually don't spell out the `!= nullptr`
================
Comment at: lib/Transforms/Utils/CodeExtractor.cpp:1040
+ // Try to find debug location in the first block of the outlined function
+ // and use that for the branch instruction jumping to it.
+ for (auto &I : *header)
----------------
Could you please copy the entire text of the description you added to this phabricator review into the comment here? It is non-obvious what we are doing here, and I prefer having the complete story in the comment.
https://reviews.llvm.org/D40413
More information about the llvm-commits
mailing list