From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Edelsohn To: "Matthias Urlichs" Cc: egcs@cygnus.com Subject: Re: mutex in frame code Date: Sun, 28 Feb 1999 22:53:00 -0000 Message-ID: <9902021804.AA58660@marc.watson.ibm.com> References: <19990202080023.B15962@noris.de> X-SW-Source: 1999-02n/msg00082.html Message-ID: <19990228225300.6gTf9DBplK7hvaZMLoddhP3T1pdMNl8G0RjhRqfkFoo@z> >>>>> "Matthias Urlichs" writes: Matthias> The real question is, though, whether there are scheduler or other Matthias> differences between different PowerPC CPUs such that optimizing for any of Matthias> them makes sense. (Like the difference between i586 and i686.) Matthias> If there are, an -mtune=FOO option makes sense; if not, it doesn't. The various PowerPC processors are significantly different in their scheduling parameters. Matthias> We need options for controlling (a) which instruction set to assume, and Matthias> (b) which particular CPU to optimize for. Calling (a) -march and (b) -mcpu Matthias> may not be 100% optimal or intuitive, but it's there. I'd name them Matthias> (a) -mbase and (b) -mtune if I felt the need to make the option tags more Matthias> unambiguous. I agree that -mcpu= should not be used to designate a tuning parameter, but -mcpu= is a useful alias combining both -march= and -mtune=. The simplest way to describe the combination is using the particular processor implementation. A processor designation is not an architecture. One could say -march=ppc,ppcgfx -mtune=604 or -march=ppcgfx -mtune=604 (with ppcgfx implying base ppc as well) but why not simply say -mcpu=604? It is useful to say -march=ppc -mtune=750 to utilize the base PowerPC ISA and tune for PPC604, e.g., be compatible with all consumer PowerPC chips but tune for latest processor. Maybe the latter is what GCC should produce for PowerPC by default (as opposed to tuning for PPC601 as it still does). Most users know about the chips, not the optional extensions to the ISA. They would like to specify a CPU and have the compiler produce code that is optimal for that processor -- both ISA extensions and scheduling. One can argue that such a user should know about the various ISA options, but why make it more complicated? IBM's XLC uses the arch/tune combination, but the compiler primarily is targeted at the technical workstation users. GCC handles embedded processors as well, i.e., processors which might exclude the floating-point instructions -- maybe -march=ppcnof? -march= and -mtune= are useful for the knowledgeable power user. -mcpu= is useful for the power user (as a short alias) and the common user (who does not know which processors implement which PowerPC ISA extensions). I do not think that all users should be forced into a steep learning curve to make intuitively optimal use of the compiler nor should GCC start redefining the terms architecture and processor to allow the options to be squeezed down to two from three. All three are useful. All three have meaning. Maybe I have misunderstood the current state of this discussion, but I still see people speaking of only two options, which two are necessary, and how the meaning of the two options should be interpreted. I am voting that we implement all three consistently across all ports. David