From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17830 invoked by alias); 23 May 2003 20:36:21 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 17822 invoked from network); 23 May 2003 20:36:20 -0000 Received: from unknown (HELO atlrel7.hp.com) (156.153.255.213) by sources.redhat.com with SMTP; 23 May 2003 20:36:20 -0000 Received: from hpda.cup.hp.com (hpda.cup.hp.com [15.75.208.53]) by atlrel7.hp.com (Postfix) with ESMTP id EC0AF1C01B78; Fri, 23 May 2003 16:36:16 -0400 (EDT) Received: from hpsje.cup.hp.com (hpsje.cup.hp.com [15.244.96.221]) by hpda.cup.hp.com (Postfix) with ESMTP id 409624211; Fri, 23 May 2003 13:36:16 -0700 (PDT) Received: (from sje@localhost) by hpsje.cup.hp.com (8.9.3 (PHNE_24419+JAGae58098)/8.7.3 TIS Messaging 5.0) id NAA03842; Fri, 23 May 2003 13:36:11 -0700 (PDT) Date: Fri, 23 May 2003 20:38:00 -0000 From: Steve Ellcey Message-Id: <200305232036.NAA03842@hpsje.cup.hp.com> To: paul.winalski@intel.com, gcc@gcc.gnu.org, rth@redhat.com Subject: RE: gcc and the IA64 ABI X-SW-Source: 2003-05/txt/msg02141.txt.bz2 > > But eliminating caller gp save/restore > > seems to be promising. Early testing seems to indicate significant > > improvement on some important programs; we're still in the process of > > collecting performance data. > > I wouldn't have suspected that this would produce that much of a win, > given that restoring the gp is so cheap; just a single mov instruction. I wonder if the speed up is you are seeing is due to a side-effect of how the GP is saved and restored. GCC on IA64 was (is?) using a single register to save/restore gp and it always used the same register. This made otherwise loop invariant function calls (like integer division with loop invariant arguments) look like they were never loop-invariant and could not be moved out of the loop, especially when there were multiple divisions (all loop invariant) in one loop. See http://gcc.gnu.org/ml/gcc-patches/2002-03/msg00179.html for a change I proposed that allowed loop invariant code motion of calls, this change was not checked in and I believe this situation still exists in 3.3. It may have been fixed on the top-of-tree as the way calls are expanded has been changed and the routine ia64_gp_save_reg no longer exists. See http://gcc.gnu.org/ml/gcc-patches/2003-03/msg01196.html for where that was removed by Richard Henderson. Steve Ellcey sje@cup.hp.com