gnupic: Re: [gnupic] Linker Optimizations


Previous by date: 9 Mar 2007 23:20:25 +0000 Re: [gnupic] COD file format, David Barnett
Next by date: 9 Mar 2007 23:20:25 +0000 Re: [gnupic] Linker Optimizations, Scott Dattalo
Previous in thread: 9 Mar 2007 23:20:25 +0000 Re: [gnupic] Linker Optimizations, Ralph Corderoy
Next in thread: 9 Mar 2007 23:20:25 +0000 Re: [gnupic] Linker Optimizations, Scott Dattalo

Subject: Re: [gnupic] Linker Optimizations
From: David ####@####.####
Date: 9 Mar 2007 23:20:25 +0000
Message-Id: <20070309171717.0a9b0a3d@DEEPTHOUGHT.BARNET.net>

On Mon, 05 Mar 2007 13:44:31 -0800
Scott Dattalo ####@####.#### wrote:

> One of the risks you'll face is that subtle source code changes have 
> drastic impact on code generation. For example, adding a second call
> to some function may prohibit it from being inlined which in turn
> causes the 8-level stack to overflow. I suppose if you're counting on
> this type of optimization, then perhaps you'll need to ensure your
> assumptions are validated! (For example, you might need to create
> simulation regression tests.)
Most of the functions I'm dealing with are fundamentally designed to be
called from only one location.  They're things like a "button machine"
function to be run from a "main loop".  I know there are lots of other
scenarios where small changes have big effects, though.  Hopefully
in time we can make the optimizer smart enough not to get tripped up
with some of the more trivial things.

> There's no doubt that adding an optimizer to the linker will be a 
> challenging job. As far as being manageable, I guess that depends on
> who is managing! If you're interested, then I'd suggest diving into 
> gputils/gputils/gplink/ and try getting a basic understanding on how 
> things are structured. In particular, try to understand how program 
> memory and register memory are dealt with. See if it's possible to 
> annotate the preexisting structures with new information you can use
> for optimization.
FYI, I've been making my way through the headers for gplink and digging
through some of the code.  It's pretty simple and concise for the most
part.  I haven't seen anything dealing with memory or registers yet,
though.

> After that, check out sdcc/sdcc/src/pic/ and
> attempt to get some basic understanding on how the pcode stuff is
> used.
I glanced over that and it made me dizzy =).  I think I'll spend some
more time going through gplink before getting back to that.

BTW, how's your other project coming along?

David

Previous by date: 9 Mar 2007 23:20:25 +0000 Re: [gnupic] COD file format, David Barnett
Next by date: 9 Mar 2007 23:20:25 +0000 Re: [gnupic] Linker Optimizations, Scott Dattalo
Previous in thread: 9 Mar 2007 23:20:25 +0000 Re: [gnupic] Linker Optimizations, Ralph Corderoy
Next in thread: 9 Mar 2007 23:20:25 +0000 Re: [gnupic] Linker Optimizations, Scott Dattalo


Powered by ezmlm-browse 0.20.