From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by sourceware.org (Postfix) with ESMTPS id 136FC3858D1E for ; Fri, 10 Nov 2023 21:31:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 136FC3858D1E 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 136FC3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d29 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699651878; cv=none; b=wzDQTd4ZzzNAq+78v0ZcKZPKPhmXHh+JMZwjN6NY6y/NG+7lpEAE0lntZy3nT3qUJBBjhdCRIhSK3q631OqKXprvCYh4Lrh5rJ7ZZ/UolxjTGG2a7Xm0+j1IWAYTKVpO2Lvppp6gaGE7nPKm4zKuR0CyKYCjQjdNDrHj/QsSxJ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699651878; c=relaxed/simple; bh=J1riF70PVWcaIcBU0zz9w0Sb54Qx7JUjhxoHLXG42SY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=jkQTLwXKh4VXjfdstCBCPqY5jKVXE3QthBetOKvhi/zoNEVwru3Em1DqaUwDPgESyVKE0Og4frSMP+QraTd8b4d/CvoYVOXhZcWyw75rXbGiwMSARC/QwunMdpCcFS6YhMA5wVAWr2PopQ/9XVWUVkhT/bHd4LHLDMLGBPwyePQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-7a693d8de75so85177339f.2 for ; Fri, 10 Nov 2023 13:31:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699651876; x=1700256676; 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=wZYFigZ1TBjU7wjcz0RpwOyBDB+gL45k9RSlwkjshQw=; b=ggrGjTctVsmy4bhkxNDLMsZLcQCAPA8Y/UXD9m83dlPWUI1x0PwoMnEE/SqelMDblP j+ZNOJ9lT5q6rTOwTKjV332Hz+iOZkBsA97Wwa0sG5h9TizG1gfGfOJ6dLS7Rh2mEh2i rGtZVHxyhDF7EuPKpeKAAmrEc4s9zvyARjnVATLoJgkUecIWWVuKW7tmyvne0wCRGYBv jcukdkN8PHzWXWzJh21HNXz4VxhEXVlqEtZHruPm+Ajm0Mw1CJrnCa1dzipJ/YZ3FuZM dQZ8Io8FnC2gJV8ksauT2IT2lk2yD+ZVe2Ptc1CgVsSI6y9p8FmN24wvUnZYu25h20P2 PzXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699651876; x=1700256676; 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=wZYFigZ1TBjU7wjcz0RpwOyBDB+gL45k9RSlwkjshQw=; b=xC2OOZ+YLjnDEZMKomNPhK1TUpa4oxF2ZXEdLOSatxdxzFh7ZVxHQT19V59WPIuao/ eg02ytw2jrs0mNFdKvsV8eWwixpaD1lf196I2iGNbFWJn+7kYavpcZXVYElGESs9qi+N 6R/OgzDbKOiXDI14XaaqPPp3JcaV4DPNpz7yzCwikOCMJgayAmZEOHYaGO9dtFsgCVz8 mrPMcbZ82ghjMnQpZrBlHUQuq5HUblNDOkgKAK0+HGkMXh+ACS8WbVRe67QfS5dIalqj WFiSTEjhpVAceMf8TZ3JO18Enlo+TzsjoO8mEIQlzZRlKJwvC5l4gFo+/1EFeYpWjuoq 9V4g== X-Gm-Message-State: AOJu0Yxx9e7a24nIsw3O28NCY8vM++x8FeKo5IOguqlaRxzoBE3pScSM UimUJVfXkTVplx+VTYSa3qHVecy1Efxn+Q== X-Google-Smtp-Source: AGHT+IEk4L8zOPHem/3UUcnSjduWkToFFFxsNiIh3cmhBkbgD+N5YwGKmDjgA7qjyf3L0DaGGeLbmg== X-Received: by 2002:a5e:db48:0:b0:7a6:966b:35a6 with SMTP id r8-20020a5edb48000000b007a6966b35a6mr449801iop.11.1699651876239; Fri, 10 Nov 2023 13:31:16 -0800 (PST) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id o6-20020a5eda46000000b007a6816de789sm51591iop.48.2023.11.10.13.31.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Nov 2023 13:31:15 -0800 (PST) Message-ID: <4bd5dcc7-8117-4c83-a99f-371d57f40cab@gmail.com> Date: Fri, 10 Nov 2023 14:31:14 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 1/4] ifcvt: handle sequences that clobber flags in noce_convert_multiple_sets Content-Language: en-US To: Robin Dapp , Manolis Tsamis , gcc-patches@gcc.gnu.org, Philipp Tomsich , Jakub Jelinek , richard.sandiford@arm.com References: <20230830101400.1539313-1-manolis.tsamis@vrull.eu> <20230830101400.1539313-2-manolis.tsamis@vrull.eu> <6cf3deca-2edc-419a-a66c-b987324e3da9@gmail.com> From: Jeff Law In-Reply-To: <6cf3deca-2edc-419a-a66c-b987324e3da9@gmail.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 10/20/23 01:04, Robin Dapp wrote: > >> But I'm not sure which cases this code is trying to catch. Is it trying >> to catch cases where seq2 "spontaneously" uses registers that happen to >> overlap with cond? If so, then when does that happen? And if it does >> happen, wouldn't the sequence also have to set the registers first? > > In order for sequence costing to be superior to just counting "conditional" > instructions we need to make sure that as few redundant instructions as > possible are present in the costed sequences. (redundant as in "will be > removed in a subsequent pass"). [ ... ] Sounds a lot like a scenario we had with threading. Threading will often generate code in duplicated blocks that will trivially be eliminated. IIRC I had Alex O. tackle that in threading several years back with good success. I don't think he tried to be exhaustive, just sensible in what was likely to be dead after threading. It helped numerous cases where we clearly should have threaded, but weren't because of artificially high costing. It's not a trivial balancing act. Jeff