public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/38586]  New: quadratic behaviour in find_temp_slot_from_address.
@ 2008-12-20 11:29 jv244 at cam dot ac dot uk
  2008-12-20 15:51 ` [Bug middle-end/38586] " steven at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jv244 at cam dot ac dot uk @ 2008-12-20 11:29 UTC (permalink / raw)
  To: gcc-bugs

This is split off from PR38474 for clarity, see steven's comment #35 in that
PR.

Compiling the testcase of that PR 

(http://gcc.gnu.org/bugzilla/attachment.cgi?id=16873)

should be illuminating


-- 
           Summary: quadratic behaviour in find_temp_slot_from_address.
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: compile-time-hog
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk
OtherBugsDependingO 38474
             nThis:


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


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

* [Bug middle-end/38586] quadratic behaviour in find_temp_slot_from_address.
  2008-12-20 11:29 [Bug middle-end/38586] New: quadratic behaviour in find_temp_slot_from_address jv244 at cam dot ac dot uk
@ 2008-12-20 15:51 ` steven at gcc dot gnu dot org
  2009-01-03  0:38 ` steven at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu dot org @ 2008-12-20 15:51 UTC (permalink / raw)
  To: gcc-bugs



-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |steven at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-12-20 15:46:05
               date|                            |


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


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

* [Bug middle-end/38586] quadratic behaviour in find_temp_slot_from_address.
  2008-12-20 11:29 [Bug middle-end/38586] New: quadratic behaviour in find_temp_slot_from_address jv244 at cam dot ac dot uk
  2008-12-20 15:51 ` [Bug middle-end/38586] " steven at gcc dot gnu dot org
@ 2009-01-03  0:38 ` steven at gcc dot gnu dot org
  2009-01-03 11:52 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-01-03  0:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from steven at gcc dot gnu dot org  2009-01-03 00:36 -------
Created an attachment (id=17024)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17024&action=view)
Add address -> temp slot map

Instead of huge list walks, just look up the address in the hash table and use
the mapped temp slot of the address maps to a temp slot.


-- 


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


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

* [Bug middle-end/38586] quadratic behaviour in find_temp_slot_from_address.
  2008-12-20 11:29 [Bug middle-end/38586] New: quadratic behaviour in find_temp_slot_from_address jv244 at cam dot ac dot uk
  2008-12-20 15:51 ` [Bug middle-end/38586] " steven at gcc dot gnu dot org
  2009-01-03  0:38 ` steven at gcc dot gnu dot org
@ 2009-01-03 11:52 ` rguenth at gcc dot gnu dot org
  2009-01-04  0:16 ` steven at gcc dot gnu dot org
  2009-01-04  0:17 ` steven at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-03 11:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-01-03 11:51 -------
Ok.  Thanks.


-- 


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


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

* [Bug middle-end/38586] quadratic behaviour in find_temp_slot_from_address.
  2008-12-20 11:29 [Bug middle-end/38586] New: quadratic behaviour in find_temp_slot_from_address jv244 at cam dot ac dot uk
                   ` (2 preceding siblings ...)
  2009-01-03 11:52 ` rguenth at gcc dot gnu dot org
@ 2009-01-04  0:16 ` steven at gcc dot gnu dot org
  2009-01-04  0:17 ` steven at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-01-04  0:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from steven at gcc dot gnu dot org  2009-01-04 00:16 -------
Subject: Bug 38586

Author: steven
Date: Sun Jan  4 00:15:58 2009
New Revision: 143041

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143041
Log:
        PR middle-end/38586
        * function.c (struct temp_slot): Move to the section of the file
        that deals with temp slots.  Remove field 'address'.
        (temp_slot_address_table): New hash table of address -> temp slot.
        (struct temp_slot_address_entry): New struct, items for the table.
        (temp_slot_address_compute_hash, temp_slot_address_hash,
        temp_slot_address_eq, insert_temp_slot_address): Support functions
        for the new table.
        (find_temp_slot_from_address): Rewrite to use the new hash table.
        (remove_unused_temp_slot_addresses): Remove addresses of temp
        slots that have been made available.
        (remove_unused_temp_slot_addresses_1): Call-back for htab_traverse,
        worker function for remove_unused_temp_slot_addresses.
        (assign_stack_temp_for_type): Don't clear the temp slot address list.
        Add the temp slot address to the address -> temp slot map.
        (update_temp_slot_address): Update via insert_temp_slot_address.
        (free_temp_slots): Call remove_unused_temp_slot_addresses.
        (pop_temp_slots): Likewise.
        (init_temp_slots): Allocate the address -> temp slot map, or empty
        the map if it is already allocated.
        (prepare_function_start): Initialize temp slot processing.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/function.c


-- 


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


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

* [Bug middle-end/38586] quadratic behaviour in find_temp_slot_from_address.
  2008-12-20 11:29 [Bug middle-end/38586] New: quadratic behaviour in find_temp_slot_from_address jv244 at cam dot ac dot uk
                   ` (3 preceding siblings ...)
  2009-01-04  0:16 ` steven at gcc dot gnu dot org
@ 2009-01-04  0:17 ` steven at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-01-04  0:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from steven at gcc dot gnu dot org  2009-01-04 00:17 -------
.


-- 

steven at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2009-01-04  0:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-20 11:29 [Bug middle-end/38586] New: quadratic behaviour in find_temp_slot_from_address jv244 at cam dot ac dot uk
2008-12-20 15:51 ` [Bug middle-end/38586] " steven at gcc dot gnu dot org
2009-01-03  0:38 ` steven at gcc dot gnu dot org
2009-01-03 11:52 ` rguenth at gcc dot gnu dot org
2009-01-04  0:16 ` steven at gcc dot gnu dot org
2009-01-04  0:17 ` steven at gcc dot gnu dot org

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).