home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!news.uiowa.edu!icaen.uiowa.edu!dsiebert
- From: dsiebert@icaen.uiowa.edu (Doug Siebert)
- Subject: Program to meld multiple C source files into one?
- Sender: news@news.uiowa.edu (News)
- Message-ID: <1993Jan23.035158.14425@news.uiowa.edu>
- Date: Sat, 23 Jan 1993 03:51:58 GMT
- Nntp-Posting-Host: grind.isca.uiowa.edu
- Organization: University of Iowa, Iowa City, IA, USA
- Lines: 29
-
- Does anyone have a program to take a number of C source files which together
- are a single C program and meld them together into a single file? Such a
- program would have to deal with parsing the C source to make sure all globals
- are defined before referenced, rename statically defined globals to avoid name
- collisions and other issues. The advantage of doing this would of course be
- that optimization will work over multiple object files, instead of over a
- single file -- there are certain companies designing newer compilers that will
- do this (HP is one, I know of for sure) but most people do not have access to
- such a capability at this time and it might provide some extra optimization
- that could prove useful.
-
- If I was more up on parsing tools I might try to tackle this myself, but it
- occurs to me that someone else may have already done this. Anyone know of
- anything that does this? I know that improvements in algorithms will net
- much better improvements in efficiency than something like this, but my main
- goal in this would be using it on a program I already know is fairly well
- optimized to the bone (and spends 80% of its time inside the kernel anyway,
- so the gains would likely be small) But I'd still be interested in trying
- this out. I just mashed my source together manually in about an hour, but
- haven't had a chance to do any real performance testing, but by tracking
- stack sizes I can see the effect of some inlining across object files...
-
- --
- /-----------------------------------------------------------------------------\
- | Doug Siebert | "I don't have to take this abuse |
- | Internet: dsiebert@isca.uiowa.edu | from you - I've got hundreds of |
- | NeXTMail: dsiebert@chop.isca.uiowa.edu | people waiting in line to abuse |
- | ICBM: 41d 39m 55s N, 91d 30m 43s W | me!" Bill Murray, Ghostbusters |
- \-----------------------------------------------------------------------------/
-