Files
llvm-project/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp
LU-JOHN ba0e4af50f [CodeGen][NFC] Do not iterate in DCE unless needed (#193355)
Almost all dead code is found in the first iteration.

In LLVM lit tests, 461931 instructions were deleted in the first
iteration and 2 in the second.

In a 3-stage build of llvm, 1305507 instructions were deleted in the
first iteration and 0 in the second.

Added code to detect when another DCE iteration is needed. Number of DCE
iterations will almost always be reduced from 2 to 1.

---------

Signed-off-by: John Lu <John.Lu@amd.com>
2026-04-23 08:10:05 -05:00

4.2 KiB