From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 20AFB385697B for ; Thu, 14 Sep 2023 12:09:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 20AFB385697B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694693370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zR8/v+N5go+WeFk3Eli0xidDCsPi9bm154XGpIaNKc8=; b=GOZeArcRD3KHnk13Zj6TBVWKIxWcIfPHMa5uc748eElRSagO7aX+oH5sEg+VCJaFzzjvSz 2vm20Fpox0Z2waqHsGVgp07IM0hTH7cSQN7Yhr7nGP3E/JkTOsYYqoU4MQwT8blVj6SfBi 6rmQO5YMjhBgn2VjvBfTDxWXYREtaOo= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-496-n54f0ZH0OZu35eIUv2z6sg-1; Thu, 14 Sep 2023 08:09:29 -0400 X-MC-Unique: n54f0ZH0OZu35eIUv2z6sg-1 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-76e015eb1c9so109724085a.3 for ; Thu, 14 Sep 2023 05:09:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694693369; x=1695298169; 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=zR8/v+N5go+WeFk3Eli0xidDCsPi9bm154XGpIaNKc8=; b=ELF9Q91SLv1whXpWS8O+QKad8l1MK26gzCI0GEKBzkstsJPPWwU/2sjcTVDadbO4VW mWc7MhrQfe/1qGz4lfy64gWqLir8gIfFaDPOmd9JZHoqTIj0LQU3b2gxt2lLbK43EC8o rqyUGo1XgNOVhc8I/6Bwt0pBRPxPFUMU1JvAGRrFP3AEHJVuIXvHX6xORzmLtEQSZzoX cR0uANSjXbSyR3VsSvPHokSCLPHF+nqY/J2/4ETFiPRfZn8Kt+t6JALhlfu/IP2HuPx9 SqT6Jbti05+0JSK6qBqaz+KmsFpJd8w2aFJe8oCWdToLlvG1mrfFPwCjPicXPLWFnZKC 2gtA== X-Gm-Message-State: AOJu0YxemYVqi9hvNkII0sw3tPH4p23Mtz10Tn2eS7AEpoPQaNM68xt1 ueGNV+lNOkv40kZtwbeQcAfM2k72etBedgDr3SWquYrs0vTuMR/Ii6ozexTr/HRGoudj0CeNtcL IAG700wGp4rCzQAYcbQ== X-Received: by 2002:a05:620a:bc9:b0:771:31c:adcb with SMTP id s9-20020a05620a0bc900b00771031cadcbmr5539600qki.7.1694693368960; Thu, 14 Sep 2023 05:09:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFxW/NwS6BIUYJirb/rFE4RzmAnEN2Xa7Oe1qLc93BiepS8TPJOaRyHfHohYrMcoVaXf6HxZg== X-Received: by 2002:a05:620a:bc9:b0:771:31c:adcb with SMTP id s9-20020a05620a0bc900b00771031cadcbmr5539580qki.7.1694693368739; Thu, 14 Sep 2023 05:09:28 -0700 (PDT) Received: from [192.168.1.88] (192-0-143-139.cpe.teksavvy.com. [192.0.143.139]) by smtp.gmail.com with ESMTPSA id z4-20020a05620a100400b00767303dc070sm432030qkj.8.2023.09.14.05.09.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Sep 2023 05:09:28 -0700 (PDT) Message-ID: <69b3b8de-c7b0-6993-2f61-ba63a4600687@redhat.com> Date: Thu, 14 Sep 2023 08:09:27 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 01/13] [APX EGPR] middle-end: Add insn argument to base_reg_class To: Hongyu Wang Cc: Hongyu Wang , gcc-patches@gcc.gnu.org, jakub@redhat.com, hongtao.liu@intel.com References: <20230831082024.314097-1-hongyu.wang@intel.com> <20230831082024.314097-2-hongyu.wang@intel.com> From: Vladimir Makarov In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 9/10/23 00:49, Hongyu Wang wrote: > Vladimir Makarov via Gcc-patches 于2023年9月9日周六 01:04写道: >> >> On 8/31/23 04:20, Hongyu Wang wrote: >>> @@ -2542,6 +2542,8 @@ the code of the immediately enclosing expression (@code{MEM} for the top level >>> of an address, @code{ADDRESS} for something that occurs in an >>> @code{address_operand}). @var{index_code} is the code of the corresponding >>> index expression if @var{outer_code} is @code{PLUS}; @code{SCRATCH} otherwise. >>> +@code{insn} indicates insn specific base register class should be subset >>> +of the original base register class. >>> @end defmac >> I'd prefer more general description of 'insn' argument for the macros. >> Something like that: >> >> @code{insn} can be used to define an insn-specific base register class. >> > Sure, will adjust in the V2 patch. > Also, currently we reuse the old macro MODE_CODE_BASE_REG_CLASS, do > you think we need a new macro like INSN_BASE_REG_CLASS as other > parameters are actually unused? Then we don't need to change other > targets like avr/gcn. > I thought about this too.  Using new macros would be definitely worth to add, especially when you are already adding INSN_INDEX_REG_CLASS. The names INSN_BASE_REG_CLASS instead of MODE_CODE_BASE_REG_CLASS and REGNO_OK_FOR_INSN_BASE_P instead of REGNO_MODE_CODE_OK_FOR_BASE_P are ok for me too. When you submit the v2 patch, I'll review the RA part as soon as possible (actually I already looked at this) and most probably give my approval for the RA part because I prefer you current approach for RA instead of introducing new memory constraints.