[PATCH] D135967: [StructurizeCFG][DebugInfo] Maintain DILocations in the branches created by StructurizeCFG
Juan Manuel Martinez CaamaƱo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 26 05:03:44 PDT 2022
jmmartinez marked an inline comment as done.
jmmartinez added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/StructurizeCFG.cpp:555
+ for (BasicBlock &BB : *Func) {
+ if (DebugLoc DL = BB.getTerminator()->getDebugLoc())
+ TermDL[&BB] = DL;
----------------
arsenm wrote:
> I think the current guidance is DebugLocs should be handled by const reference
I changed to use a const-ref in here and in the loop in setTerminatorDebugLoc . Indeed, internally it uses a TrackingMDRef so it'd better to avoid constructing a new one. Thanks !
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135967/new/
https://reviews.llvm.org/D135967
More information about the llvm-commits
mailing list