🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2524

Recursive inline expansion?

#2524
From: Paul Hudson
Date: Mon, 10 Apr 1989 15:13
23 lines
1331 bytes
I was reading a book on compilers and there was a nice example with
the fibonacci function where f(5) was expanded, and the result
expanded, .. and so on 5 times, the result folded and the whole call
replaced by a constant. The depth of recursive expansion was an
option.

It would be nice to have this in gcc. But a cursory examination of
inlining shows that the rtl for an inlined function is spliced in to
the rtl being generated from the tree for an expression. This would
make it rather difficult. Am I barking up the wrong tree?

(I knew there was a good reason for keeping functions as trees ;-)
.... Ah well, perhaps in my yet-to-be m2 compiler since I'll have to
build a tree anyway)

Paul Hudson

Snail mail: Monotype ADG	Email:	...!ukc!acorn!moncam!paul
	    Science Park,		paul@moncam.co.uk
	    Milton Road,	"Sun Microsysytems:
	    Cambridge,		 The Company is Arrogant (TM)"
	    CB4 4FQ
Technical Details
Message-ID: <8904101513.AA12470@marvin.moncam.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!UUNET.UU.NET!mcvax!moncam!paul

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!UUNET.UU.NET!mcvax!moncam!paul
From: mcvax!moncam!paul@UUNET.UU.NET (Paul Hudson)
Newsgroups: gnu.gcc.bug
Subject: Recursive inline expansion?
Message-ID: <8904101513.AA12470@marvin.moncam.uucp>
Date: 10 Apr 89 15:13:43 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 23