[all-commits] [llvm/llvm-project] e45de3: Move RemoveRedundantDbgInstrs outside of inner loo...

William Huang via All-commits all-commits at lists.llvm.org
Tue Jan 21 17:18:11 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e45de3dba7fad894bb5e10fd5018e5851061c672
      https://github.com/llvm/llvm-project/commit/e45de3dba7fad894bb5e10fd5018e5851061c672
  Author: William Huang <williamjhuang at google.com>
  Date:   2025-01-21 (Tue, 21 Jan 2025)

  Changed paths:
    M llvm/lib/Transforms/Scalar/JumpThreading.cpp
    M llvm/test/Transforms/JumpThreading/thread-debug-info.ll

  Log Message:
  -----------
  Move RemoveRedundantDbgInstrs outside of inner loop in JumpThreading (#123008)

This cleanup action only needs to be performed once when the entire
optimization is converged. Doing it in every iteration has a very high
time-complexity, as it queries every dbg value in a dense map

Compare before and after for one internal source file with many basic
blocks


![image](https://github.com/user-attachments/assets/1dac76a9-a974-4068-9aa1-4041f963fa8e)

![image](https://github.com/user-attachments/assets/73ea2ef1-d1f4-4064-8826-8c13fb539b8d)

>90% reduction in this extreme case.



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