Hello, The avr port presently misses possible intra-procedure optimizations concerning register use. Optimizations are missed when 1) calling a leaf function that is 2) defined in the same unit as a the caller and 3) clobbers only a subset of the call-clobbered registers. Presently I observe that the caller still saves all of the "CALL_REALLY_USED_REGISTERS" whether they are *really* used or not.
Is there a way to make leaf functions to be compiled first so that when starting with non-leaf functions in the same unit expand could insert detailed information on which subset of registers is actually clobbered by calls to leaf functions? When reading the comments in cgraph.c for the cgraph_optimize function "Backend can then use this information to modify calling conventions" it seems to me that there is an interface already for modifying the calling convention. Is there a port that uses it so that one could find out what the interface looks like? Yours, Bjoern Haase