This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.


[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Re: Finally a main line version that passes LAPACK's test suite ...




The most likely cause for the stack-frame expansion is this change, by
yours truly.

  Mon Feb 22 13:33:47 1999  Mark Mitchell  <mark@markmitchell.com>

	* cse.c (dump_class): New function.
	(invalidate_memory): Fix typo in comment.
	* function.c (temp_slot): Add an alias set field.  
	(assign_stack_temp): Only reuse slots if they will have the
	same alias set as before.
	(combine_temp_slots): Don't combine if -fstrict-aliasing;
	that's unsafe.
	* rtl.c (copy_rtx): Copy all the flags (in particular,
	MEM_SCALAR_P).

If -fno-strict-aliasing makes the expansion go away, that will confirm
this hypothesis.

There are a few ways to fix this problem:

  o Don't use -fstrict-aliasing.  This might make sense if type-based
    alias analysis is not useful in Fortran.  In the long run, we plan 
    to use alias sets for other things as well, like temporary
    variables, so this might not be a great long-term solution.

  o Teach g77 about alias sets.  (It doesn't use them now, right?)
    You can see c_get_alias_set for the kind of thing you might
    want to do.  I don't remember enought about recent Fortran (F90) 
    to know if this makes sense.

  o Enhance the stack-slot allocating code.  This is the best plan,
    but hardest.  We need a way to tell the compiler that a stack
    slot is dead, and being reused.

You can search the archives for a few days prior to the 2/22 to find
some discussion of the problem that prompted my patch.

-- 
Mark Mitchell 			mark@markmitchell.com
Mark Mitchell Consulting	http://www.markmitchell.com