[Tinyos-devel] how to prevent inlining?
regehr at cs.utah.edu
Fri Sep 9 11:00:28 PDT 2005
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
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, regehr at cs.utah.edu
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?
> Tinyos-devel mailing list
> Tinyos-devel at Millennium.Berkeley.EDU
More information about the Tinyos-devel