This is the mail archive of the 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]

[PATCH GCC]Compute, cache and use cost of auto-increment rtx patterns in IVOPT


The IVOPT in GCC has a problem that it does not use cost of auto-increment
address expression in accounting, while it retreats to cost of address
expression if auto-increment addressing mode is unavailable.
For example, on ARM target:
1) the cost of "[reg]" (which is 6) is used for address expression "[reg],
2) the cost of "[reg+off]" (which is 2) is used for address expression
"[reg, #off]!"; 

This causes:
1) cost of non-auto increment address expression is used for auto-increment
address expression;
2) different address costs are used for pre/post increment address
This patch fixes the problem by computing, caching and using the cost of
auto-increment address expressions.

Bootstrap and test on x86/arm.  Is it OK?

2013-11-01  Bin Cheng  <>

	* tree-ssa-loop-ivopts.c (enum ainc_type): New.
	(address_cost_data): New field.
	(get_address_cost): Compute auto-increment rtx cost in ainc_costs.
	Use ainc_costs for auto-increment rtx patterns.
	Cleanup TWS.

Attachment: ivopt-ainc_cost-20131101.txt
Description: Text document

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