From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id 5D5003858C2F for ; Wed, 26 Apr 2023 02:34:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5D5003858C2F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1a92513abebso69390005ad.2 for ; Tue, 25 Apr 2023 19:34:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682476459; x=1685068459; 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=t5zYrdoLJjAcdnYyM2sNjvzR+vj+VvEh46/VvRNF/Zk=; b=A5eutUz49y/FxOKRVOIOfsuSyO+v/FPRcfkVzvxxCeUpL7IGT2mNZkKoIVPTP2+Ihh Cq0jpATuRP+6dbrQN6ljdMM2eGBU7ye0jGZESfYdxsbiwKAPa7mXV17jLgzYuOoRrFcN 5L1120OiDEDMYaR8kMUr7HHdD1EQGL7SFKJlIfnxe3RWDb1HCK0UvJklCnLzfhBLFRUn XL/srqITTyXHJ+AVEdh+mhzaL/0sXlMKqmxc0gRAKEx4c9d4pBw9tGHjxS0Pue7GT0cg Uq3FNIYduKB0yjGw4+zrC+ZcUhiXgW0wPpMKIrtGfOdxdMoehgDaVG5zANIlImwGQEEp uFYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682476459; x=1685068459; 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=t5zYrdoLJjAcdnYyM2sNjvzR+vj+VvEh46/VvRNF/Zk=; b=b0H//WstVZZS2mpM2wM69HubpjECA3nVHT7Jxoz7BZ0wUMUyVK22TmQK16Noq90cbF P9TjRQVOk9pbjmYDBjh4RfbcDj357ZHGIhrb68UVSMY8qSEOC2OifnORooS5lKpkm7RF wyBzVgNb9yi3/334usETVS6IesIvUN7DoaqkBxLW7QyvBkxpGHqNg3NJZZiyiM6wylVk fsuwZSUzBlgJTwz31UKqODnlevfqmhf1s4osI00x9vgLMb3EL5A/SEuUnx4X9mfR4hoy 6dolZzyRAp2Z4FmniMJvgd7yvX7PIggW2qdEWdqTM3zGAgBwaZssU/PEK3coirx9BgHs wWTQ== X-Gm-Message-State: AAQBX9dgIHCQa9RJnWTmYDVL9+T7WfK93YDxIf3pnZWRvRVs7JQWoPEr puNz0/3+Ya26yCxOlSLd9js= X-Google-Smtp-Source: AKy350a+OGpJO8jeGBxvYvJozEkxp+w+Jrljl1zgK/yHMlESzM5Jc3kJjNkKGei7eEENWjfJBQlf6w== X-Received: by 2002:a17:902:8215:b0:1a5:5e7:a1cc with SMTP id x21-20020a170902821500b001a505e7a1ccmr17793056pln.58.1682476459158; Tue, 25 Apr 2023 19:34:19 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::99f? ([2601:681:8600:13d0::99f]) by smtp.gmail.com with ESMTPSA id b11-20020a170902d50b00b001a67a2dae7fsm491756plg.266.2023.04.25.19.34.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Apr 2023 19:34:18 -0700 (PDT) Message-ID: <6116962e-f273-2d5a-93ff-2408dc4a4cea@gmail.com> Date: Tue, 25 Apr 2023 20:34:17 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] PR tree-optimization/109417 - Check if dependency is valid before using in may_recompute_p. Content-Language: en-US To: Andrew MacLeod , Richard Biener Cc: gcc-patches@gcc.gnu.org References: <428a4619-9653-ff0b-8092-25efc933ba80@gmail.com> <9c61bac0-b3ae-98e6-8abf-5a092db98f64@redhat.com> From: Jeff Law In-Reply-To: <9c61bac0-b3ae-98e6-8abf-5a092db98f64@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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 4/24/23 07:51, Andrew MacLeod wrote: > > Its not a real cache..  its merely a statement shortcut in dependency > analysis to avoid re-parsing statements every time we look at them for > dependency analysis > > It is not suppose to be used for anything other than dependency > checking.   ie, if an SSA_NAME changes, we can check if it matches > either of the 2 "cached" names on this DEF, and if so, we know this name > is stale.  we are never actually suppose to use the dependency cached > values to drive anything, merely respond to the question if either > matches a given name.   So it doesnt matter if the name here has been freed OK. I'll take your word for it. Note that a free'd SSA_NAME may have an empty TREE_TYPE or an unexpected TREE_CHAIN field IIRC. So you have to be a bit careful if you're going to allow them. > > >> We never re-use SSA names from within the pass releasing it.  But if >> the ranger cache >> persists across passes this could be a problem.  See > > > This particular valueswould never persist beyond a current pass.. its > just the dependency chains and they would get rebuilt every time because > the IL has changed. Good. THat would limit the concerns significantly. I don't think we recycle names within a pass anymore (we used to within DOM due to the way threading worked eons ago, but we no longer take things out of SSA form to handle the CFG/SSA graph updates. One could even argue we don't need to maintain the freelist and recycle names anymore. Jeff