aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/config/aarch64/aarch64.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix for N9 kernel build.Than McIntosh2015-10-161-60/+76
| | | | | | | | | | | | | | | | Cherry-pick from trunk: commit 39f4504dbc88d17c496cdf7b12fb0d32277d281d Author: pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Tue Jun 3 22:42:47 2014 +0000 2014-06-03 Andrew Pinski <apinski@cavium.com> * config/aarch64/aarch64.c (aarch64_if_then_else_costs): New function. (aarch64_rtx_costs): Use aarch64_if_then_else_costs. Bug: 24985248 Change-Id: Ic03ba2552615fca0aa0de6af47f47ae4cf074e3b
* [4.9] Add several improvements for AArch64ktkachov2015-09-091-19/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from GCC 5. 2015-04-30 Kyrylo Tkachov <kyrylo.tkachov@arm.com> Properly handle mvn-register and add EON+shift pattern and cost appropriately * config/aarch64/aarch64.md (*eor_one_cmpl_<SHIFT:optab><mode>3_alt): New pattern. (*eor_one_cmpl_<SHIFT:optab>sidi3_alt_ze): Likewise. * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle MVN-shift appropriately. Handle alternative EON form. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222637 138bc75d-0d04-0410-961f-82ee72b054a4 2015-04-30 Kyrylo Tkachov <kyrylo.tkachov@arm.com> Properly cost FABD pattern * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle pattern for fabd in ABS case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222638 138bc75d-0d04-0410-961f-82ee72b054a4 2015-05-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com> Remember to cost operand 0 in FP compare-with-0.0 case * config/aarch64/aarch64.c (aarch64_rtx_costs, COMPARE case): Add cost of op0 in the compare-with-fpzero case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222673 138bc75d-0d04-0410-961f-82ee72b054a4 2015-05-01 Wilco Dijkstra <wdijkstr@arm.com> Fix aarch64_rtx_costs of PLUS/MINUS * gcc/config/aarch64/aarch64.c (aarch64_rtx_costs): Calculate cost of op0 and op1 in PLUS and MINUS cases. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222676 138bc75d-0d04-0410-961f-82ee72b054a4 2015-07-27 Wilco Dijkstra <wdijkstr@arm.com> Improve spill code - swap order in shl pattern * config/aarch64/aarch64.md (aarch64_ashl_sisd_or_int_<mode>3): Place integer variant first. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226247 138bc75d-0d04-0410-961f-82ee72b054a4 2015-07-27 Wilco Dijkstra <wdijkstr@arm.com> Improve spill code - swap order in shr patterns * gcc/config/aarch64/aarch64.md (aarch64_lshr_sisd_or_int_<mode>3): Place integer variant first. (aarch64_ashr_sisd_or_int_<mode>3): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226253 138bc75d-0d04-0410-961f-82ee72b054a4 2015-08-04 Pawel Kupidura <pawel.kupidura@arm.com> * config/aarch64/aarch64.c: Change inner loop statement cost to be consistent with other targets. Change-Id: If5b10466302d733fcae6eacc9d128fdb8f95c0de git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226575 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge "[4.9] Adjust several costs for AArch64."Dan Albert2015-09-081-206/+1079
|\
| * [4.9] Adjust several costs for AArch64.jgreenhalgh2015-08-281-206/+1079
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Modify LINK_SPEC to pass --fix-cortex-a53-843419 as default.Lai Wei-Chih2015-08-271-0/+5
|/ | | | | | | For NDK toolchains, always enable the fix of cortex-a53 erratum 843419. Use -mno-fix-cortex-a53-843419 to disable this workaround. Change-Id: I69b8a71113abb172138bf0986697a94e42a5117e
* Revert "cherrypick GCC trunk 210497", but extract fix for the SEGV from itYiran Wang2015-08-261-254/+110
| | | | | | | BUG=23157315 This reverts commit 659b5199aa009008a003062ff828f44b6bd70b65. Change-Id: I3564560d3aa57c039c6bc78e0cd630cea3a4bb8b
* [4.9] Adjust generic move costs for aarch64. Backport from trunkJunmo Park2015-08-221-2/+4
| | | | | | | | | | 2014-11-19 Wilco Dijkstra <wdijkstr@arm.com> PR target/61915 * config/aarch64/aarch64.c (generic_regmove_cost): Increase FP move cost. Change-Id: Ifaa0c2d1a72955e42f3882c68d1e52acf5a790e7 Signed-off-by: Junmo Park <junmoz.park@samsung.com>
* cherrypick GCC trunk 210497Yiran Wang2015-08-131-110/+255
| | | | | | | | | | | | | | | | | | BUG=23157315 2014-05-16 James Greenhalgh <james.greenhalgh@arm.com> Philipp Tomsich <philipp.tomsich@theobroma-systems.com> [AArch64 costs 5/18] 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. Change-Id: I298e5af1b4006f37d873b113c8d05643e897f6f1
* cherry-pick gcc r217091.Yiran Wang2015-07-081-0/+12
| | | | | | | | | | | | | | | This change is re-based and modified to work with the older context, as the context code is changed a lot in GCC trunk. It is about to insert some barriers on stack-pointer register, so that the adjust-stack-pointer code does not get scheduled before any code in the fuction epilogue, which may access some stack space without explicit use of stack pointer. Examples are a load from an auto array and some access to an area of alloca. Anyway, the barriers would make all such alias dependences not violated. For more details, please refer to GCC bug 63293. (Personally I think there may be a bit too many barriers generated.) Change-Id: I61ea54e500b6965feab69a62165d10b6c3a21c20
* Synchronize with google/gcc-4_9 to r224707 (from r214835)Yiran Wang2015-06-291-5/+7
| | | | Change-Id: I3d6f06fc613c8f8b6a82143dc44b7338483aac5d
* [4.9] Restore recog state after finding pre-madd instruction.Rong Xu2014-11-051-0/+4
| | | | | | | This patch backports svn r216853 from upsteam gcc-4.9 branch that fixed a bug introduced in fixing cortex a53 erratum 835769. Change-Id: Iccc6fd04ede28c2deba51be3f8e348ce374c8b4f
* [gcc-4.9] fix for for cortex-a53 erratum 835769Rong Xu2014-10-131-0/+131
| | | | | | | | This patch cherry picks r216116 from google/gcc-4_9 branch (which is r216077 and r216079 from upstream gcc-4_9 branch). Tested the built compiler with aarch64 devicde. Change-Id: I75745fe35aae83bc3b64135a2efc7f8ffd9cfb1f
* [gcc-4.9] Merge svn r213650 from google/gcc-4_9 branchRong Xu2014-08-061-0/+14
| | | | | | | Merge svn r213650 from google/gcc-4_9 branch. Tested with arm,x86,mips,arm64,x86_64,mips64 build in liunux/windows. Change-Id: I0c07f67d516074172aa393003eee664d01f2e0f2
* [4.9] Switch gcc-4.9 to use google/gcc-4_9 branch.Rong Xu2014-07-291-8/+12
| | | | | | | | | | | | | | This source drop uses svn version r212828 of google/gcc-4.9 branch. We also cherry-picked r213062, r213063 and r213064 to fix windows build issues. All gcc-4.9 patches before July 3rd are ported to google/gcc-4.9. The following prior commits has not been merged to google branch yet. (They are included in this commit). e7af147f979e657fe2df00808e5b4319b0e088c6, baf87df3cb2683649ba7e9872362a7e721117c23, and c231900e5dcc14d8296bd9f62b45997a49d4d5e7. Change-Id: I4bea3ea470387ff751c2be4cb0d4a12059b9299b
* [4.9] GCC 4.9.0 official release refreshBen Cheng2014-04-221-47/+25
| | | | Change-Id: Ic99a7da8b44b789a48aeec93b33e93944d6e6767
* Initial checkin of GCC 4.9.0 from trunk (r208799).Ben Cheng2014-03-251-0/+8544
Change-Id: I48a3c08bb98542aa215912a75f03c0890e497dba