From: John R. <re...@cs...> - 2005-09-09 18:00:54
|
I'd just write a little Perl script that strips some of the inline pragmas out of the app.c and hack the makefile so this gets called on every build. A heavyweight solution would be to use CMI, a source-to-source inliner we developed which takes a file full of inlining requests of the form: a -> b inline a into b a -> * inline a into all callers http://www.cs.utah.edu/flux/alchemy/cmi.html Or contact me if you're interested in an even more heavyweight solution. On of my students has developed an interprocedural dataflow analyzer for C code that is quite good at eliminating dead code. It can be used to shrink TOS applications, which often contain some dead code that nesC cannot eliminate (since it does DCE at function granularity) and gcc cannot eliminate (since it is not interprocedural). This code isn't quite ready for general use, but we hope to package it up as a postprocessor for TOS programs sometime this fall. John Regehr -- John Regehr, re...@cs... Assistant Professor, School of Computing, University of Utah On Thu, 8 Sep 2005, Joe Polastre wrote: > Hey compiler gurus, > > I would like to instruct the compiler to NOT inline a function due > to space limitations; in other words, to fit on devices with very > limited flash where performance is not an issue. > > nesC assigns the 'inline' keyword to everything, so I figure this is > probably not possible without editing app.c. With gcc, I can set the > -finline-limit option to a low value to prevent inlining on large > functions, but it seems to have little effect if the 'inline' keyword > is placed in front of a function. > > Do I now need a keyword, 'noinline' that forces nesC to not inline > the function and allows me to save flash storage? > > Ideas? > > -Joe > > _______________________________________________ > Tinyos-devel mailing list > Tinyos-devel@Millennium.Berkeley.EDU > https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel > |