Commit f28e54bd by Wilco Dijkstra Committed by Wilco Dijkstra

Mark symbols as constant

Aarch64_legitimate_constant_p currently returns false for symbols,
eventhough they are always valid constants.  This means LOSYM isn't
CSEd correctly.  If we return true CSE works better, resulting in
smaller/faster code (0.3% smaller code on SPEC2006).  Avoid this
for TLS symbols since their sequence is complex.

    gcc/
	* config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
	Return true for non-tls symbols.

From-SVN: r249442
parent 9a85b75f
2017-06-21 Wilco Dijkstra <wdijkstr@arm.com>
* config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
Return true for non-tls symbols.
2017-06-21 James Greenhalgh <james.greenhalgh@arm.com>
* config/aarch64/aarch64-cores.def (cortex-a55): New.
......
......@@ -10129,6 +10129,11 @@ aarch64_legitimate_constant_p (machine_mode mode, rtx x)
&& aarch64_valid_symref (XEXP (x, 0), GET_MODE (XEXP (x, 0))))
return true;
/* Treat symbols as constants. Avoid TLS symbols as they are complex,
so spilling them is better than rematerialization. */
if (SYMBOL_REF_P (x) && !SYMBOL_REF_TLS_MODEL (x))
return true;
return aarch64_constant_address_p (x);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment