[PATCH ARM]memset inlining patch for arm

Evandro Menezes e.menezes@samsung.com
Fri Sep 5 19:33:00 GMT 2014


This is perhaps a plus for Aarch64 as well.  Is there any plan to add a
64-bit version of this patch or should a bug be open for this?

Thank you,

Evandro Menezes                              Austin, TX

-----Original Message-----
From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-owner@gcc.gnu.org]
On Behalf Of Bin Cheng
Sent: Thursday, September 04, 2014 1:08
To: gcc-patches@gcc.gnu.org
Subject: [PATCH ARM]memset inlining patch for arm

This patch is posted/approved before at
Unfortunately, it was reverted because a latent bug revealed causing glibc
build failure and I didn't have enough time to fix back at that time.
Now with the potential bug resolved by
https://gcc.gnu.org/ml/gcc-patches/2014-09/msg00298.html , here I am sending
it for approval again.
The code in patch isn’t changed, all differences between this and previous
version are the test cases.
1) I tuned scanning strings in some test cases to resolve case failure when
testing against old arm processors.
2) I added a new case which is reduced from glibc build failure triggered by
this patch.

Pass test on cortex-m3.
Pass test on arm-none-linux-gnueabi
Bootstrap on arm-none-linux-gnueabihf
Pass test on arm-none-linux-gnueabihf with different test variants.

So is it OK?


2014-09-04  Bin Cheng  <bin.cheng@arm.com>

	PR target/55701
	* config/arm/arm.md (setmem): New pattern.
	* config/arm/arm-protos.h (struct tune_params): New fields.
	(arm_gen_setmem): New prototype.
	* config/arm/arm.c (arm_slowmul_tune): Initialize new fields.
	(arm_fastmul_tune, arm_strongarm_tune, arm_xscale_tune): Ditto.
	(arm_9e_tune, arm_v6t2_tune, arm_cortex_tune): Ditto.
	(arm_cortex_a8_tune, arm_cortex_a7_tune): Ditto.
	(arm_cortex_a15_tune, arm_cortex_a53_tune): Ditto.
	(arm_cortex_a57_tune, arm_cortex_a5_tune): Ditto.
	(arm_cortex_a9_tune, arm_cortex_a12_tune): Ditto.
	(arm_v7m_tune, arm_v6m_tune, arm_fa726te_tune): Ditto.
	(arm_const_inline_cost): New function.
	(arm_block_set_max_insns): New function.
	(arm_block_set_non_vect_profit_p): New function.
	(arm_block_set_vect_profit_p): New function.
	(arm_block_set_unaligned_vect): New function.
	(arm_block_set_aligned_vect): New function.
	(arm_block_set_unaligned_non_vect): New function.
	(arm_block_set_aligned_non_vect): New function.
	(arm_block_set_vect, arm_gen_setmem): New functions.

2014-09-04  Bin Cheng  <bin.cheng@arm.com>

	PR target/55701
	* gcc.target/arm/memset-inline-1.c: New test.
	* gcc.target/arm/memset-inline-2.c: New test.
	* gcc.target/arm/memset-inline-3.c: New test.
	* gcc.target/arm/memset-inline-4.c: New test.
	* gcc.target/arm/memset-inline-5.c: New test.
	* gcc.target/arm/memset-inline-6.c: New test.
	* gcc.target/arm/memset-inline-7.c: New test.
	* gcc.target/arm/memset-inline-8.c: New test.
	* gcc.target/arm/memset-inline-9.c: New test.
	* gcc.target/arm/memset-inline-10.c: New test.

More information about the Gcc-patches mailing list