[RFC PATCH, i386]: Convert 1.0/sqrtf (x) into rsqrtf even without -mrecip

David Edelsohn dje@watson.ibm.com
Sat Jan 5 17:19:00 GMT 2008


	Be careful about over-optimizing that particular benchmark or
isolated statement.  If the costs on Core2 make it a general win, great.

	I eventually want to enhance the TARGET_BUILTIN_RECIPROCAL
interface to have a cost parameter that counts the number of other FP
instructions in the basic block or function to know if there is enough
other work that can be inter-scheduled with the NR iterations.  On
PowerPC, at least, the benefit is more about intermingling other
computations instead of occupying the FPU with a long latency instruction.
If there is no other FP work, one might as well not bloat the I-cache and
use the single instruction.

	In the long run, the subtlety of a cost model probably would help
x86 as well.

David



More information about the Gcc-patches mailing list