From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,6af9ef4b59855c62,start X-Google-Attributes: gid1164f8,public From: peltz@jaka.ece.uiuc.edu (Steve Peltz) Subject: New C compiler Date: 1996/06/29 Message-ID: <4r25s5$eb7@vixen.cso.uiuc.edu>#1/1 X-Deja-AN: 162711538 organization: University Communications, Inc. newsgroups: comp.sys.dec Having just installed 4.0 on our development Alpha (2100 4/275), I went ahead to see if I could compare the performance of the optimizer with the ucode version. For some things, it improved a fair bit, but for most the code it produced was a bit slower. I used -fast -O4 -inline speed -tune host. I didn't see a significant difference between -O3 and -O4. I did have to hand-tune a bunch of "register" declarations for the old compiler in order to get the maximum speed, and it was very sensitive to any changes in that area, so I may be able to improve things still. I also note that the assembler optimizations still don't really seem to do much of anything other than rearranging order. For instance, it doesn't seem to do any checking of redundant write-backs or loads even in the most obvious and straightforward of cases (I was hoping the assembler would be a bit smarter so I wouldn't have to put much effort along those lines in generating the assembly code; the various .set options in the assembler seem to imply it does a lot more optimizations than it seems to actually do). Is it correct that to use the -ifo flag, I should just forget about compiling to .o files, and simply specify the .c files I want to be optimized in the cc command that does the final load? I was using the -j flag before, with the final program dependent on the .u files; now I just make the final program dependent on the .c files along with the normal .o files that don't need that level of optimization? Does that produce more optimization (global register usage, etc.) than if I use, e.g.: cc -c -O4 -ifo a.c b.c cc a.o b.o Does it produce incorrect results if I do: cc -c -O4 -ifo a.c b.c cc -c b.c cc a.o b.o because b.o may now be using different registers than the optimized a.o is expecting? One behavior has changed which is not documented in the man page: if you use both -E and -P, with -oldc it still pipes it to stdout; with -newc it ignores the -E. Is there some reason for this? I guess I don't care too much, since I've already changed all my makefiles, but it was annoying.