From patchwork Fri Aug 23 11:02:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 1152122 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-507585-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="bov+BPZy"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46FJQS4M5sz9sN6 for ; Fri, 23 Aug 2019 21:02:40 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:cc:message-id:date:mime-version:content-type; q=dns; s=default; b=XVkebgPKm3hqtIHvgkJFzl1G3M0rWCyssnLInMIQ21N7KocdgB dEViktFqm4O/88F19SkIkcvx3aIMczp/BN6MDjAhxg1FS+YW3GKTaKKZvSmkPkCO 4fBF/EZb/7wqmCIb3BvXukoOgVWfGzeqfVLu88Bo02ThHEUJSN88aAU0U= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:cc:message-id:date:mime-version:content-type; s= default; bh=LQq5TGojuE0kzCahrNnPrUUOYso=; b=bov+BPZy9/yinRPOf1F7 m/XObBuKGBUcNnPOSOL1lbYiF/efEHYizppXh/+SL1kzSj7Tzg18gOxA/rI3eC2c OhqhvDAAtewTNK4117Ik/2/Qw1kpfSfhWDtMTQhyEq+zk21OOz2ZZdT/wozW5omS nL/XNGeIOwA9IEDrNSJrelM= Received: (qmail 14775 invoked by alias); 23 Aug 2019 11:02:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 14764 invoked by uid 89); 23 Aug 2019 11:02:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_SOFTFAIL autolearn=ham version=3.3.1 spammy=HX-detected-operating-system:timestamps X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Aug 2019 11:02:31 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i17Kv-0003nQ-6u for gcc-patches@gcc.gnu.org; Fri, 23 Aug 2019 07:02:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:38140 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i17Ku-0003fQ-VR for gcc-patches@gcc.gnu.org; Fri, 23 Aug 2019 07:02:29 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C7540AFBE; Fri, 23 Aug 2019 11:02:24 +0000 (UTC) From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] Make -flto=jobserver parallel again. To: gcc-patches@gcc.gnu.org Cc: Richard Biener Message-ID: Date: Fri, 23 Aug 2019 13:02:24 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-IsSubscribed: yes Hi. As I did quite some changes in the LTO logic, revision r274232 dropped default value of parallel back to 0. Doing that, I forgot to set it to 1 at the places where jobserver is detected. I tested that LTO bootstrap is parallel again. Ready to be installed? Thanks, Martin gcc/ChangeLog: 2019-08-23 Martin Liska * lto-wrapper.c (run_gcc): When setting jobserver set also parallel to 1. This was done so before r273908. --- gcc/lto-wrapper.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 68f63da910f..75ed289f3f2 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -1374,7 +1374,10 @@ run_gcc (unsigned argc, char *argv[]) case OPT_flto_: if (strcmp (option->arg, "jobserver") == 0) - jobserver = 1; + { + parallel = 1; + jobserver = 1; + } else if (strcmp (option->arg, "auto") == 0) { parallel = 1; @@ -1423,8 +1426,11 @@ run_gcc (unsigned argc, char *argv[]) auto_parallel = 0; parallel = 0; } - else if (!jobserver) - jobserver = jobserver_active_p (); + else if (!jobserver && jobserver_active_p ()) + { + parallel = 1; + jobserver = 1; + } if (linker_output) {