From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by sourceware.org (Postfix) with ESMTPS id C50103858D3C for ; Wed, 1 Sep 2021 00:23:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C50103858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-lj1-x230.google.com with SMTP id i28so1819627ljm.7 for ; Tue, 31 Aug 2021 17:23:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kLBS2dKcu6GZRsD0eoDu4HyNGTsTfDyNuNpPxyxTKcY=; b=gMTus/pYPIM7Fno3ciMmxnshPzpEeCrOLrTi+Dx5D49W+/Bi3RuO4pAeF3rpoU8ysH S6RrU9y0I1a0hE53mFN32lAm7MSck2ZywYJXTGUuH2gCEgvSikDDU1DmZ9PPBSz9bkJM +FJ31X2+vqWsdp9Ov5fWevA7Mma3A/GM1aOMbonOijXsUmW3QVzJYRmFYo8NlerLLxoi sROPuDDrxxcP8it/YfNaAhf5t9ADHUA+qJgLOmWMNqJI32HwqKcwCYlA5SgIMfXDd5JR SMzx8x6Rf4SUtxlvz+Urs6vrU5zHGXE+yGiCl/J7zcNGkf7elbBg1MIIbfaSVTiFg5Ne 9dQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kLBS2dKcu6GZRsD0eoDu4HyNGTsTfDyNuNpPxyxTKcY=; b=Vxq0aPW/JdLQgG7xl4MJa+nSw1PLsXKgShdUpKluNj+MXzxsfk5kdkCpEENi1NcNEn KWNAf63d9aCqroLH3uRLYqNyrxeyEUT6wXkUODASNgHKZUDY2qXJwDZK9ndiJ4nqLrzL 4LhPydKhBuZn0MUjhXCgYSt2nPuX1gjcdxlFL7BogeNvMB/mGfmMJnfdD6gFL7fcFUmn 4iCN7FycMm2B4H5YYUFMcXLcAijrCU2xuKCh3eAw0fLJz5JllLsFK2Ixk0qjt2S3PQPW 8myTm4R/lefY7peOXKNUI12onBd1OEAI/zncQgzCtbcjUETL1q0cfNzzwNRoPzj5dt5Y 8xFA== X-Gm-Message-State: AOAM533y0nTkBfwaZMBz1Lq+SQ3rN9Xw6SzegXXReHD8+ggnPuXKOjuZ WEZjjs2yNcE4sx7JdaxRNZf7X7wzULV2VBD3L/vU+Q== X-Google-Smtp-Source: ABdhPJxCSjV94eoPI+/gQp9BIb0Wd59Ng3yxH7qmgwsCfiq1e3AlqhCnUXhZQM3Nwf+Pin9FfpcETXUoI6so74rF3fE= X-Received: by 2002:a2e:a363:: with SMTP id i3mr27204797ljn.86.1630455834463; Tue, 31 Aug 2021 17:23:54 -0700 (PDT) MIME-Version: 1.0 References: <20210721092810.66070-1-kito.cheng@sifive.com> <20210721092810.66070-3-kito.cheng@sifive.com> In-Reply-To: From: Jim Wilson Date: Tue, 31 Aug 2021 17:23:43 -0700 Message-ID: Subject: Re: [PATCH 2/2] RISC-V: Implement TARGET_COMPUTE_MULTILIB To: Kito Cheng Cc: GCC Patches , Kito Cheng X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, MANY_SPAN_IN_TEXT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 00:24:06 -0000 On Tue, Aug 31, 2021 at 5:22 PM Jim Wilson wrote: > On Wed, Jul 21, 2021 at 2:28 AM Kito Cheng wrote: > >> Use TARGET_COMPUTE_MULTILIB to search the multi-lib reuse for >> riscv*-*-elf*, >> according following rules: >> > > I find the other_cond support a bit confusing. Is this for -mcmodel > perhaps? Why not just say that if so? > > match_score: > weigth -> weight > > riscv_multi_lib_info_t::parse > Calls riscv_subset_list::parse twice when path == ".", the call inside > the if looks unnecessary. > > riscv_multilib_lib_check: > Can't found -> Can't find > > riscv_check_other_cond: > might got -> might get > > riscv_compute_multilib: > bare-matel -> bare-metal > decition -> decision > dection -> decision > > It isn't clear how the loop with the comment "ignore march and mabi > option in cond string" can work. It looks like it computes other_cond, > but assumes that there is at most one other_cond, and that it is always > at the end of the list since otherwise the length won't be computed > correctly. But it doesn't check these constraints. Do you have examples > showing how this works? > And maybe a little better commentary explaining what this loop does to > make it easier to understand. It doesn't mention that it computes > other_cond for instance. > Otherwise it looks OK to me. Jim