This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/20408] Unnecessary code generated for empty structs
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Sep 2005 12:38:14 -0000
- Subject: [Bug middle-end/20408] Unnecessary code generated for empty structs
- References: <20050310154814.20408.chris@bubblescope.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-09-05 12:38 -------
Life analysis should figure out, that for
(insn 10 9 11 1 (set (mem/s:QI (pre_modify:SI (reg/f:SI 7 sp)
(plus:SI (reg/f:SI 7 sp)
(const_int -2 [0xfffffffe]))) [0 S1 A8])
(reg:QI 58 [ D.1755 ])) -1 (nil)
(nil))
where it notes that reg:QI 58 is dead after the instruction, never
became life before and so remove the set completely, only preserving
the side-effects
(pre_modify:SI (reg/f:SI 7 sp)
(plus:SI (reg/f:SI 7 sp)
(const_int -2 [0xfffffffe])))
someone familiar with flow.c should be able to hack this into
mark_used_reg() in a few minutes :)
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|rguenth at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20408