From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2d.google.com (mail-oa1-x2d.google.com [IPv6:2001:4860:4864:20::2d]) by sourceware.org (Postfix) with ESMTPS id 16612385800C for ; Sun, 19 Nov 2023 21:51:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 16612385800C 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 16612385800C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:4860:4864:20::2d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700430694; cv=none; b=veRFkwQ4iJLqBEb8rG4TXCGVjjXipDjr715epyP+On7cshPNPMv45NyOcsOE+dbSq3P5e/kH14TE3wvJWMNy50GeRyTpmRIIpORUOSt9fhkG2PhuDdHka/JDpo+GgfsKWvWmceqevqK0Dogsma+OEcrs/m32ToA5bpcclh0PX0k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700430694; c=relaxed/simple; bh=mi/mu9OALCUk81LWN6icj3aOI11784SYvq8Tf74MWdk=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Jvwlhgm8JM5qmGeI38kcz7VEdIq4gZcYuQqo4CaO5lZGu+j2pUTs78faImYMNQ3WgNirqLVEAoRe+Nwaf4BoeYkCehoDgo7HCrThjZPEKxLDN4VHw5H6dzle6ZO5TZ+JHFcJILCbtouBL9emd92fmNs5C6FeDf/RJ/M/+CbjUGQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-1f48ad1700aso1878579fac.1 for ; Sun, 19 Nov 2023 13:51:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700430692; x=1701035492; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=hzRlTJhIw9ElwrktCtgKG1yCzmJPzo/r2HvjO/4lW2g=; b=WpBreabYEpj01YrxdkGmPTU4CNjDM3GQeFwk2a0YeK2ra4iSB64fI905ureohgOG7/ 03O/Yy2LjIbCdI/wrj+TIC+qdEGxecJoTpGZhhqkOCSMJ49DPqPSmO+68gncJzlfOZkv 5pTyRrPyBlwjIEOZbALVmk8VNoqAZu8GR43quGbZyULgDsn4GdF9uwMbV7lsDH8tZu0O ngpKY+UggLfF8b3dqe5Ll5HdytiUmOWGWKo6TTuz1vEfoPJS61xpf2PPlngbkO1Wd4jO Ohq5Ns7AVKcsGFHFMVd0I9vBZx8TdciuHkWyEdrIaq0l1qGyg6hK4Ozw22NigMqbt/g6 uxpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700430692; x=1701035492; h=content-transfer-encoding:in-reply-to:from:references: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=hzRlTJhIw9ElwrktCtgKG1yCzmJPzo/r2HvjO/4lW2g=; b=SY1B6r6Tps9tp+v6MecisuQ5aCAdNolvqQyTR5mFSHLp0z12bwqNqu5G9dl+SVAQ86 CueKeWhLkfczAmGd53jRe/P/UJ7obZxTsuwbDwOXrGHrIZwDrgpK7UoOrUePFHW3dJFs G69EB59LClmGkWdLR808+O+5yDVUlrbyikeKGOdYDnfEolftyWwkhBURLznYpaV51rKN wtoUoy8g1Ru3yDoGxmiWvqj+uYLa7TxrcQU0jyUexoQVjBvkcMPQgbOOVEg4yi8KRmAE 6lYjq/RswP2NN22K2WmaoNzyEF40FxtjKUVIIm5A5OqU5Xt2eZvJfEboTSs/e5+AJxpz vCtw== X-Gm-Message-State: AOJu0Yw5uacbRfUKxbJ81mThN6FNqEx0pGz57UdKXeeFL6zEHx1fkJ8k pFtWQgjrbMIDzrShQNOPCZM= X-Google-Smtp-Source: AGHT+IEaMpaVrmxsFAkFp1c0oIo37X2LLOM2hDB2RXhMElJeuZySOkvLH7cmjH65T8hbNfOadPl5eA== X-Received: by 2002:a05:6870:be88:b0:1ea:3c8e:4673 with SMTP id nx8-20020a056870be8800b001ea3c8e4673mr2829791oab.8.1700430692301; Sun, 19 Nov 2023 13:51:32 -0800 (PST) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id tp12-20020a0568718b8c00b001d4c5e4c2c5sm1095245oab.25.2023.11.19.13.51.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Nov 2023 13:51:31 -0800 (PST) Message-ID: <04609c9f-32c9-40aa-afbe-5804d81125e2@gmail.com> Date: Sun, 19 Nov 2023 14:51:30 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/5] recog: Handle register filters Content-Language: en-US To: Richard Sandiford , jlaw@ventanamicro.com, vmakarov@redhat.com, gcc-patches@gcc.gnu.org References: <20231112145229.2924713-1-richard.sandiford@arm.com> <20231112145229.2924713-3-richard.sandiford@arm.com> From: Jeff Law In-Reply-To: <20231112145229.2924713-3-richard.sandiford@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 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 11/12/23 07:52, Richard Sandiford wrote: > The main (but simplest) part of this patch makes constrain_operands > take register filters into account. > > The rest of the patch adds register filter information to > operand_alternative. Generally, if two register constraints > have different register filters, it's better if they're in separate > alternatives. However, the syntax doesn't enforce that, and we can't > assert it due to inline asms. So it's a choice between (a) adding > code to enforce consistent filters or (b) dealing with mixes of filters > in a conservatively correct way (in the sense of not allowing invalid > operands). The latter seems much easier. > > The patch therefore adds a mask of the filters that apply > to at least one constraint in a given operand alternative. > A register is OK if it passes all of the filters in the mask. > > gcc/ > * recog.h (operand_alternative): Add a register_filters field. > (alternative_register_filters): New function. > * recog.cc (preprocess_constraints): Calculate the filters field. > (constrain_operands): Check register filters. OK jeff