Message ID | 0acc23cb-7356-3544-990c-2f6ce5b5372a@redhat.com |
---|---|
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2671918vqr; Mon, 12 Jun 2023 08:33:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6BNbNZ+bWhz+kl1dIQQSHnING5DIktFCQmq0L4o3naJXMY3hQGoTJgTAyHRlTm0JfKl/KR X-Received: by 2002:a17:907:1c05:b0:973:d1cd:933d with SMTP id nc5-20020a1709071c0500b00973d1cd933dmr11252747ejc.47.1686584016387; Mon, 12 Jun 2023 08:33:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686584016; cv=none; d=google.com; s=arc-20160816; b=vECSEAvO5t414MWffb1nSZDw8Ithbtzy3U+qaZZZr6lyVri/zPKgt4kVdhREWfNcdi iAHBIChcuLcQjXcTncffdvb0HtQvoL+2VQfyhLCkpWq/ASoDwnnKRlDhNz6xd3L93BaA raXl91YpZycXire9+x3tZ7v6fTtRVDJzWPJW1NXk0y9Ku45khAwaMKf6LLvBU9Wes7Ug 5ZAp8n8bXHZvbTlwi0bHLlI3GI1Xe7mHhesapo4GPeoomHJaLiflNkwb6ZMYvqABmGC/ 4rdvOxLaPYjey5SHAsby/l1Q1rK7fYubaJUzw4Za7+TQ6IDnJqRueP5yOrfwxiedHvo6 ClJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:content-language:subject:cc:to:user-agent :mime-version:date:message-id:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=U8u3fezfNYyNbJNBTGJRLKfyLKVZo8Q5nnMrEdcz9CA=; b=gQfuZoLf1JbVSZy5kFSKN8OYYfKC/ERGJ0jXxy54JCeZQegK/NPhP8v/4siumjc4XA dH6/uPlqOwnqnZn/Gc44l5Xk5jsJSZAQxVMCA9wP5E5tEh1w91WHurKLislr6271utxk DwIylFXGxoBjFK5u4fkY/lOFpHzn2Kc3GfjscCt9AqICC/hvj2TKonOOCIW7Nq8dGU4w QeFivTIUkueJjOPF7I1pSV9M22Qx0OmMgCxe0WFzT41xwSq6ZfIbAuc+jHAm6hilr1lL DuHZfoaV2hfGIoh4MlYlsj09R6asly50YfiMmD94/SPeYtYJY3+L8yjwMoiTkkT37uP6 XXFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=I8QIE6MD; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id a23-20020a170906469700b0096646da8955si5144897ejr.760.2023.06.12.08.33.36 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jun 2023 08:33:36 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=I8QIE6MD; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E52D138560A4 for <ouuuleilei@gmail.com>; Mon, 12 Jun 2023 15:32:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E52D138560A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686583974; bh=U8u3fezfNYyNbJNBTGJRLKfyLKVZo8Q5nnMrEdcz9CA=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=I8QIE6MDslREteGIuDEODc1WeGOb8gsVhRtxUcg116Qu0iSE6wsHER+A0DbMVtMci mOK6frdWdzw7uLR7lBV2N9ZOB6U8ZwLIacoCXYBnnTuYi0VUHy542uxG3K17tnUUto R8osvOlD/Mp8RWbAKCo5U5XkgI+WOiWe65Bzrjas= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id D71D23858409 for <gcc-patches@gcc.gnu.org>; Mon, 12 Jun 2023 15:32:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D71D23858409 Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-349-btAbszrNNgyJ1f29pWp6CA-1; Mon, 12 Jun 2023 11:32:05 -0400 X-MC-Unique: btAbszrNNgyJ1f29pWp6CA-1 Received: by mail-qt1-f198.google.com with SMTP id d75a77b69052e-3f9f1f27b13so11846771cf.1 for <gcc-patches@gcc.gnu.org>; Mon, 12 Jun 2023 08:32:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686583924; x=1689175924; h=content-transfer-encoding:subject:from:cc:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=U8u3fezfNYyNbJNBTGJRLKfyLKVZo8Q5nnMrEdcz9CA=; b=fstb36gFG585Gr7/Ihxg+WysWJYgcrExvUrglmDQi8AVnnk0Yl0Wr4CuaSnE0gXxwk rLeP4IaGTXH/pSB5ACzF03SoSwcUNmzOUypRCAJcsHtZ9JTPY/E0y2K1wCWB+yVm5MgZ zHs6RwYC/H9o5uCYVUxjO4qI+cgaGoqRVrr1U4UPyQeoAP+dLzj/sXIp2T9ebpmQp91H QA+GNoeX1rcQycyqE6qta3vNd+bOC3M2WgJYsinRg2PTmgqaCveze3MXrAYgeg9i/g56 wpidWNgu1AU1NVQiNokSpYZqYXP67N1NUKSVMRTUmzH+FAqd4F9xF8qXZhDTnuq3gthF uE0g== X-Gm-Message-State: AC+VfDxFhF5A6S+fJbteMbah4eDVb6MJMPwOFPI8vUSsbIGdnFPFuDF0 CL2n/oucKtxK2euEvQasUGOUvOmQ0UXdn+eJY78IW1zP3OS3jhAlhIBf9dcxHPUNNbM0/mNjfzg RTj7mccI6jM/gADBegWqGtBRgZiOZw0QIWEsX/ACsLvSXShfvDm2+Aj0/heWWBkqmUFYakO8m0s gRmQ== X-Received: by 2002:a05:622a:386:b0:3f4:8612:6d84 with SMTP id j6-20020a05622a038600b003f486126d84mr9277800qtx.60.1686583924402; Mon, 12 Jun 2023 08:32:04 -0700 (PDT) X-Received: by 2002:a05:622a:386:b0:3f4:8612:6d84 with SMTP id j6-20020a05622a038600b003f486126d84mr9277780qtx.60.1686583923957; Mon, 12 Jun 2023 08:32:03 -0700 (PDT) Received: from ?IPV6:2607:fea8:51df:4200::ca58? ([2607:fea8:51df:4200::ca58]) by smtp.gmail.com with ESMTPSA id h26-20020ac8549a000000b003e4ee0f5234sm3480714qtq.87.2023.06.12.08.32.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jun 2023 08:32:03 -0700 (PDT) Message-ID: <0acc23cb-7356-3544-990c-2f6ce5b5372a@redhat.com> Date: Mon, 12 Jun 2023 11:31:57 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 To: gcc-patches <gcc-patches@gcc.gnu.org> Cc: "hernandez, aldy" <aldyh@redhat.com> Subject: [COMMITTED 0/17] - Range-op dispatch unification rework 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=-6.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Andrew MacLeod via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Andrew MacLeod <amacleod@redhat.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768511521133468148?= X-GMAIL-MSGID: =?utf-8?q?1768511521133468148?= |
Series |
- Range-op dispatch unification rework
|
|
Message
Andrew MacLeod
June 12, 2023, 3:31 p.m. UTC
This patch set completes the range-op dispatch and unification rework. The first 7 patches move the remainder of the integral table to the unified table, and remove the integer table. The 8th patch moves all the pointer specific code into a new file range-op-ptr.cc Patches 9-12 introduce a "hybrid" operator class for the 4 operations which pointers and integer share a TREE_CODE, but have different implementations. And extra hybrid class is introduced in the pointer file which inherits from the integer version, and adds new overloads for the used methods which look sa tthe type being passed in and does the dispatcxh itself to either the inherited integer version, or call the pointer version opcode. This allows us to have a unified entry for those 4 operators (BIT_AND_EXPR, BIT_IOR_EXPR, MIN_EXPR, and MAX_EXPR) and move on. WHen we introduce a pointer range type (ie PRANGE), we can simply add the prange signature to the appropriate range_operator methods, and remove the pointer and hybrid classes. patch 13 thru 16 does some tweaking to range_op_handler and hows its used. It now provides a default operator under the covers, so you no longer need to check if its valid. The valid check now simply indicates if its has a custom operator implemented or not. This means you can simply write: if (range_op_handler (CONVERT_EXPR).fold_range (... )) without worrying about whether there is an entry. If there is no CONVERT_EXPR implemented, you'll simple get false back from all the calls. Combined with the previous work, it is now always safe to call any range_operator routine via range_op_handler with any set of types for vrange parameters (including unsupported types) on any tree code, and you will simply get false back if it isn't implemented. Andrew