llvm-project
fe18ab98 - [DebugInfo] Don't apply is_stmt on MBB branches that preserve lines (#108251)

Commit
1 year ago
[DebugInfo] Don't apply is_stmt on MBB branches that preserve lines (#108251) This patch follows on from the changes made in #105524, by adding an additional heuristic that prevents us from applying the start-of-MBB is_stmt flag when we can see that, for all direct branches to the MBB, the last line stepped on before the branch is the same as the first line of the MBB. This is mainly to prevent certain pathological cases, such as macros that expand to multiple basic blocks that all have the same source location, from giving us repeated steps on the same line. This approach is not comprehensive, since it relies on analyzeBranch to read edges, but the default fallback of applying is_stmt may lead only to useless steps in some cases, rather than skipping useful steps altogether.
Author
Parents
Loading