[AArch64 1/2] Refactor aarch64_operands_ok_for_ldpstp, aarch64_operands_adjust_ok_for_ldpstp

James Greenhalgh james.greenhalgh@arm.com
Tue May 17 09:23:00 GMT 2016


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-AArch64-1-2-Refactor-aarch64_operands_ok_for_ldpstp-.patch
Type: text/x-patch
Size: 11633 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160517/ae4e0c4b/attachment.bin>


More information about the Gcc-patches mailing list