From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93140 invoked by alias); 10 Mar 2015 22:57:38 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 89358 invoked by uid 48); 10 Mar 2015 22:57:34 -0000 From: "spop at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/65177] [5 Regression]: extend jump thread for finite state automata causes miscompilation Date: Tue, 10 Mar 2015 22:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: spop at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: spop at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg01182.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65177 --- Comment #12 from Sebastian Pop --- (In reply to Jeffrey A. Law from comment #11) > That is unless the SEME copier tries to update SSA internally, but that's > painful. I have also tried to update the SSA only in the copied basic blocks: graphite's code generator in sese.c does exactly that only on the path that has been duplicated. sese.c has its own rename_map. In SEME I was not able to access easily the rename maps set by copy_bb: when copying statements, it sets a map of (old_def, new_def) that are used to rename all the uses dominated by the new definition. We could use this rename map to rename all uses in the copied bbs. I think it would be less painful to fix the SSA in a local way than what the patch that I just sent out does: > From a sequencing standpoint, you do your block copying & wire up the new > blocks. Then you have to remove unreachable blocks, rebuild dominators then > update hte SSA graph.