From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32397 invoked by alias); 30 Jun 2010 18:46:25 -0000 Received: (qmail 32388 invoked by uid 22791); 30 Jun 2010 18:46:24 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from tx2ehsobe004.messaging.microsoft.com (HELO TX2EHSOBE007.bigfish.com) (65.55.88.14) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Jun 2010 18:46:19 +0000 Received: from mail161-tx2-R.bigfish.com (10.9.14.249) by TX2EHSOBE007.bigfish.com (10.9.40.27) with Microsoft SMTP Server id 8.1.340.0; Wed, 30 Jun 2010 18:46:17 +0000 Received: from mail161-tx2 (localhost.localdomain [127.0.0.1]) by mail161-tx2-R.bigfish.com (Postfix) with ESMTP id 211A917503F5; Wed, 30 Jun 2010 18:46:17 +0000 (UTC) X-SpamScore: -1 X-BigFish: VPS-1(zdf5pz1432N4015Lzz1202hzzz32i2a8h43h65h) X-Spam-TCS-SCL: 4:0 Received: from mail161-tx2 (localhost.localdomain [127.0.0.1]) by mail161-tx2 (MessageSwitch) id 1277923576833329_21563; Wed, 30 Jun 2010 18:46:16 +0000 (UTC) Received: from TX2EHSMHS015.bigfish.com (unknown [10.9.14.235]) by mail161-tx2.bigfish.com (Postfix) with ESMTP id 92358BE804C; Wed, 30 Jun 2010 18:46:16 +0000 (UTC) Received: from ausb3extmailp01.amd.com (163.181.251.8) by TX2EHSMHS015.bigfish.com (10.9.99.115) with Microsoft SMTP Server (TLS) id 14.0.482.44; Wed, 30 Jun 2010 18:46:16 +0000 Received: from ausb3twp02.amd.com ([163.181.250.38]) by ausb3extmailp01.amd.com (Switch-3.2.7/Switch-3.2.7) with SMTP id o5UInsP9007021; Wed, 30 Jun 2010 13:50:03 -0500 X-M-MSG: Received: from sausexhtp02.amd.com (sausexhtp02.amd.com [163.181.3.152]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by ausb3twp02.amd.com (Tumbleweed MailGate 3.7.2) with ESMTP id 24A59C8B54; Wed, 30 Jun 2010 13:46:01 -0500 (CDT) Received: from SAUSEXMBP01.amd.com ([163.181.3.198]) by sausexhtp02.amd.com ([163.181.3.152]) with mapi; Wed, 30 Jun 2010 13:46:02 -0500 From: "Fang, Changpeng" To: Richard Guenther , Sebastian Pop CC: Zdenek Dvorak , Christian Borntraeger , "gcc-patches@gcc.gnu.org" , "uweigand@de.ibm.com" Date: Wed, 30 Jun 2010 19:40:00 -0000 Subject: RE: [Patch PR 44576]: Reduce the computation cost in compute_miss_rate for prefetching loop arrays Message-ID: References: <20100630180140.GA32646@kam.mff.cuni.cz> , In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Reverse-DNS: unknown Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-06/txt/msg03185.txt.bz2 >>> Well, but at -O3 the vectorizer computes dependences as well, and it >>> doesn't take that much of time, So there must be something obvious >>> going wrong. >>> >> >> The dependence analysis in the vectorizer is done only in the innermost >> loop that is vectorized, whereas prefetch does the analysis of data deps >> for every loop. >The vectorizer also does dependence analysis for outer-loop vectorization. >I guess prefetch analysis should restrict itself to data dependences on a >maximum loop nest depth (of say 2 or 3). For vectorizer (and tree-loop-linear), we are just lucky that the loop could not be vectorized and dependence analysis was not invoked at all for=20 this loop. For this test case, prefetching is the only pass that invokes=20 dependence analysis. >Still dependence analysis looks overly costly here. Yes, we just understand and reduce the dependence analysis cost. Thanks, Changpeng =20