From patchwork Wed Jan 25 12:29:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 48141 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp247737wrn; Wed, 25 Jan 2023 04:30:33 -0800 (PST) X-Google-Smtp-Source: AMrXdXtWNAdxKlQVXoA85q3rTrY5S8vsrxkerISIBKX6CvpYUta2U1aYs94bclLcvxlDS9e1Wnnr X-Received: by 2002:a17:907:78c7:b0:877:6534:de25 with SMTP id kv7-20020a17090778c700b008776534de25mr27926169ejc.26.1674649833376; Wed, 25 Jan 2023 04:30:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674649833; cv=none; d=google.com; s=arc-20160816; b=B9ksIL3AHzTLvA0gAo4WRfvdIqLGb4Z1EfamZatUZjcOIJuz7n/oAY/kmHc9t7Y/Ya Whh6e2MpDQDdp41e5UIvA5XLJD46AVHWlaVGEHjj+h+LWe+ZCaEsuIzLFZa3685gWqOn ieEkngAC/UJssOKRCY6abyf1bOY6r2Lm7QhFQscvzX2b02RNGEbUzEIndKhn2FnjQk7/ FBvhEUOLC+lRp/wFyoy8GB1xcMoCsrcshGZbRWNUfvqlYbLTNmfO1up0WuTw3+dj7Bsi Bf+FeKGSZV2TWhUIh7OGG34IaSx/O+mSm0Apxc7Nqkbreh1YbMbTtWqBGNuNf4BdjN3V hqcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:sender:errors-to:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:user-agent:subject:to:date:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=MgtvENTLAKJTJ+yg9fm66gX001KFjUpjGQUFsPOU7Ko=; b=pqh9vE2fpRK2zTr9GSSyvk/BaOYXvepwxjXUjLwKHrmn69U1FJvRuEn2tclD9mjM0s gpW0UtgvJeLXtGua4QazNqkfuzUv5Ia05TJPcMQMkm7Rz6LJrZucmZ6f/AKFD9qFjApt Yu19AeC/02327jWna3gD7FbKlBbT4h5pLWTE4Qeni+A6t+mulTvueE4ixpu8wlRjpphR AvWryBIa+dHFkklzhaaYc1j/+l5g0buw09bW3Rn4wbjT4hKD60KFScEGpicmhkkgHz/X 7kdbN+DbUhQuZPLxBJpWqizrgjyNgDTwm0I/jcF//aWIaSCOlUcZKLAAXikzp6+MFpcl OKiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=kz+7mIuB; 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 cj18-20020a17090715d200b0087073de5aa3si6191628ejc.371.2023.01.25.04.30.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 04:30:33 -0800 (PST) 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=kz+7mIuB; 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 23F333858D39 for ; Wed, 25 Jan 2023 12:30:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 23F333858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674649832; bh=MgtvENTLAKJTJ+yg9fm66gX001KFjUpjGQUFsPOU7Ko=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=kz+7mIuB6By7VPSRRC6pbV55DG6De7aQhr2x532eo4Xd874ZH5pwi4hp7b/SYGa39 sJ8hOyMTLA025sZahDhUb5vHu3YAN87WOphPRJ0Wh3KCZtQjwMABmBeO0Le0KD7+4E ZRiY1SWT7w724cfMXbUKMa03JYVKMQDXFgYYdSVs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id D19373858D28 for ; Wed, 25 Jan 2023 12:29:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D19373858D28 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id BB23321DA7 for ; Wed, 25 Jan 2023 12:29:48 +0000 (UTC) Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id B5F542C141 for ; Wed, 25 Jan 2023 12:29:47 +0000 (UTC) Date: Wed, 25 Jan 2023 12:29:47 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fixup LTO internal docs for option processing User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, MISSING_MID, 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 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-Patchwork-Original-From: Richard Biener via Gcc-patches From: Richard Biener Reply-To: Richard Biener Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" Message-Id: <20230125123032.23F333858D39@sourceware.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755997623736051692?= X-GMAIL-MSGID: =?utf-8?q?1755997623736051692?= Andreas noticed that when I removed lto_read_all_file_options I failed to update the internals manual which refers to it. The following attempts to reflect the current situation. Pushed. * doc/lto.texi (Command line options): Reword and update reference to removed lto_read_all_file_options. --- gcc/doc/lto.texi | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/gcc/doc/lto.texi b/gcc/doc/lto.texi index e591e8d2915..eb5f54bf908 100644 --- a/gcc/doc/lto.texi +++ b/gcc/doc/lto.texi @@ -170,13 +170,11 @@ object files. This is used at link time to determine the optimization level and other settings when they are not explicitly specified at the linker command line. -Currently, GCC does not support combining LTO object files compiled -with different set of the command line options into a single binary. -At link time, the options given on the command line and the options -saved on all the files in a link-time set are applied globally. No -attempt is made at validating the combination of flags (other than the -usual validation done by option processing). This is implemented in -@file{lto/lto.cc}:@code{lto_read_all_file_options}. +Most options are recorded at a per function level and their setting +restored when processing the functions at link time. Global options +are composed from options specified at compile time and link time. +How exactly they are combined or mismatches diagnosed is implemented in +@file{lto-wrapper.cc}:@code{find_and_merge_options}. @item Symbol table (@code{.gnu.lto_.symtab})