[PATCH] D72801: [CodeExtractor] Transfer debug info to extracted function

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 13:19:28 PST 2020


aprantl added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/CodeExtractor.cpp:1388
 
+// Erase debug info intrinsics which refer to values in \p F but aren't in \p F.
+static void eraseDebugIntrinsicsWithNonLocalRefs(Function &F) {
----------------
///


================
Comment at: llvm/lib/Transforms/Utils/CodeExtractor.cpp:1440
+  //     point to a variable in the wrong scope.
+  SmallDenseMap<DINode *, DINode *> RemappedMetadata;
+  SmallVector<Instruction *, 4> DebugIntrinsicsToDelete;
----------------
Out of curiosity: anything that can be shared with CloneFunction here?


================
Comment at: llvm/lib/Transforms/Utils/CodeExtractor.cpp:1489
+  DIB.finalizeSubprogram(NewSP);
+  DIB.finalize();
+
----------------
I'm not sure you actually need to call this when you don't create any new types with cycles.


================
Comment at: llvm/test/Transforms/HotColdSplit/split-out-dbg-label.ll:4
+target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-apple-macosx10.14.0"
+
----------------
Can you add a comment what is being tested here?


================
Comment at: llvm/test/Transforms/HotColdSplit/transfer-debug-info.ll:4
+target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-apple-macosx10.14.0"
+
----------------
and here


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72801/new/

https://reviews.llvm.org/D72801





More information about the llvm-commits mailing list