This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Detect cache size with -mtune=native
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, jh at suse dot cz
- Date: Tue, 27 Feb 2007 09:45:08 +0100
- Subject: Re: [patch] Detect cache size with -mtune=native
- References: <5787cf470702252329p8a152d1rd1e156b41bb8e323@mail.gmail.com>
Hello,
> >this patch extends -mtune=native to detect the size of the l1 cache and
> >of the cache line, and to pass it to the compiler by params. I have
> >tested this on several machines to that I have access, and the results
> >seem to be correct (but especially the intel way of describing the cache
> >sizes is quite ugly.
>
> >Bootstrapped & regtested on i686.
>
> Did you bootstrap gcc with BOOT_CFLAGS="... -mtune/-march=native ..."
> ?
not originally, I will try it now (although I do not expect any changes,
for the reasons below).
> There were some interesting bugs that blocked this for certain
> targets, but they should all be fixed in recent SVN.
>
> Is there any measurable gain on bootstrap time using this patch?
No; at the moment, the information about cache size is unused. It is
used in reuse analysis pass that I am going to submit soon. Later, it
also should be used in the heuristics to determine usefulness of
high-level loop transformations, although I think nobody works on that
just now.
Zdenek
> Otherwise, I think this is a nice addition to have for i386 targets.
> But let's give Jan the last word, as it also affects x86_64.