From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5879 invoked by alias); 4 Apr 2014 10:00:06 -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 5784 invoked by uid 48); 4 Apr 2014 10:00:02 -0000 From: "ebotcazou at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/60756] var-tracking selects wrong registers Date: Fri, 04 Apr 2014 10:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ebotcazou at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed 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: 2014-04/txt/msg00285.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60756 Eric Botcazou changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-04-04 Ever confirmed|0 |1 --- Comment #1 from Eric Botcazou --- > The parameter "str" is passed in x0+x1, and immediately copied into > the call-saved registers x22+x23, where they stay for the duration > of the function. > > But var-tracking works (or appears to work) back-to-front, taking > the location of the variable from the src rather than the dest of > a copy. Yes, that's the original design (-fno-var-tracking-assignments nowadays) and the correct approach if you are interested in the location of a fixed quantity. Then -fvar-tracking-assignments reversed the viewpoint to track variable quantities. > At minimum it would seem that taking DECL_RTL into account when > examining these assignments would be a good start. When copying into > its canonical location, it would seem a great time to alter the > live range. Does this work better with -fno-var-tracking-assignments?