From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id 0123F3858C39 for ; Fri, 18 Aug 2023 23:24:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0123F3858C39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1bf48546ccfso6737645ad.2 for ; Fri, 18 Aug 2023 16:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1692401049; x=1693005849; 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=4syCDh/u0laITm6Ymmy6M8BTGPw30MgJHINCJN2ePnA=; b=RMcgQ/p+m8LPzdKoF6yhmYieWKsbhOFgaz6aMLOwk19QznraaYtRKIcbUK8lq5RCsD Gw6/GzLa2uop642AgoCBhTf+v8EPXfm0idasKBWPgKQnbpuA30XHABEYeR+YlOgaqViV nl8igjGlCK7Bqca1FWQXoWrWSyJW5F0rD93r6ZFyKd9YZLV66xm+tYZYzGtoIrYbcsro 3M7b7isKOY219YQNxsQ0p4dIFy3O0nSoElr9oF/t5TSr0K1GBEOGYCVkVcCooN7aNcxw LQxnPDB+L57b3Awo5zqX6YqqTHEgGGjHP7YMML9xWyBXKSTL35fIIz0e+NFKuTsBEKqI CD7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692401049; x=1693005849; 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=4syCDh/u0laITm6Ymmy6M8BTGPw30MgJHINCJN2ePnA=; b=bxSFM4Z9qOA7Oqpah3qBVtXpWnccYamCtjk1J5ndEYVTp2PUXQq/207AKSmt9ftiwD Iw3fQlw7wYuF/jqa6ouWTC3Pjus8aD3wJmHC75E6EwF8hV6vbn+Q/UbqiAJzipblYc/d +lE0AZp5vQPGR5ZFkr8Jdvoj+uaF9kYTKGe+O+4PM8Udn9cEi0FvKT8e3uUV9ooMHnSl 2fSjDUnonGUUK1knVDLSHIjif8h62dyY4ssMgFFtmbr95R0xQpAgZObVpd4GGwfPKphv 8mHeNySUzAOw6U4xoX6YFcXu+N/et3qDtoqpcTnn63crgnod4ezm8z/0fEomABIPBPOc P0LQ== X-Gm-Message-State: AOJu0Yzu+9dHNelW19a17/SHlKrrKEA+yOfD1utKMrmTPoHqbeNWTUMA 3AmtPZdYhDuxtUikwRChKlkRrw== X-Google-Smtp-Source: AGHT+IG7Ev77g7S0Gg8mp+HesrI7Qjm4QK5/AlXSqMkWMI4BCNADOvEygBNJ6R1V8RlNpaNjpet1fA== X-Received: by 2002:a17:902:744a:b0:1be:f2a1:22e1 with SMTP id e10-20020a170902744a00b001bef2a122e1mr537637plt.53.1692401048978; Fri, 18 Aug 2023 16:24:08 -0700 (PDT) Received: from [192.168.50.117] (c-98-210-197-24.hsd1.ca.comcast.net. [98.210.197.24]) by smtp.gmail.com with ESMTPSA id g2-20020a170902934200b001b8052d58a0sm2275732plp.305.2023.08.18.16.24.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Aug 2023 16:24:08 -0700 (PDT) Message-ID: Date: Fri, 18 Aug 2023 16:24:07 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] RISC-V: Enable pressure-aware scheduling by default. Content-Language: en-US To: Jeff Law , Robin Dapp , gcc-patches , palmer , Kito Cheng , "juzhe.zhong@rivai.ai" References: <6c8b8a16-bbf9-b697-0f4c-26a838fb5665@gmail.com> <04b8f9ee-31f6-d699-7acc-acfa1b9102e5@gmail.com> From: Vineet Gupta In-Reply-To: <04b8f9ee-31f6-d699-7acc-acfa1b9102e5@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,KAM_MANYTO,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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 8/18/23 16:08, Jeff Law wrote: >> There is some slight regression in code quality for a number of >> vector tests where we spill more due to different instructions order. >> The ones I looked at were a mix of bad luck and/or brittle tests. >> Comparing the size of the generated assembly or the number of vsetvls >> for SPECint also didn't show any immediate benefit but that's obviously >> not a very fine-grained analysis. > Yea.  In fact I wouldn't really expect significant changes other than > those key loops in x264. Care to elaborate a bit more please. I've seen severe reg pressure / spills in a bunch of others: cactu, lbm, exchange2. Is there something specific to x264 spills ? > >> >> diff --git a/gcc/common/config/riscv/riscv-common.cc >> b/gcc/common/config/riscv/riscv-common.cc >> index 4737dcd44a1..59848b21162 100644 >> --- a/gcc/common/config/riscv/riscv-common.cc >> +++ b/gcc/common/config/riscv/riscv-common.cc >> @@ -2017,9 +2017,11 @@ static const struct default_options >> riscv_option_optimization_table[] = >>     { >>       { OPT_LEVELS_1_PLUS, OPT_fsection_anchors, NULL, 1 }, >>       { OPT_LEVELS_2_PLUS, OPT_free, NULL, 1 }, >> +    { OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 }, Nit2: maybe move this 1 line up to keep LEVEL_1 together, at least the new ones being added. >>   #if TARGET_DEFAULT_ASYNC_UNWIND_TABLES == 1 >>       { OPT_LEVELS_ALL, OPT_fasynchronous_unwind_tables, NULL, 1 }, >>       { OPT_LEVELS_ALL, OPT_funwind_tables, NULL, 1}, >> +    /* Enable -fsched-pressure by default when optimizing.  */ >>   #endif >>       { OPT_LEVELS_NONE, 0, NULL, 0 } >>     }; > Shouldn't the comment move up to before the OPT_fsched_pressure line? Yep I had the exact same first though but then thought it was something deeper. Turned out to be Occam's Razor after all :-) Thx, -Vineet