]> git.ipfire.org Git - thirdparty/gcc.git/commit
ivopts: replace constant_multiple_of with aff_combination_constant_multiple_p [PR114932]
authorTamar Christina <tamar.christina@arm.com>
Wed, 3 Jul 2024 08:31:09 +0000 (09:31 +0100)
committerTamar Christina <tamar.christina@arm.com>
Wed, 3 Jul 2024 08:31:09 +0000 (09:31 +0100)
commit735edbf1e2479fa2323a2b4a9714fae1a0925f74
tree0b2a4b2fc4e9a0e918f34961ca76bcc93e906515
parent25127123100f04c2d5d70c6933a5f5aedcd69c40
ivopts: replace constant_multiple_of with aff_combination_constant_multiple_p [PR114932]

The current implementation of constant_multiple_of is doing a more limited
version of aff_combination_constant_multiple_p.

The only non-debug usage of constant_multiple_of will proceed with the values
as affine trees.  There is scope for further optimization here, namely I believe
that if constant_multiple_of returns the aff_tree after the conversion then
get_computation_aff_1 can use it instead of manually creating the aff_tree.

However I think it makes sense to first commit this smaller change and then
incrementally change things.

gcc/ChangeLog:

PR tree-optimization/114932
* tree-ssa-loop-ivopts.cc (constant_multiple_of): Use
aff_combination_constant_multiple_p instead.
gcc/tree-ssa-loop-ivopts.cc