llvm-project/llvm/test/Transforms/FunctionSpecialization
Alexandros Lamprineas dbeaf6baa2 [FuncSpec] Do not overestimate the specialization bonus for users inside loops.
When calculating the specialization bonus for a given function argument,
we recursively traverse the chain of (certain) users, accumulating the
instruction costs. Then we exponentially increase the bonus to account
for loop nests. This is problematic for two reasons: (a) the users might
not themselves be inside the loop nest, (b) if they are we are accounting
for it multiple times. Instead we should be adjusting the bonus before
traversing the user chain.

This reduces the instruction count for CTMark (newPM-O3) when Function
Specialization is enabled without actually reducing the amount of
specializations performed (geomean: -0.001% non-LTO, -0.406% LTO).

Differential Revision: https://reviews.llvm.org/D136692
2022-10-27 15:26:11 +01:00
..
bug52821-use-after-free.ll [SCCP] Don't mark edges feasible when resolving undefs 2022-06-22 10:28:27 +02:00
bug55000-read-uninitialized-value.ll [SCCP] Don't mark edges feasible when resolving undefs 2022-06-22 10:28:27 +02:00
function-specialization-always-inline.ll
function-specialization-constant-expression.ll
function-specialization-constant-expression2.ll
function-specialization-constant-expression3.ll
function-specialization-constant-expression4.ll
function-specialization-constant-expression5.ll
function-specialization-constant-integers.ll
function-specialization-loop.ll [FuncSpec] Do not overestimate the specialization bonus for users inside loops. 2022-10-27 15:26:11 +01:00
function-specialization-minsize.ll
function-specialization-minsize2.ll
function-specialization-minsize3.ll
function-specialization-nodup.ll
function-specialization-nodup2.ll
function-specialization-noexec.ll
function-specialization-nonconst-glob.ll
function-specialization-nothing-todo.ll
function-specialization-poison.ll
function-specialization-recursive.ll
function-specialization-recursive2.ll
function-specialization-recursive3.ll
function-specialization-recursive4.ll
function-specialization-stats.ll
function-specialization.ll
function-specialization2.ll
function-specialization3.ll
function-specialization4.ll
function-specialization5.ll
get-possible-constants.ll [FuncSpec] Fix missed opportunities for function specialisation 2022-10-25 23:19:48 +01:00
identical-specializations.ll [NFC][FuncSpec] Add a test to show redundant function cloning. 2022-10-13 23:00:23 +01:00
literal-const.ll Recommit: [FuncSpec] Fix specialisation based on literals 2022-10-27 12:48:20 +01:00
no-spec-unused-arg.ll [FuncSpec] Add a testcase for the treatment of constant and unused arguments 2022-10-26 17:25:18 +01:00
noinline.ll [FuncSpec] Consider small noinline functions for specialisation 2022-10-25 19:49:04 +01:00
remove-dead-recursive-function.ll
specialization-order.ll [FuncSpec] Compute specialisation gain even when forcing specialisation 2022-10-26 10:08:03 +01:00
specialize-multiple-arguments.ll