[PATCH] D150577: [CodeGen] Fix for MachineBasicBlock::rfindDebugLoc(instr_rend())
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 25 04:03:57 PDT 2023
bjope added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineBasicBlock.cpp:1489-1490
DebugLoc MachineBasicBlock::findPrevDebugLoc(instr_iterator MBBI) {
- if (MBBI == instr_begin()) return {};
+ if (MBBI == instr_begin())
+ return {};
// Skip debug instructions, we don't want a DebugLoc from them.
----------------
bjope wrote:
> dblaikie wrote:
> > This looks like unrelated reformatting? Could you remove changes like this from this patch?
> It's not unrelated to "Clean up code comments and code formatting related to the functions mentioned above.", but maybe you want all those things in a separate commit?
For info: I'll split this up in two commits when landing. One that adds test cases and cleans up code comments etc. And one that modifies MachineBasicBlock::rfindDebugLoc to avoid crashing on the rend iterator..
@dblaikie, I think that makes sense. Thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150577/new/
https://reviews.llvm.org/D150577
More information about the llvm-commits
mailing list