From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1036 invoked by alias); 14 Feb 2006 15:53:01 -0000 Received: (qmail 977 invoked by uid 48); 14 Feb 2006 15:52:56 -0000 Date: Tue, 14 Feb 2006 15:53:00 -0000 Message-ID: <20060214155256.976.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/14295] [tree-ssa] copy propagation for aggregates In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-02/txt/msg01549.txt.bz2 List-Id: ------- Comment #6 from rguenth at gcc dot gnu dot org 2006-02-14 15:52 ------- Created an attachment (id=10849) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10849&action=view) simple "cleanup" struct copyprop Attached simple "cleanup" style struct copyprop that is able to clean up useless copys inserted by inlining and gimplification (mostly happens for C++). It handles both tmp = X; Y = tmp; to tmp = X; Y = X; (commented code to remove tmp = X is there, but one needs to somehow check if the store is to a global var - DCE will happily clean up after us though) and tmp = X; X = tmp; to tmp = X; (happens a few times in gcc itself, same comment as above). This looks like a thing we should do after/inside inlining in ssa form. Note that this patch doesn't require dominator information (which would enable us to relax the stmt ordering by checking if the final store dominates all kills of X - i.e. to prevent propagation in the case of # tmpD.1530_3 = V_MUST_DEF ; # VUSE ; tmpD.1530 = aD.1524; # aD.1524_5 = V_MUST_DEF ; # VUSE ; aD.1524 = bD.1525; # cD.1526_7 = V_MUST_DEF ; # VUSE ; cD.1526 = tmpD.1530; as aD.1524 is not in SSA form and so the value used in stmt 1 is no longer available) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14295