aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/config/aarch64/aarch64-protos.h
diff options
context:
space:
mode:
authorjgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-16 08:41:46 +0000
committerEvandro Menezes <e.menezes@samsung.com>2015-08-28 17:41:17 -0500
commit220882082b32a048e224bc678f5a3b6fe87259b7 (patch)
treeffd12ae94328132d05afb37f29ed5e256af74315 /gcc-4.9/gcc/config/aarch64/aarch64-protos.h
parent6cf9a82e4165911e0df28baf66d71b33253108a6 (diff)
downloadtoolchain_gcc-220882082b32a048e224bc678f5a3b6fe87259b7.tar.gz
toolchain_gcc-220882082b32a048e224bc678f5a3b6fe87259b7.tar.bz2
toolchain_gcc-220882082b32a048e224bc678f5a3b6fe87259b7.zip
[4.9] Adjust several costs for AArch64.
Backport from trunk 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Refactor aarch64_address_costs. gcc/ * config/aarch64/aarch64-protos.h (scale_addr_mode_cost): New. (cpu_addrcost_table): Use it. * config/aarch64/aarch64.c (generic_addrcost_table): Initialize it. (aarch64_address_cost): Rewrite using aarch64_classify_address, move it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210493 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Add cost tables for Cortex-A57 gcc/ * config/aarch64/aarch64.c (cortexa57_addrcost_table): New. (cortexa57_vector_cost): Likewise. (cortexa57_tunings): Use them. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210494 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Better estimate cost of building a constant gcc/ * config/aarch64/aarch64.c (aarch64_build_constant): Conditionally emit instructions, return number of instructions which would be emitted. (aarch64_add_constant): Update call to aarch64_build_constant. (aarch64_output_mi_thunk): Likewise. (aarch64_rtx_costs): Estimate cost of a CONST_INT, cost a CONST_DOUBLE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210496 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Add cost tables for Cortex-A57 gcc/ * config/aarch64/aarch64.c (cortexa57_addrcost_table): New. (cortexa57_vector_cost): Likewise. (cortexa57_tunings): Use them. 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Wrap aarch64_rtx_costs to dump verbose output gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs_wrapper): New. (TARGET_RTX_COSTS): Call it. 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Better estimate cost of building a constant gcc/ * config/aarch64/aarch64.c (aarch64_build_constant): Conditionally emit instructions, return number of instructions which would be emitted. (aarch64_add_constant): Update call to aarch64_build_constant. (aarch64_output_mi_thunk): Likewise. (aarch64_rtx_costs): Estimate cost of a CONST_INT, cost a CONST_DOUBLE. 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Factor out common MULT cases gcc/ * config/aarch64/aarch64.c (aarch64_strip_shift_or_extend): Rename to... (aarch64_strip_extend): ...this, don't strip shifts, check RTX is well formed. (aarch64_rtx_mult_cost): New. (aarch64_rtx_costs): Use it, refactor as appropriate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210497 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Set default costs and handle vector modes. gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Set default costs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210498 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philip Tomsich <philipp.tomsich@theobroma-systems.com> Improve SET cost. gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Improve costing for SET RTX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210499 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philip Tomsich <philipp.tomsich@theobroma-systems.com> Cost memory accesses using address costs gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Use address costs when costing loads and stores to memory. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210500 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philip Tomsich <philipp.tomsich@theobroma-systems.com> Better cost logical operations gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Improve cost for logical operations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210501 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philip Tomsich <philipp.tomsich@theobroma-systems.com> Improve costs for sign/zero extend operations gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Cost ZERO_EXTEND and SIGN_EXTEND better. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210502 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philip Tomsich <philipp.tomsich@theobroma-systems.com> Improve costs for rotate and shift operations. * config/aarch64/aarch64.c (aarch64_rtx_costs): Improve costs for rotates and shifts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210503 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philip Tomsich <philipp.tomsich@theobroma-systems.com> Improve costs for sign/zero extracts gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Improve costs for SIGN/ZERO_EXTRACT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210504 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Improve costs for div/mod gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Improve costs for DIV/MOD. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210505 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cost comparisons, flag setting operators and IF_THEN_ELSE gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Cost comparison operators. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210506 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cost more Floating point RTX. gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Cost FMA, FLOAT_EXTEND, FLOAT_TRUNCATE, ABS, SMAX, and SMIN. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210507 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cost TRUNCATE gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Cost TRUNCATE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210508 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Cost for SYMBOL_REF, HIGH and LO_SUM gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Cost SYMBOL_REF, HIGH, LO_SUM. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210509 138bc75d-0d04-0410-961f-82ee72b054a4 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Dump a message if we are unable to cost an insn. gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle the case where we were unable to cost an RTX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210510 138bc75d-0d04-0410-961f-82ee72b054a4 2014-08-26 Evandro Menezes <e.menezes@samsung.com> Fix typos in cost data structure. * config/arm/aarch64/aarch64.c (generic_addrcost_table): Delete qi cost; add di cost. (cortexa57_addrcost_table): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214503 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc-4.9/gcc/config/aarch64/aarch64-protos.h')
-rw-r--r--gcc-4.9/gcc/config/aarch64/aarch64-protos.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/config/aarch64/aarch64-protos.h b/gcc-4.9/gcc/config/aarch64/aarch64-protos.h
index 8b0a70538..e78348ea0 100644
--- a/gcc-4.9/gcc/config/aarch64/aarch64-protos.h
+++ b/gcc-4.9/gcc/config/aarch64/aarch64-protos.h
@@ -108,9 +108,22 @@ enum aarch64_symbol_type
cost models and vectors for address cost calculations, register
move costs and memory move costs. */
+/* Scaled addressing modes can vary cost depending on the mode of the
+ value to be loaded/stored. QImode values cannot use scaled
+ addressing modes. */
+
+struct scale_addr_mode_cost
+{
+ const int hi;
+ const int si;
+ const int di;
+ const int ti;
+};
+
/* Additional cost for addresses. */
struct cpu_addrcost_table
{
+ const struct scale_addr_mode_cost addr_scale_costs;
const int pre_modify;
const int post_modify;
const int register_offset;