This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][ARM] Implement vectorizer cost hooks


Following the discussion about "disable peeling" [1] a few weeks ago,
it turned out that the vectorizer cost model needed some
implementation for ARM.

The attached patch implements arm_builtin_vectorization_cost and
arm_add_stmt_cost, providing default costs when aligned and unaligned
loads/stores have the same cost (=1). init_cost and finish_cost still
use the default implementation (I noticed that x86 has chosen to
duplicate the default implementation without changing it, why?)

Benchmarking shows very little variation, expect a noticeable +1.6% on coremark.

If this is OK, we can then discuss how to disable peeling completely
when aligned and unaligned accesses have the same cost (and thus where
peeling is a loss of performance). I think adding a new hook is
necessary, since target descriptions may use different models for
these costs (eg x86 makes no difference between unaligned loads and
unaligned stores).




2013-02-05  Christophe Lyon <>

        * config/arm/arm.c (arm_builtin_vectorization_cost)
        (arm_add_stmt_cost): New functions.
        (struct processor_costs): New struct type.
        (default_arm_cost): New struct of type processor_costs.

Attachment: vect-cost-model.patch
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]