James E Wilson - Re: Target processor detection (original) (raw)
This is the mail archive of the gcc@gcc.gnu.orgmailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] |
- From: James E Wilson
- To: Richard Guenther
- Cc: Piotr Wyderski , gcc at gcc dot gnu dot org
- Date: Tue, 22 Nov 2005 12:34:29 -0800
- Subject: Re: Target processor detection
- References: <009f01c5ec3a$ee023eb0$df0a0a0a@piotrw> <438267A0.6000506@specifix.com> <84fc9c000511220153k1884273cod05d20aadd0fd937@mail.gmail.com>
On Tue, 2005-11-22 at 01:53, Richard Guenther wrote:
Like f.i. as I proposed in http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00965.html maybe you could comment on that approach. Sofar the feedback was negative, so I didn't yet work further on it.
I fell behind on gcc-patches reading a while ago. My employer has been keeping me busy with customer work, which is both good and bad.
Your proposal is more what I was thinking. It isn't clear how this solves Piotr Wyderski's problem though.
The main problem I see is that we don't have a good argument for adding it now. It is certainly something that would be nice to have, but we don't actually need it yet. You can make a more convincing argument if you have an optimizer pass that uses it.
There is also an issue here of whether we should have builtin functions or a variable to check. The single variable solution may run into trouble later as 32-bits may not be enough for every feature we want to test. The extra overhead at startup may annoy some people that don't care about these features. Using separate builtin functions adds overhead though, as then we might end up executing multiple cpuid instructions, instead of just one in your approach. It isn't clear which is the best approach. If we had optimizer code relying on this stuff, this might help resolve the issue.
By the way, there is already some related code in config/i386/crtfastmath.c. This probably should be updated as part of your patch. With your patch, compiling with -ffast-math, we would be executing two constructors at program startup, both of which are executing cpuid and parsing its result. There should be a better way to do this.
Jim Wilson, GNU Tools Support, http://www.specifix.com
- References:
- Target processor detection
* From: Piotr Wyderski - Re: Target processor detection
* From: Jim Wilson - Re: Target processor detection
* From: Richard Guenther
- Target processor detection
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |