From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id BA3873858C41 for ; Wed, 20 Dec 2023 18:14:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BA3873858C41 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BA3873858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::129 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703096047; cv=none; b=qyYI/EiraxcrQBwAGg4XeeGKJ+TqkgQKUgmSozs58TFhMolsrrp2zstq71bKsXBnPc0zVCxGNS9qRjVnDCBLHzJBOG3/hW1LsCotp0GPuOFS0ZcPr2F/LnnpTjEIC/+dfOIRTZGdiwe+Q+XWfwixHpM1BKO+tARNeo6Yg5cRaOU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703096047; c=relaxed/simple; bh=9uKCx88cTsX9RANGIRRRRNGQj7X5a5V9DuZsqpoWsgQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=xUHVKTEyTI5fyfH3mXltvAgk9oMxM6GiVdJEohkjqfEGwBRSu2pWo7S3QI/ul0hrRU0CHAywb5f/nTEwn4xrW2a1LxZhTILR1PGxWnwvL/v+14VRkWl8QQ+CL0gKWxE07HqjtknFmzoXm+R4/F8ZwfZrZYf1gntAUgeLZEpEV5I= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-35fc5ebb4aaso8757665ab.2 for ; Wed, 20 Dec 2023 10:14:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703096045; x=1703700845; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=SOS8/JkAZIPsSfmEGuPHFqxShHpV+uFFDFZVVNriLls=; b=Go5fEJA+4Xh1Eh9ug2rFU4pWfC9DdYKBdGxEPafAQtywLXlTq3VoMwIu22L8/ujRiN oZGlqxpg+ZCuGsyzI/pJvw9GYrR6TYt7rYQIVn99CKJPjSSJPZsJIV4bz806zYhyKxIX PFGqVO8V0teT8WEVWbNc3btJdwcPFmY3ZxoJetXn5bIQDVk0mTZQHzXcd6gsS2xwLrc1 ScA8aVMzMP4ZWR9puqReFJ2QTOb5IgRzkaI0h1i9XM27FTO8+dRTwjKgsVe7/yY/XE9R woOOm2/LJNWW/oxaUwNlr2KwO5u5hjVw1oh2SN7C2fDHAoPiUByOvDNZGncqn9Wp8r93 yDoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703096045; x=1703700845; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SOS8/JkAZIPsSfmEGuPHFqxShHpV+uFFDFZVVNriLls=; b=pab07uCqxRz0qoNlqFLnmQqVagVFUyc1GJee3taUuMKq/+c55XXAG9n8n/rzUawIhU skTBP2jyGrvuMCmhq/9rPBxGNxfG2DGUOw06dskGkDpJ/5JKIbxMMG8GUbAU3Nz6EyfA 5hKsiNIe27BabiN6e9yxwZbI3m/6jSf7Tt326x/na3r4HbS6ooN/B2o/QrSzdFNFPk1c pASR9JVy4hoJwflc7+HuvJ3N1IvSb6m85tCc2k8BU8tdBs3pPyvhrajmKgLPK6L5ykax 3Q07cHCQsOw1pJBXwCx5vyST4hCxHccbiEwuhIIlSCojNygqpim0bDTaJpRawBTsPKEt 9s0A== X-Gm-Message-State: AOJu0Yz81hkxzS7z31OQ/5HEORzNSiqaadEvwHj3ycAOOWy/cV41dKTA qfFixAT2nyy2dr4YXPOcArA8KcnLEFM= X-Google-Smtp-Source: AGHT+IHWkDtxBBZj4WKnRcou9PsGVduSxry9qY4CAOF6tzvCXHvaKW6oKLqe0VfK2bMBX9KNMWMwkQ== X-Received: by 2002:a05:6e02:188d:b0:35d:5995:7990 with SMTP id o13-20020a056e02188d00b0035d59957990mr32644226ilu.42.1703096044943; Wed, 20 Dec 2023 10:14:04 -0800 (PST) Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id v16-20020a92d250000000b0035d6559c5b9sm8444ilg.64.2023.12.20.10.14.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 20 Dec 2023 10:14:04 -0800 (PST) Message-ID: <17803c66-3aa8-4b8a-b1bb-66a6cac727e6@gmail.com> Date: Wed, 20 Dec 2023 11:14:03 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/6] RISC-V: Refactor riscv-vector-builtins-bases.cc Content-Language: en-US To: "Jun Sha (Joshua)" , gcc-patches@gcc.gnu.org Cc: jim.wilson.gcc@gmail.com, palmer@dabbelt.com, andrew@sifive.com, philipp.tomsich@vrull.eu, christoph.muellner@vrull.eu, juzhe.zhong@rivai.ai, Jin Ma , Xianmiao Qu References: <20231220122055.343-1-cooper.joshua@linux.alibaba.com> <20231220122548.396-1-cooper.joshua@linux.alibaba.com> From: Jeff Law In-Reply-To: <20231220122548.396-1-cooper.joshua@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 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,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 12/20/23 05:25, Jun Sha (Joshua) wrote: > This patch moves the definition of the enums lst_type and > frm_op_type into riscv-vector-builtins-bases.h and removes > the static visibility of fold_fault_load(), so these > can be used in other compile units. > > gcc/ChangeLog: > > * config/riscv/riscv-vector-builtins-bases.cc (enum lst_type): > (enum frm_op_type): move to riscv-vector-builtins-bases.h > * config/riscv/riscv-vector-builtins-bases.h > (GCC_RISCV_VECTOR_BUILTINS_BASES_H): Add header files. > (enum lst_type): move from > (enum frm_op_type): riscv-vector-builtins-bases.cc > (fold_fault_load): riscv-vector-builtins-bases.cc I'm largely hoping to leave the heavy review lifting here to Juzhe who knows GCC's RV vector bits as well as anyone. Just one small issue. Would it be better to prototype fold_fault_load elsewhere and avoid the gimple.h inclusion in riscv-vector-builtins-bases.h? Perhaps riscv-protos.h? You might consider prefixing the function name with riscv_. It's not strictly necessary, but it appears to be relatively common in risc-v port. Thanks, Jeff