public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/47893] [4.6 Regression] 4.6 miscompiles mesa on i686 Date: Fri, 25 Feb 2011 16:41:00 -0000 [thread overview] Message-ID: <bug-47893-4-JFyE7ktgz2@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-47893-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47893 --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-25 16:06:14 UTC --- I guess not including the space added in add_frame_space by the assign_stack_local_1 call in temp_slot's size/full_size, while it would be easy to do (just walk the beginning of the frame_space list looking for slots that overlap with what we'd like to include in size/full_size), would result in too big stack wastage (e.g. in the given testcase suddenly the fn7 and fn2 return slot couldn't be shared, even when it isn't clear if something would actually like to use it or not). Similarly not queuing anything into frame_space lists when assign_stack_local is called from within assign_stack_temp_for_type would kill most of the savings Bernds' original patch had. Perhaps we could add pointers from temp_slots to frame_space list and back, when deciding to reuse an earlier temp_slot in assign_stack_temp_for_type we'd walk the referenced list and remove frame_space entries that overlap it and similarly when assign_stack_local_1 decides it wants to use a frame_space we'd decrease size/full_size of the temp_slot that overlaps it. We could of course try to prefer frame_space slots that don't overlap any temp_slots. Or perhaps don't try to use frame_space slots until virtuals_instantiated, assuming assign_stack_temp_for_type/assign_stack_temp/assign_temp aren't called after virtuals_instantiated is set, then we could just have links from temp_slots to frame_space and not vice versa. OT, on the other side, perhaps add_frame_space could be called e.g. for the padding inserted in expand_used_vars by: /* If the target requires that FRAME_OFFSET be aligned, do it. */ if (STACK_ALIGNMENT_NEEDED) { HOST_WIDE_INT align = PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT; if (!FRAME_GROWS_DOWNWARD) frame_offset += align - 1; frame_offset &= -align; } and perhaps also without -fstack-protector for inter-variable padding (alloc_stack_frame_space - with -fstack-protector it would be a security risk to place spills above any arrays). But this OT isn't stage 4 matter.
next prev parent reply other threads:[~2011-02-25 16:06 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-02-25 12:48 [Bug middle-end/47893] New: " jakub at gcc dot gnu.org 2011-02-25 12:56 ` [Bug middle-end/47893] " jakub at gcc dot gnu.org 2011-02-25 13:07 ` rguenth at gcc dot gnu.org 2011-02-25 13:15 ` jakub at gcc dot gnu.org 2011-02-25 16:06 ` jakub at gcc dot gnu.org 2011-02-25 16:41 ` jakub at gcc dot gnu.org [this message] 2011-02-25 16:41 ` bernds at gcc dot gnu.org 2011-02-25 16:43 ` law at redhat dot com 2011-02-25 17:31 ` bernds at gcc dot gnu.org 2011-02-25 17:36 ` bernds at gcc dot gnu.org 2011-02-25 18:31 ` jakub at gcc dot gnu.org 2011-02-25 19:04 ` jakub at gcc dot gnu.org 2011-02-25 19:26 ` jakub at gcc dot gnu.org 2011-02-26 14:33 ` jakub at gcc dot gnu.org 2011-02-28 17:11 ` jakub at gcc dot gnu.org 2011-02-28 17:30 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-47893-4-JFyE7ktgz2@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).