This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH/RFC/PR28071]: New scheduler dependencies lists.
- From: Jim Wilson <wilson at specifix dot com>
- To: Maxim Kuvyrkov <mkuvyrkov at ispras dot ru>
- Cc: Vladimir Makarov <vmakarov at redhat dot com>, Ayal Zaks <zaks at il dot ibm dot com>, Andrey Belevantsev <abel at ispras dot ru>, Revital1 Eres <ERES at il dot ibm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 26 Jan 2007 18:57:21 -0800
- Subject: Re: [PATCH/RFC/PR28071]: New scheduler dependencies lists.
- References: <45B5BC60.8000809@ispras.ru>
On Tue, 2007-01-23 at 10:42 +0300, Maxim Kuvyrkov wrote:
> Changes are mostly just a pattern replacement of macros names. Patched
> compiler produces exactly the same output as the original one (except
> for one small thing: removal of DEPS_LIST from rtl.def somehow results
> in different numbering of the registers on ia64 and possibly some other
> architectures. The same occurs if an additional rtx description is
> added to rtl.def. Don't know why this happens, but will be glad if
> someone explained. This behavior is not seen on x86_64 and powerpc).
I was able to reproduce this. Starting with snapshot gcc-4.3-20070119,
configuring for an ia64-linux target, and using sched-deps.i file
generated on an ia64-linux machine. I get different rtl with that
compiler, and a modified compiler with a deps_list2 entry added
immediately after the deps_list entry in rtl.def.
The difference happens in gcse, but it looks harmless. gcse computes
hash codes for expressions, and adds them into a table. It then
searches the table by hash code. The hashes are computed using RTL code
values, see hash_rtx in cse.c, and note for instance that the hash for a
SYMBOL_REF includes the term (unsigned int) SYMBOL_REF << 7. So changes
to the rtl.def file cause the hash codes to change, which cause entries
to appear in the gcse hash table in different orders, which causes them
to be optimized in different orders, which results in the different
pseudo register usage.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com