From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id 2462E3858D1E for ; Tue, 25 Apr 2023 18:30:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2462E3858D1E 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-ej1-x636.google.com with SMTP id a640c23a62f3a-95316faa3a8so1143967566b.2 for ; Tue, 25 Apr 2023 11:30:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682447456; x=1685039456; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=rcWNtAA65rT1XoD1aH51oKajz516GDoXVoHE5Jpe+gI=; b=sO20/tSStgKhEgRWf371cKh8/Ezx2aPo5W5DCrNxnxu9MAsPytpwlG4Cxjy6D57Mfy 4fHPb1hJ2WYN+gSpVFYs9hQrdvssIznsPn3WpWev4lC77Fl7JgEzhhmJDt8DSf6ci/SM 99Y+m5WHgapt1BVLk9xhskl1D8JnsNP1ItqjxafhPNkl9OlJUk4s5XucFL2GHE/MQEKa au0M1sxPYIeUK2EkBlHZMucW3dvSf5c8ZxUJWKM5ZXQr3XwH7096uHvK3xwp2VQaLMGu T62Mh6ucXAoqfUuUyHyZo/iyFuj2Ftq/B3h0sQuA7q4O1kY02+inwhEJklBn4y8zbRDt U79w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682447456; x=1685039456; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rcWNtAA65rT1XoD1aH51oKajz516GDoXVoHE5Jpe+gI=; b=eidcRI8QsNbTMN+cSxhOnMCnJtV9d97d711ABDGrKLJNc5iB+CKIXxVgu9pfBZlptq jEwmTQb239Ed5GRCHxk0kiTaaTW0rPB3xc+G4mUMeWEbhVwCT1xIyrh/3kEJ50Eo/XUC hp4VzeU5DjAkAFHLit0Sej7FFcw7M+82pW2Bk7htDcVY/3zP0P1eQ+rWeRdB4NZ2dVI6 eay3YrMVxgeedtGGhtwlK+hTWb3+VvTRdtrANNlXxmzcVa5stSxkZiv8aMOxRB2Bi7Ds hBl8u9Ak+Iq5DzN3Yw3sLrd/xeTexv9a3B4VDzLkTh6AoRQRsy+LmlXUnfzQEt3VCMxV S7zw== X-Gm-Message-State: AAQBX9fCzFvKs4m3s8nqGFc8C6PPGwbX4eB9pTT8FbNCpWVMRJTgBw0G IrHVaJLx7QUt+vS/KaGcwuE= X-Google-Smtp-Source: AKy350aqL84WU0E2HZEadF4UfeRWrqg6nDtXx2yyep+t4Dw+76ezJHK98eAZT+jIxe5Q8ERo6wLiBw== X-Received: by 2002:a17:906:6447:b0:94f:2bd0:4780 with SMTP id l7-20020a170906644700b0094f2bd04780mr12701371ejn.58.1682447456048; Tue, 25 Apr 2023 11:30:56 -0700 (PDT) Received: from [127.0.0.1] (80-110-214-113.static.upcbusiness.at. [80.110.214.113]) by smtp.gmail.com with ESMTPSA id d15-20020a170906040f00b0092b8c1f41ebsm6915311eja.24.2023.04.25.11.30.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Apr 2023 11:30:55 -0700 (PDT) Date: Tue, 25 Apr 2023 20:30:50 +0200 From: Bernhard Reutner-Fischer To: Richard Sandiford , Richard Sandiford via Gcc-patches , juzhe.zhong@rivai.ai CC: gcc-patches@gcc.gnu.org, rguenther@suse.de Subject: =?US-ASCII?Q?Re=3A_=5BPATCH=5D_VECT=3A_Add_decrement_IV_iterati?= =?US-ASCII?Q?on_loop_control_by_variable_amount_support?= In-Reply-To: References: <20230425134229.181115-1-juzhe.zhong@rivai.ai> Message-ID: <5E8FADD7-5606-49BF-BC88-12A54E711EAB@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 25 April 2023 18:58:10 CEST, Richard Sandiford via Gcc-patches wrote: >juzhe=2Ezhong@rivai=2Eai writes: >> diff --git a/gcc/internal-fn=2Ecc b/gcc/internal-fn=2Ecc >> index 6e81dc05e0e=2E=2E5f44def90d3 100644 >> diff --git a/gcc/tree-ssa-loop-manip=2Ecc b/gcc/tree-ssa-loop-manip=2Ec= c >> index a52277abdbf=2E=2E54845a62298 100644 >> --- a/gcc/tree-ssa-loop-manip=2Ecc >> +++ b/gcc/tree-ssa-loop-manip=2Ecc >> @@ -59,14 +59,14 @@ static bitmap_obstack loop_renamer_obstack; >> void >> create_iv (tree base, tree step, tree var, class loop *loop, >> gimple_stmt_iterator *incr_pos, bool after, >> - tree *var_before, tree *var_after) >> + tree *var_before, tree *var_after, enum tree_code code) > >The comment needs to be updated to describe the new interface=2E Just cosmetics, but please omit the redundant "enum"=2E > >This is personal preference, but: I think the interface would be >clearer if the code argument came between the base and step, >so that the order matches a SCEV=2E The code could no longer be >a default argument, and so all callers would need to be updated, >but IMO that's OK=2E Not sure what others think though=2E > >> { >> gassign *stmt; >> gphi *phi; >> tree initial, step1; >> gimple_seq stmts; >> tree vb, va; >> - enum tree_code incr_op =3D PLUS_EXPR; >> + enum tree_code incr_op =3D code; Likewise here=2E If you touch such lines, please omit the redundant "enum"= =2E I don't have an opinion on the patch itself=2E thanks,