aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc/invoke.texi
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2021-08-03 13:00:44 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2021-08-03 13:00:44 +0100
commit83d796d3e58badcb864d179b882979f714ffd162 (patch)
tree3474ca36f725f90b443b2481f142a8fc78ec0517 /gcc/doc/invoke.texi
parentfa3ca6151ccac0e215727641eee36abf6e437b26 (diff)
downloadgcc-83d796d3e58badcb864d179b882979f714ffd162.zip
gcc-83d796d3e58badcb864d179b882979f714ffd162.tar.gz
gcc-83d796d3e58badcb864d179b882979f714ffd162.tar.bz2
aarch64: Add a simple fixed-point class for costing
This patch adds a simple fixed-point class for holding fractional cost values. It can exactly represent the reciprocal of any single-vector SVE element count (including the non-power-of-2 ones). This means that it can also hold 1/N for all N in [1, 16], which should be enough for the various *_per_cycle fields. For now the assumption is that the number of possible reciprocals is fixed at compile time and so the class should always be able to hold an exact value. The class uses a uint64_t to hold the fixed-point value, which means that it can hold any scaled uint32_t cost. Normally we don't worry about overflow when manipulating raw uint32_t costs, but just to be on the safe side, the class uses saturating arithmetic for all operations. As far as the changes to the cost routines themselves go: - The changes to aarch64_add_stmt_cost and its subroutines are just laying groundwork for future patches; no functional change intended. - The changes to aarch64_adjust_body_cost mean that we now take fractional differences into account. gcc/ * config/aarch64/fractional-cost.h: New file. * config/aarch64/aarch64.c: Include <algorithm> (indirectly) and cost_fraction.h. (vec_cost_fraction): New typedef. (aarch64_detect_scalar_stmt_subtype): Use it for statement costs. (aarch64_detect_vector_stmt_subtype): Likewise. (aarch64_sve_adjust_stmt_cost, aarch64_adjust_stmt_cost): Likewise. (aarch64_estimate_min_cycles_per_iter): Use vec_cost_fraction for cycle counts. (aarch64_adjust_body_cost): Likewise. (aarch64_test_cost_fraction): New function. (aarch64_run_selftests): Call it.
Diffstat (limited to 'gcc/doc/invoke.texi')
0 files changed, 0 insertions, 0 deletions