[Outliner] Add an option to only enable outlining of patterns above a certain threshold
authorNathan Lanza <nathanlanza@gmail.com>
Sat, 8 Apr 2023 06:10:27 +0000 (02:10 -0400)
committerNathan Lanza <nathanlanza@gmail.com>
Sat, 8 Apr 2023 06:12:40 +0000 (02:12 -0400)
commit87c0f6773970f41f0e464690862f05bc109ee8d0
treeb97cc06b5b29240981337970973c711df2338458
parent92910a51b9043550cec6c9e63a5b92a15d42c665
[Outliner] Add an option to only enable outlining of patterns above a certain threshold

Outlining isn't always a win when the saved instruction count is >= 1.
The overhead of representing a new function in the binary depends on
exception metadata and alignment. So parameterize this for local tuning.

Reviewed By: paquette

Differential Revision: https://reviews.llvm.org/D136774
llvm/lib/CodeGen/MachineOutliner.cpp
llvm/test/CodeGen/AArch64/machine-outliner-threshold.mir [new file with mode: 0644]