From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23898 invoked by alias); 4 Dec 2014 18:43:28 -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 23851 invoked by uid 48); 4 Dec 2014 18:43:24 -0000 From: "law at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/64003] valgrind complains about get_attr_length_nobnd in insn-attrtab.c from i386.md Date: Thu, 04 Dec 2014 18:43:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: law at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: enkovich.gnu at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to 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-12/txt/msg00483.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64003 Jeffrey A. Law changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|amylaar at gcc dot gnu.org |enkovich.gnu at gmail dot com --- Comment #14 from Jeffrey A. Law --- Damn Joern, I was looking at this comment in the PA port last night wondering if it was relevant to this discussion: ;; We use function calls to set the attribute length of calls and millicode ;; calls. This is necessary because of the large variety of call sequences. ;; Implementing the calculation in rtl is difficult as well as ugly. As ;; we need the same calculation in several places, maintenance becomes a ;; nightmare. ;; ;; However, this has a subtle impact on branch shortening. When the ;; expression used to set the length attribute of an instruction depends ;; on a relative address (e.g., pc or a branch address), genattrtab ;; notes that the insn's length is variable, and attempts to determine a ;; worst-case default length and code to compute an insn's current length. ;; The use of a function call hides the variable dependence of our calls ;; and millicode calls. The result is genattrtab doesn't treat the operation ;; as variable and it only generates code for the default case using our ;; function call. Is this documented anywhere? I certainly don't recall this restriction, but it does answer one of the questions I'd been kicking around in my head.