home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / c / 20103 < prev    next >
Encoding:
Text File  |  1993-01-23  |  2.3 KB  |  41 lines

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