[all-commits] [llvm/llvm-project] 624e52: [DebugInfo] Handle trailing empty blocks when seek...
Jeremy Morse via All-commits
all-commits at lists.llvm.org
Tue Nov 26 06:24:47 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 624e52b1e310c349e21cc0b4f67452b0fa9d1f96
https://github.com/llvm/llvm-project/commit/624e52b1e310c349e21cc0b4f67452b0fa9d1f96
Author: Jeremy Morse <jeremy.morse at sony.com>
Date: 2024-11-26 (Tue, 26 Nov 2024)
Changed paths:
M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
M llvm/test/DebugInfo/MIR/X86/dbg-prologue-backup-loc2.mir
Log Message:
-----------
[DebugInfo] Handle trailing empty blocks when seeking prologue_end spot (#117320)
The optimiser will produce empty blocks that are unconditionally
executed according to the CFG -- while it may not be meaningful code,
and won't get a prologue_end position, we need to not crash on this
input.
The fault comes from assuming that there's always a next block with some
instructions in it, that will eventually produce some meaningful control
flow to stop at -- in the given reproducer in issue #117206 this isn't
true, because the function terminates with `unreachable`. Thus, I've
refactored the "get next instruction logic" into a helper that'll step
through all blocks and terminate if there aren't any more.
Reproducer from aeubanks
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list