From: utzoo!decvax!ucbvax!CAD:tektronix!zehntel!sytek!syteka!olmstead Newsgroups: net.unix-wizards Title: Optimize my kernel? Article-I.D.: syteka.286 Posted: Mon Feb 21 19:38:15 1983 Received: Wed Feb 23 03:16:33 1983 I recently noticed that the compiler never gets a -O flag when compiling our kernel (well, actually, it does when it compiles vers.c, but that hardly counts). Before I go ahead and turn it on, can anyone tell me whether that's a bad idea? I've seen examples of the optimizer's generating bad code, but I think that was all floating-point stuff. Will it break our UN*X? Will it cause all those funky sed scripts to fail? [I ask this last one because I once added some code to call spl7() from a function that declared a register variable and initialized it to TS_OK (= 0). The compiler cleverly remembered that it had a zero handy in the register and called spl7 via "calls reg, _spl7" or some such. The sed script later tried to change all calls to splX into inline instructions; it KNEW, of course, that these appeared as "calls, $ 0, _splX" (the space is there so somebody's news doesn't eat my dollar-zero). The end result was that the loader told me that spl7 was undefined.] So, to optimize or not to optimize: that is the question. TIA, Patrick Olmstead ...ucbvax!menlo70!sytek!olmstead ...decvax!sytek!olmstead Olmstead.PA@PARC-MAXC.ARPA