home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,794 of 2,753   
   George Neuner to bobduff@shell01.TheWorld.com   
   Re: Detailed algorithms on inline optimi   
   19 Jan 10 22:59:26   
   
   From: gneuner2@comcast.net   
      
   On Tue, 19 Jan 2010 13:53:55 -0500, Robert A Duff   
    wrote:   
      
   >You can inline recursive calls if you limit the depth.   
   >   
   >[True.  Does anyone do that, inline the first few times though and   
   >then punt to the normal routine? -John]   
      
   You can turn the recursion into a loop (if possible) and then inline   
   the loop code.   
      
   Offhand I can't point to any examples, but I'd look at Scheme and ML   
   family compilers.  Scheme and ML require tail recursion - at least   
   simple tail recursion - to be implemented as a loop, so I'd guess that   
   optimizing compilers for these languages would be able to demonstrate   
   some inlining of loop-transformed recursion.   
      
   George   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca