[M3devel] optimizer problems

Jay K jay.krell at cornell.edu
Fri Jun 4 18:29:34 CEST 2010


Just a note that I have found at least two pieces of code that fail to compile with optimization enabled, even in the release branch.

One is a simple case involving unused nested functions.
One is a complicated not really understood case.


To fix these I have pessimized the optimizer in the release branch but turning off two optimizations.


It would be nice to find a better fix for the first.
Even something sleazy like having the front end report up front to the backend if there are any nested functions in the unit, and only pessimizing such units.
There is probably also a fix to gcc around preserving nested functions. I thought code in varasm.c was suspicious but couldn't get it to work quickly.


The other fix seems to always involve exception handling, so something sleazy might be appropriate there -- only turn off the optimization in units that use exception handling. Longer term, we should use the gcc exception handling support if possible, even if that involves configure -enable-sjlj-exceptions (presumably not on all targets).

 - Jay


 		 	   		  


More information about the M3devel mailing list