On 10/21/22 07:52, Dimitrije Milosevic wrote:
From: Dimitrije Milošević <dimitrije.milose...@syrmia.com>

This patch reverts the computation of address cost complexity
to the legacy one. After f9f69dd, complexity is calculated
using the valid_mem_ref_p target hook. Architectures like
Mips only allow BASE + OFFSET addressing modes, which in turn
prevents the calculation of complexity for other addressing
modes, resulting in non-optimal candidate selection.

gcc/ChangeLog:

        * tree-ssa-address.cc (multiplier_allowed_in_address_p): Change
        to non-static.
        * tree-ssa-address.h (multiplier_allowed_in_address_p): Declare.
        * tree-ssa-loop-ivopts.cc (compute_symbol_and_var_present): Reintroduce.
        (compute_min_and_max_offset): Likewise.
        (get_address_cost): Revert
        complexity calculation.

THe part I don't understand is, if you only have BASE+OFF, why does preventing the calculation of more complex addressing modes matter?  ie, what's the point of computing the cost of something like base + off + scaled index when the target can't utilize it?


jeff


Reply via email to