This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: [AArch64 1/2] Refactor aarch64_operands_ok_for_ldpstp, aarch64_operands_adjust_ok_for_ldpstp



On 17/05/16 10:22, James Greenhalgh wrote:
Hi,

These two functions are very similar and suffer from code duplication.
With a little bit of work we can reduce the strain on the reader by
refactoring the functions.

Essentially, we're going to remove the explicit references to reg_1,
reg_2, reg_3, reg_4 and keep these things in arrays instead, at which
point it becomes clear that these functions are very similar and can be
pulled together.

OK?

Bootstrapped and tested for aarch64-none-linux-gnu with no issues.

OK?

Thanks,
James

---
2016-05-17  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c
	(aarch64_extract_ldpstp_operands): New.
	(aarch64_ldpstp_ops_same_reg_class_p): Likewise.
	(aarch64_ldpstp_load_regs_clobber_base_p): Likewise.
	(aarch64_ldpstp_offsets_consecutive_p): Likewise.
	(aarch64_operands_ok_for_ldpstp_1): Likewise.
	(aarch64_operands_ok_for_ldpstp): Refactor to
	aarch64_operands_ok_for_ldpstp_1.
	(aarch64_operands_adjust_ok_for_ldpstp): Likewise.


FWIW I looked at this when it was first sent out and it looked ok to me
(but I cannot approve).

Same with patch 2/2.

Kyrill


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