Patch to improve x86 integer -> FP conversions

Jeffrey A Law law@upchuck.cygnus.com
Fri Apr 2 11:29:00 GMT 1999


  In message <199903311934.OAA08019@jwlab.FEITH.COM>you write:
  > This patch is a rewrite of the integer -> FP conversion patterns
  > using a splitter.  Among other things this avoids using
  > output_op_from_reg which was outputing instructions behind the scenes
  > thus intefering with scheduling.
  > 
  > Notes:
  > 
  >   1) I don't understand why floatdixf2 required that LONG_DOUBLE_TYPE_SIZE
  >      equal 96.  None of the other i386 integer -> FP patterns had any
  >      special requirements (including floatdisf2).
  > 
  > ChangeLog:
  > 
  > Tue Mar 30 23:28:35 EST 1999  John Wehle  (john@feith.com)
  > 
  > 	* i386.md (floatsisf2, floatdisf2, floatsidf2, floatdidf2,
  > 	floatsixf2, floatdixf2): Rewrite using a splitter.
Basically OK.  Though I'd like your thoughts on a couple issues.

You're using assign_stack_temp in the expanders.  So, each conversion at
the source level will require a hunk of stack space.  This (may) significantly
increase the stack usage for a function if it has a lot of conversions.

An alternate solution would be for the first call to one of the expanders to
allocate a slot which would be re-used by the other expanders.

The downside is this is a little more complex since to save a hunk of rtl like
that from an expander you have to save/restore it via the
save/restore_machine_status mechanism.  And using a single temporary will
serialize these kinds of conversions.  Of course we probably serialize now
anyway.

Comments?
jeff



More information about the Gcc-patches mailing list