From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id B5B4B3858D35 for ; Fri, 26 Jan 2024 18:37:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5B4B3858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B5B4B3858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::429 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706294265; cv=none; b=C28I1JH9kT0iOgpuqCpdz1kIIok0Ie6R1Es7j8o72/PgJbuTvgv0xcwVl0oZWKBmDsaa3hIP2+fB+b0ZXeCenacWZXwT/S80TayOGtg3/gW6vu1RS5FbVg0nGiEYVNXrrkc2KQLEkybzaRGNrg7/e6Is6TAmq9Cu4nKVZHGfoAo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706294265; c=relaxed/simple; bh=9dEXgWWfAKD45SwIlcuK6drV119V3yCdUdYyHx1vLbk=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=uUtWEVh6driwgsy27NZU9pb1EgLc9guEzKUe5AxoinOngjxxxs7Y571wpmLQTh3Gq/pjZ1REtQ55kJIGMKEeCwslgb4iWQxvoXhMajQ4y88ubeowEIEslQrKDYF9VcOqRB7DMYlTSbXuYQh+gXUoOuag4cSqAaNzVtBgL3X9u5w= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6ddcfbc569dso448317b3a.3 for ; Fri, 26 Jan 2024 10:37:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1706294263; x=1706899063; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:newsgroups:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=o5cPWePAJyNVITlIiUQKeXiz6sKj+tP2S51VEEyZfP8=; b=cGXqndgDikeYm5FpZK3Ydz5nMt4hg7Z7Db7AFIDcxBYdV794TkHPGKgPkGqgV425cy XKZUinul5Oi1Nxmk8pPrJIloVdovwbxDOjgmFWHX3i2oZkeJI4QrJDj3sEaGVvMuELxK VZ5KGZfnr956IOWw96W7Bp0pbOWyfmFvaXrKOHN1L/gg+xswCGdkPINn8Vy4C7gB6eg0 GwFKz3koESaET3nQIzwARZUUGIKpvP7mWsvXHhNblc9jY+r9tZ+y2U/GIislgLkWWnpk pPwvtvY0Z2HsJRZSRfUlMGPGgZG0sr9CLHY5EDax7r+mKug8dp0SACs1me4RZxZ9lOXq /y/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706294263; x=1706899063; h=content-transfer-encoding:in-reply-to:from:references:newsgroups: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=o5cPWePAJyNVITlIiUQKeXiz6sKj+tP2S51VEEyZfP8=; b=Lt+6fxYFdO2mbH11McER915jkfQ3nZlghH511LrsnZNNnifgVfyu2Ty3DOgbB1+Y3X VP2QWzGgKxRYWpZbfHsnSbsEMHLhaRxXM7baeTbq6A+L3FSY3tvnvIZHKMkbEYjG7zE3 1GPqPtiOT5C5g3fk0Vn9pNdC3vs4g6H9LWnsbE4C5/fFPyI6Dhj8+vPYw/a3YZKlMehE cbh5iFP9Y9XQ4cpl7UwtzLRP1D4gnyzDJHF0y/TDSz9SNRbPXmgn1s7PhIMxkK+OYaTb yhJATHMF0SWxKfrpLC8Y++0LLsAIH5YQv7iQfzK4jVxivLDBFVJ01jtKRUVe7jIfkIH9 9+yA== X-Gm-Message-State: AOJu0Yw3QuoaAC0PXzXU/vyEw/tWbmmeiQDix1e/AF/+pRVygB3E9X3v T9sRg28pYS8+Xt9xU1UpfrqolI+5hM0pgslGzX73dUU4+EEBSB6LIB9YqGZZ7PM= X-Google-Smtp-Source: AGHT+IF4uYoPI84efT+i+bWTYh0SL6nDp73jFxDCjTqalA/c7wIFOUYxdZ7hvWyEtiVamCR/oR2O6w== X-Received: by 2002:a05:6a00:f88:b0:6db:a6b0:34ae with SMTP id ct8-20020a056a000f8800b006dba6b034aemr306431pfb.44.1706294262802; Fri, 26 Jan 2024 10:37:42 -0800 (PST) Received: from [10.0.17.83] ([12.44.203.122]) by smtp.gmail.com with ESMTPSA id h3-20020aa786c3000000b006ddc30172c7sm1400202pfo.30.2024.01.26.10.37.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Jan 2024 10:37:42 -0800 (PST) Message-ID: <82dbc8d0-85e5-4cd1-8953-88571904daec@rivosinc.com> Date: Fri, 26 Jan 2024 10:37:41 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V3 4/4] RISC-V: Enable assert for insn_has_dfa_reservation Content-Language: en-US To: Robin Dapp , gcc-patches@gcc.gnu.org Cc: gnu-toolchain@rivosinc.com Newsgroups: gmane.comp.gcc.patches References: <20240112180844.2005246-1-ewlu@rivosinc.com> <20240112180844.2005246-5-ewlu@rivosinc.com> <30de6dd9-7d97-43b6-9874-c197f5c31659@gmail.com> From: Edwin Lu In-Reply-To: <30de6dd9-7d97-43b6-9874-c197f5c31659@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,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 1/25/2024 9:06 AM, Robin Dapp wrote: >> /* If we ever encounter an insn without an insn reservation, trip >> an assert so we can find and fix this problem. */ >> -#if 0 >> + if (! insn_has_dfa_reservation_p (insn)) { >> + print_rtl(stderr, insn); >> + fprintf(stderr, "%d", get_attr_type (insn)); >> + } >> gcc_assert (insn_has_dfa_reservation_p (insn)); >> -#endif >> >> return more - 1; >> } Oops accidentally left my debugging statements in the patch. > > I was thinking about make the gcc_assert a gcc_checking_assert so, > in case we accidentally forget something at any point, it would > only gracefully degrade in a release build. As we already have > a hard assert for the type the patch (and not many test with > enable checking anyway) this is OK IMHO. > > I suppose you tested with all available -mtune options? I ran the testsuite on all three tunes using linux rv64gcv. generic-ooo had some bugs fixed while rocket and sifive-7-series had around 37 new scan dump failures which I think is to be expected. No ICE's from the hard gcc_assert on any of the tunes so I think it should be fine as is. Edwin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id 25CFE3858CD1 for ; Fri, 26 Jan 2024 18:37:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 25CFE3858CD1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=m.gmane-mx.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 25CFE3858CD1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=116.202.254.214 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706294269; cv=none; b=q0bkyRkYOaeW4QKnZOiaovlvnm92aygvBXtB/PM5wz6YlcN9AHAvez4W99DSlSjtBDBtzx8xeZVsykYSoT4Id+PqtwUoBGXxDQLoCiEpHJimafiAuddR1qh3mHYjEtWV1+gYumTVkH4NG7SqqEGu2zL4txc5fLR4cgVbEKAAi6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706294269; c=relaxed/simple; bh=9dEXgWWfAKD45SwIlcuK6drV119V3yCdUdYyHx1vLbk=; h=To:From:Subject:Date:Message-ID:Mime-Version; b=pwSvN++ywGX1SHdVGOkMXHPBmskxdXnFlQO1XNRnzuGfe3XTeaUDeE2AMT03lx9p3lBnCo//6s220JxxxWnGAiGwupYNAO7juC2l5/MDB7oXhTd+bwpVqv/FBapNrszKjUl7S0/hj1A2YAEkL52Hg7Vc00xMGldGGIjRMLBNBsw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1rTR5G-0008nM-3z for gcc-patches@gcc.gnu.org; Fri, 26 Jan 2024 19:37:46 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gcc-patches@gcc.gnu.org From: Edwin Lu Subject: Re: [PATCH V3 4/4] RISC-V: Enable assert for insn_has_dfa_reservation Date: Fri, 26 Jan 2024 10:37:41 -0800 Message-ID: <82dbc8d0-85e5-4cd1-8953-88571904daec@rivosinc.com> References: <20240112180844.2005246-1-ewlu@rivosinc.com> <20240112180844.2005246-5-ewlu@rivosinc.com> <30de6dd9-7d97-43b6-9874-c197f5c31659@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla Thunderbird Cc: gnu-toolchain@rivosinc.com Content-Language: en-US In-Reply-To: <30de6dd9-7d97-43b6-9874-c197f5c31659@gmail.com> X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Message-ID: <20240126183741.1VAKFMe8Fil0oOj9yzFh0cBMYDouneJnCm1SalJgwLE@z> On 1/25/2024 9:06 AM, Robin Dapp wrote: >> /* If we ever encounter an insn without an insn reservation, trip >> an assert so we can find and fix this problem. */ >> -#if 0 >> + if (! insn_has_dfa_reservation_p (insn)) { >> + print_rtl(stderr, insn); >> + fprintf(stderr, "%d", get_attr_type (insn)); >> + } >> gcc_assert (insn_has_dfa_reservation_p (insn)); >> -#endif >> >> return more - 1; >> } Oops accidentally left my debugging statements in the patch. > > I was thinking about make the gcc_assert a gcc_checking_assert so, > in case we accidentally forget something at any point, it would > only gracefully degrade in a release build. As we already have > a hard assert for the type the patch (and not many test with > enable checking anyway) this is OK IMHO. > > I suppose you tested with all available -mtune options? I ran the testsuite on all three tunes using linux rv64gcv. generic-ooo had some bugs fixed while rocket and sifive-7-series had around 37 new scan dump failures which I think is to be expected. No ICE's from the hard gcc_assert on any of the tunes so I think it should be fine as is. Edwin