public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/42641]  New: Random code-generation differences with GRAPHITE
@ 2010-01-07  0:11 rguenth at gcc dot gnu dot org
  2010-01-07 12:43 ` [Bug tree-optimization/42641] " zsojka at seznam dot cz
                   ` (9 more replies)
  0 siblings, 10 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-07  0:11 UTC (permalink / raw)
  To: gcc-bugs

Graphites code generation depends on virtual addresses because we traverse
hashtables (at least) when inserting guard phis from sese.c:insert_guard_phis
which elements are hashed by pointer, sese.c:rename_map_elt_info

A fix is to hash the SSA name instead:

Index: sese.c
===================================================================
--- sese.c      (revision 155678)
+++ sese.c      (working copy)
@@ -78,7 +78,7 @@ debug_rename_map (htab_t map)
 hashval_t
 rename_map_elt_info (const void *elt)
 {
-  return htab_hash_pointer (((const struct rename_map_elt_s *)
elt)->old_name);
+  return SSA_NAME_VERSION ((const struct rename_map_elt_s *) elt)->old_name;
 }

 /* Compares database elements E1 and E2.  */


there is a lot more pointer-hashing done and a lot of hashtab traversals.
They all need to be audited.


-- 
           Summary: Random code-generation differences with GRAPHITE
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: critical
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42641


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-01-08 11:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-07  0:11 [Bug tree-optimization/42641] New: Random code-generation differences with GRAPHITE rguenth at gcc dot gnu dot org
2010-01-07 12:43 ` [Bug tree-optimization/42641] " zsojka at seznam dot cz
2010-01-07 14:14 ` rguenth at gcc dot gnu dot org
2010-01-07 16:07 ` rguenth at gcc dot gnu dot org
2010-01-07 16:10 ` rguenth at gcc dot gnu dot org
2010-01-07 17:53 ` zsojka at seznam dot cz
2010-01-07 17:58 ` sebpop at gmail dot com
2010-01-07 18:01 ` spop at gcc dot gnu dot org
2010-01-07 21:10 ` jakub at gcc dot gnu dot org
2010-01-07 21:30   ` Sebastian Pop
2010-01-07 21:30 ` sebpop at gmail dot com
2010-01-08 11:09 ` rguenther at suse dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).