Files
llvm-project/llvm/lib/CodeGen/ResetMachineFunctionPass.cpp
Ryan Cowan dfe05b84b3 [GlobalISel] Provide a fast path for ResetMachineFunctionPass when the function is empty (#177341)
As part of https://github.com/llvm/llvm-project/pull/174746 I
encountered a compile time regression due to ResetMachineFunction
performing full resets on empty functions. In normal operation, this
behaviour is not likely to impact compile time, as the pass is only
inserted when using GlobalISel.

https://github.com/llvm/llvm-project/pull/174746 includes GlobalISel
passes in the SDAG pipeline (only on AArch64) and skips them if a given
function is not optnone surfacing this. By checking if the
MachineFunction is empty we can perform a more lightweight reset that
just sets the required flags, reducing the impact of this change.
2026-01-29 16:29:49 +00:00

4.0 KiB