From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by sourceware.org (Postfix) with ESMTPS id 1A7C93858C27 for ; Fri, 4 Aug 2023 06:35:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1A7C93858C27 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2b9d3dacb33so27630561fa.1 for ; Thu, 03 Aug 2023 23:35:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691130915; x=1691735715; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=hBGEKc7rSZTpvedHjhAe649scGQiSVOMAy1ygMesL4U=; b=dvLsePr3UGTiLk70W8uwKUns7r9qn6QDPhkYkaGVaeWx+UggUeBO7Ztp0xnmM4/3YW EWT5lo7hWiqP3ax3WeLWo093aPb6v61EqVhE7OdDqvexJV4i365d6vxHeCVP889HqfCx kr61I8wbvKvqNoKK+xLJNtM2TiOpDPe2B77CYMjaKbs/Q7+p+MlVFQ8AnMne9zgZiY/h hKgGCkPdAXglSWN4N9B7ZONWIVStyfl6auGx4g8CaAYtevp0wJCSnhbBu6LgrQP3iu/5 aaqEvy7HlIuEZYMVD3ANVq83AfCOnm7Fj+k8o9XtmXMJCOYVS/7WwrAM89fU1BQQGle+ hMlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691130915; x=1691735715; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hBGEKc7rSZTpvedHjhAe649scGQiSVOMAy1ygMesL4U=; b=UfNqW4YLSmtVk498frhI2P3JC2n3QUK/XloqXc7j4AFJmmOfsIHZGPOD168yU4BHEd UeGTFgu+nK3J3eNlt+bGXPE4brYyZL9kTolX3UdbsYiu9s/f6eseI6eUj2H10ZVuNeOu xw0PC/JvYiYk7sUJqAC/wQ434yRLVFE99Lwq7uOmkVTLEtjb8P7vS4fRRGoc/4e0jxHk 98c39wICGhIRouvLB75I+pyR7kHK3H+pMUrHKIIsTAOw0JermnrffMCbRlI+wvwmyU3B Apkyn38xOkHobpphMt5AKwcv6CSNFFUufBVUaNTMFKyHRxiiSu8mgc20bmeoDqFtTyDo /OQg== X-Gm-Message-State: AOJu0YxuSK0bQ+F/DmP46XHVdtMqp0ZFTTnFgidWV6gHN588UXMAMjBc VrUJnUaodOBq3amry68qg+iRIBWX5IlL5roG09A= X-Google-Smtp-Source: AGHT+IG4rfxZET+VZwuTPlrcmx4ZP2flZe7npwFx0WHWd++Nxnq4DQkWBvWA8s7WxUkzBLj4waPpvqNK1SbVA9AxAbA= X-Received: by 2002:a2e:6a12:0:b0:2b6:9afe:191c with SMTP id f18-20020a2e6a12000000b002b69afe191cmr719985ljc.7.1691130915027; Thu, 03 Aug 2023 23:35:15 -0700 (PDT) MIME-Version: 1.0 References: <2ecea360-f45e-57c0-aa99-bbb2b55e91bb@ventanamicro.com> <7b5724c0-aedd-2836-26a9-e700ccd79200@redhat.com> In-Reply-To: <7b5724c0-aedd-2836-26a9-e700ccd79200@redhat.com> From: Richard Biener Date: Fri, 4 Aug 2023 08:35:03 +0200 Message-ID: Subject: Re: Fix profile upate after vectorizer peeling To: Aldy Hernandez Cc: Jeff Law , Jan Hubicka , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Aug 3, 2023 at 5:12=E2=80=AFPM Aldy Hernandez wr= ote: > > > > On 8/3/23 16:29, Jeff Law wrote: > > > > > > On 8/3/23 08:23, Jan Hubicka wrote: > >>>> Jeff, an help would be appreciated here :) > >>>> > >>>> I will try to debug this. One option would be to disable branch > >>>> prediciton on vect_check for time being - it is not inlined anyway > >>> Not a lot of insight. The backwards threader uses a totally > >>> different API > >>> for the CFG/SSA updates and that API I don't think has made any > >>> significant > >>> effort to keep the profile up-to-date. > >> > >> OK, at least some hints where the missing profile updat should be, wou= ld > >> be good. There is update_profile in tree-ssa-threadupdate and > >> understaning what is missing would be nice > >> In general it would be nice to mind profile when updating CFG :) > > THe backwards threader doesn't use much of the code in > > tree-ssa-threadupdate IIRC. The bulk of the work for the backwards > > threader is done by copy_bbs. I've actually suggested those two > > implementations be totally separated from each other to avoid confusion= . > > I just haven't had the time to do it (or much of anything with > > threading) myself. > > A couple cycles ago I separated most of code to distinguish between the > back and forward threaders. There is class jt_path_registry that is > common to both, and {fwd,back}_jt_path_registry for the forward and > backward threaders respectively. It's not perfect, but it's a start. Yep, it's back_jt_path_registry::update_cfg / duplicate_thread_path that lacks the updates. Richard. > Aldy >