rnk added inline comments.
================ Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:1428 + if (isa<DbgInfoIntrinsic>(BI)) { + BI = --(BI->eraseFromParent()); + continue; ---------------- Will this work if the dbg.value is the first instruction of a basic block? I'd expect eraseFromParent to return a new iterator pointing to FI->begin(), then operator-- to back up to "before begin", which would probably crash or assert. This would make a good test case and shouldn't be too hard. You can try inlining `foo` in this example: ``` void bar(); int foo(bool cond, int x) { if (cond) { x = 42; // should set up a dbg.value at BB start bar(); // block select formation } return x; } ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67723/new/ https://reviews.llvm.org/D67723 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits