This is the mail archive of the gcc-patches@gcc.gnu.org mailing 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]

Re: [PATCH/RFC/PR28071]: New scheduler dependencies lists.


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]