From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2061.outbound.protection.outlook.com [40.107.241.61]) by sourceware.org (Postfix) with ESMTPS id 9D5903858438; Fri, 28 Apr 2023 10:44:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9D5903858438 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p8oH7GaYPuDlz92zfxdXv74kIxTE6LhH1KGa2az7C+4=; b=bNBE8ENNGDnfj7JpSM69VbvnUNKmWOOekZnLgwvVzEr5wWnaSzcUuXquYT9bnMRYIZlpR8oTc4Op0wMMtFyaT6C4CTf9SD8/G+g8hnoO7gpOv6ZB+6y5zL9n/sqeER8flYKR5T2RdgktXh4vM905pEqpT7OxLKD+hsFBwtVk4jk= Received: from AM5P194CA0024.EURP194.PROD.OUTLOOK.COM (2603:10a6:203:8f::34) by AS8PR08MB9647.eurprd08.prod.outlook.com (2603:10a6:20b:618::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.21; Fri, 28 Apr 2023 10:44:31 +0000 Received: from AM7EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:8f:cafe::5b) by AM5P194CA0024.outlook.office365.com (2603:10a6:203:8f::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.24 via Frontend Transport; Fri, 28 Apr 2023 10:44:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT064.mail.protection.outlook.com (100.127.140.127) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.24 via Frontend Transport; Fri, 28 Apr 2023 10:44:30 +0000 Received: ("Tessian outbound e13c2446394c:v136"); Fri, 28 Apr 2023 10:44:30 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d05c51563a275401 X-CR-MTA-TID: 64aa7808 Received: from 33e0d9f44e87.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2C25CDE7-F3FB-4FF7-9AD7-F0D98B06F8F3.1; Fri, 28 Apr 2023 10:44:23 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 33e0d9f44e87.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 28 Apr 2023 10:44:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BOZ3eRfCCOQljtvAhi0fP60f0/nsI6pV9B5XnkJUL4UUEuhEfqwzEOSeHq5h+3a95GLYu5+7qiExuLmY1n2dfCEmmNI/Vh9LgEYBSvsuzRcyqAyKRhdzLvmsEsbFD2PHpjOKgpT5OY1c/F4FRtMboDfT9tYgBFMQVepCM7Gq1ccHzF5ZExmih9LBNgpHIKywWQ+ByBRl6zw9nd1gZLdHn+kR/RJlpOqys6fOoJTCXX/P+ROsVcXzDVB/+8yuEtD0uHixMrWvOWCYsRKVJwwJ6ELnKPlHoUKNqqpazno42WFBptQzRXOj1dd5LJJM7fz/W2/JwEbZldM2DkhACmMo4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=p8oH7GaYPuDlz92zfxdXv74kIxTE6LhH1KGa2az7C+4=; b=LqO32mCKO3bwBQ47JWEpwNzsNf3USEMjq4nnOgxDaCYQY+FWqxTgtXQ9yiee006p5z7a2kQizI60rfQNjkgDtfZS51UroMJPVAvgH2htj+qx59Tj3Z7hvWYJGrakwf++4XF0bpsv9rJeryIyS6lG0abAsEkLk+JaRJxSuM43FtI62tu5NTHcYkyr7MotAV2CmUvPTZJLQUdVgrfuHJqcXoMdtzriMPiSIHPyr59+3zg8QMzJjQMWQOJn+oD/nmcsj4k8pJ1l7uOATy1YflDUZKZbAyvG+hdY/CDi+IYo4YRRI1rr+lyT0D1TMypPDAYV2kYWDYEn49NCwUMKRrf6KA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p8oH7GaYPuDlz92zfxdXv74kIxTE6LhH1KGa2az7C+4=; b=bNBE8ENNGDnfj7JpSM69VbvnUNKmWOOekZnLgwvVzEr5wWnaSzcUuXquYT9bnMRYIZlpR8oTc4Op0wMMtFyaT6C4CTf9SD8/G+g8hnoO7gpOv6ZB+6y5zL9n/sqeER8flYKR5T2RdgktXh4vM905pEqpT7OxLKD+hsFBwtVk4jk= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) by AM8PR08MB6372.eurprd08.prod.outlook.com (2603:10a6:20b:369::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.23; Fri, 28 Apr 2023 10:44:18 +0000 Received: from VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::82f2:dba0:1f9b:c8f]) by VI1PR08MB5325.eurprd08.prod.outlook.com ([fe80::82f2:dba0:1f9b:c8f%7]) with mapi id 15.20.6340.023; Fri, 28 Apr 2023 10:44:18 +0000 Date: Fri, 28 Apr 2023 11:44:15 +0100 From: Tamar Christina To: gcc-patches@gcc.gnu.org Cc: nd@arm.com, bonzini@gnu.org, neroden@gcc.gnu.org, aoliva@gcc.gnu.org, Ralf.Wildenhues@gmx.de Subject: [PATCH 5/5] match.pd: Use splits in makefile and make configurable. Message-ID: Content-Type: multipart/mixed; boundary="dsVffH/xRfQLaXdF" Content-Disposition: inline X-ClientProxiedBy: LO2P265CA0271.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a1::19) To VI1PR08MB5325.eurprd08.prod.outlook.com (2603:10a6:803:13e::17) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: VI1PR08MB5325:EE_|AM8PR08MB6372:EE_|AM7EUR03FT064:EE_|AS8PR08MB9647:EE_ X-MS-Office365-Filtering-Correlation-Id: a8a4e3f5-deff-4170-ac05-08db47d58c55 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: ceMja83CgOBx2J4FNOuXNDpqPLXcEExMoa+75SpP6Od83O9HSqZWHXYuEDJ/GZutR9UxMCXgP64FwH1k5xReJePBlGRpFckwmWyOJl+9RjLWSN0wbLmqBauhtTBvO7WKvd0+sbIxmTapqdCEsaHV5LQZ8ABKQlKfAsluuNvdgDynE7JU9f8wcQN7OKD7ZlXGyVN2tEmFjNK+ARUGb1sz4TsOPMjRlEni+TdG4n0yF0iziM/LWJwixfGDXu+oz7bh/j1ETSVCdWBeDI/fsqbF5y9URlFj3c9xU+71pPeO590JeRudZLSqskXG92sRtQUSgcC5wQNlxTMgX2yxbZ4h6wYNWxm7moeudD3KeYlwOtRn0ZWVwNG/PeODh0Eo5YWsVWKyBwapuuqb66BfyHHE5nhNELyqrSr/vjR8izM1bhmBQrxq4Bx5mO6YcBDanJNIebUe1gGlPldCDy/L7SulSQSN5vUQmZI8bPNXWyVb4pnRVARxzAqGpbLpx647o3ruz+1PNqeHMMUs4PBA7xv6bJPX8NgpLEuUxFjKU8jeDlMmPYo5S8Rra6uS7D3fmABNpOS8QmS/0KdOfRRCdl49mqd0XASydrlev2O2ZTw1vC6w2NJas/D0OsmmT6P9Ezy60AJHdGMpk6pMXlEylwDqsw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR08MB5325.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(136003)(396003)(39860400002)(366004)(376002)(346002)(451199021)(6916009)(316002)(4326008)(86362001)(66946007)(8676002)(8936002)(235185007)(44832011)(5660300002)(478600001)(2906002)(30864003)(66476007)(83380400001)(41300700001)(6486002)(6666004)(33964004)(44144004)(36756003)(66556008)(2616005)(26005)(6506007)(6512007)(186003)(4743002)(38100700002)(4216001)(2700100001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB6372 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 14530362-34d8-49c2-edb8-08db47d5844f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T9vQkCoI1L3Tuu5ZBLJxpuOqdCjbu1NOEgZ5NBO4hCTkdHR8u+Te+g09/nSwnu+dWex20iUMjn3VuSzUN8X3Gj1aGNbwfMa0+bVcdvEnpqo5RKBtusDpxisvnEgmHshRnuLQrzDoS7WBh41bJvtqQquifNoeckDBNQScBrJbhH6LH6J4urCp9NsXcpbXQzCZPdl+/JGU5je/AX82E6wqFj//Bwd4HOUPKe6fYoLuTwA3E6GI11HRh3b9oqHZ/V047o8+XSu3fk57Epni3CKDdkHlTfBEn/qcoPMnHEmfF7Htt99lzVbhMws6kB3iz8CMoFHmQwOuvNXuZrseAn75EAdbqI0yLvea8Xlwvs+fSHuMxTYov0wWR7Thikz57ZUHOrT+gJnjYdZujcksKaBoqLPKS1BA8EwBEIEuKrDfjUrbYxd+EnI05iltOZFfaBvjMgC0zuVdjDEf2Dr5Bkoqao1BOM/GMLRO3fF5SjIx67TnqurvHapsoOB1gPWOUxKppkvxPY7NYnU/9n2ek8fa54/32FetScCAp9i66u5bfmOxeG66p1fR+hyXo0XGGkcuvCX1HC4qf8I6I/RkOubj86cR4qAQ2jjZqUvzL9a7p9ofwp6Pwl44e0X/DvFfguRiGS8QzjSVzBNV/aseTvefsh76IgEqj4O1WGldOwDN6CG0XvUysAZ8UkzPVVtBggJVkDVAPSHX+/FXkRX1zas9i7RXKGVqh3KfMvDiXVWXTxOpHHZtdZk/T7zROOOCA7eYsRCbiUYkSsePG06S8TeXExmwg0z2pjjKG+RkkAg7Uv4= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230028)(4636009)(346002)(376002)(39860400002)(396003)(136003)(451199021)(40470700004)(46966006)(36840700001)(41300700001)(356005)(5660300002)(81166007)(70206006)(70586007)(8676002)(8936002)(6916009)(86362001)(4326008)(450100002)(316002)(82740400003)(40460700003)(44832011)(235185007)(2906002)(30864003)(4743002)(186003)(44144004)(36756003)(6486002)(6666004)(33964004)(336012)(47076005)(83380400001)(36860700001)(6512007)(26005)(6506007)(82310400005)(2616005)(40480700001)(478600001)(34020700004)(4216001)(2700100001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2023 10:44:30.9994 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a8a4e3f5-deff-4170-ac05-08db47d58c55 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9647 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,KAM_LOTSOFHASH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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: --dsVffH/xRfQLaXdF Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi All, This updates the build system to split up match.pd files into chunks of 10. This also introduces a new flag --with-matchpd-partitions which can be used to change the number of partitions. For the analysis of why 10 please look at the previous patch in the series. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: PR bootstrap/84402 * Makefile.in (NUM_MATCH_SPLITS, MATCH_SPLITS_SEQ, GIMPLE_MATCH_PD_SEQ_SRC, GIMPLE_MATCH_PD_SEQ_O, GENERIC_MATCH_PD_SEQ_SRC, GENERIC_MATCH_PD_SEQ_O): New. (OBJS, MOSTLYCLEANFILES, .PRECIOUS): Use them. (s-match): Split into s-generic-match and s-gimple-match. * configure.ac (with-matchpd-partitions, DEFAULT_MATCHPD_PARTITIONS): New. * configure: Regenerate. --- inline copy of patch -- diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 70559a014c0e32d8d825766e0c1516fc2ee05421..f3343eea3339e9dc054e83cfb899799c7d784963 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -214,6 +214,14 @@ rtl-ssa-warn = $(STRICT_WARN) GCC_WARN_CFLAGS = $(LOOSE_WARN) $(C_LOOSE_WARN) $($(@D)-warn) $(if $(filter-out $(STRICT_WARN),$($(@D)-warn)),,$(C_STRICT_WARN)) $(NOCOMMON_FLAG) $($@-warn) GCC_WARN_CXXFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn) +# The number of splits to be made for the match.pd files. +NUM_MATCH_SPLITS = @DEFAULT_MATCHPD_PARTITIONS@ +MATCH_SPLITS_SEQ = $(shell seq 1 $(NUM_MATCH_SPLITS)) +GIMPLE_MATCH_PD_SEQ_SRC = $(patsubst %, gimple-match-%.cc, $(MATCH_SPLITS_SEQ)) +GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-match-%.o, $(MATCH_SPLITS_SEQ)) +GENERIC_MATCH_PD_SEQ_SRC = $(patsubst %, generic-match-%.cc, $(MATCH_SPLITS_SEQ)) +GENERIC_MATCH_PD_SEQ_O = $(patsubst %, generic-match-%.o, $(MATCH_SPLITS_SEQ)) + # These files are to have specific diagnostics suppressed, or are not to # be subject to -Werror: # flex output may yield harmless "no previous prototype" warnings @@ -222,9 +230,8 @@ gengtype-lex.o-warn = -Wno-error libgcov-util.o-warn = -Wno-error libgcov-driver-tool.o-warn = -Wno-error libgcov-merge-tool.o-warn = -Wno-error -gimple-match.o-warn = -Wno-unused +gimple-match-head.o-warn = -Wno-unused gimple-match-exports.o-warn = -Wno-unused -generic-match.o-warn = -Wno-unused dfp.o-warn = -Wno-strict-aliasing # All warnings have to be shut off in stage1 if the compiler used then @@ -1310,9 +1317,9 @@ ANALYZER_OBJS = \ # will build them sooner, because they are large and otherwise tend to be # the last objects to finish building. OBJS = \ - gimple-match.o \ + $(GIMPLE_MATCH_PD_SEQ_O) \ gimple-match-exports.o \ - generic-match.o \ + $(GENERIC_MATCH_PD_SEQ_O) \ insn-attrtab.o \ insn-automata.o \ insn-dfatab.o \ @@ -1805,7 +1812,8 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ insn-output.cc insn-recog.cc insn-emit.cc insn-extract.cc insn-peep.cc \ insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \ insn-latencytab.cc insn-opinit.cc insn-opinit.h insn-preds.cc insn-constants.h \ - tm-preds.h tm-constrs.h checksum-options gimple-match.cc generic-match.cc \ + tm-preds.h tm-constrs.h checksum-options $(GIMPLE_MATCH_PD_SEQ_SRC) \ + $(GENERIC_MATCH_PD_SEQ_SRC) gimple-match-auto.h generic-match-auto.h \ tree-check.h min-insn-modes.cc insn-modes.cc insn-modes.h insn-modes-inline.h \ genrtl.h gt-*.h gtype-*.h gtype-desc.cc gtyp-input.list \ case-cfn-macros.h cfn-operators.pd \ @@ -2420,7 +2428,8 @@ $(common_out_object_file): $(common_out_file) .PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \ insn-emit.cc insn-recog.cc insn-extract.cc insn-output.cc insn-peep.cc \ insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \ - insn-latencytab.cc insn-preds.cc gimple-match.cc generic-match.cc \ + insn-latencytab.cc insn-preds.cc $(GIMPLE_MATCH_PD_SEQ_SRC) \ + $(GENERIC_MATCH_PD_SEQ_SRC) gimple-match-auto.h generic-match-auto.h \ insn-target-def.h # Dependencies for the md file. The first time through, we just assume @@ -2663,19 +2672,36 @@ s-tm-texi: build/genhooks$(build_exeext) $(srcdir)/doc/tm.texi.in false; \ fi -gimple-match.cc: s-match gimple-match-head.cc gimple-match-exports.cc ; @true -generic-match.cc: s-match generic-match-head.cc ; @true - -s-match: build/genmatch$(build_exeext) $(srcdir)/match.pd cfn-operators.pd - $(RUN_GEN) build/genmatch$(build_exeext) --gimple $(srcdir)/match.pd \ - > tmp-gimple-match.cc - $(RUN_GEN) build/genmatch$(build_exeext) --generic $(srcdir)/match.pd \ - > tmp-generic-match.cc - $(SHELL) $(srcdir)/../move-if-change tmp-gimple-match.cc \ - gimple-match.cc - $(SHELL) $(srcdir)/../move-if-change tmp-generic-match.cc \ - generic-match.cc - $(STAMP) s-match +$(GIMPLE_MATCH_PD_SEQ_SRC): s-gimple-match gimple-match-head.cc \ + gimple-match-exports.cc; @true +gimple-match-auto.h: s-gimple-match gimple-match-head.cc \ + gimple-match-exports.cc; @true +$(GENERIC_MATCH_PD_SEQ_SRC): s-generic-match generic-match-head.cc; @true +generic-match-auto.h: s-generic-match generic-match-head.cc; @true + +s-gimple-match: build/genmatch$(build_exeext) \ + $(srcdir)/match.pd cfn-operators.pd + $(RUN_GEN) build/genmatch$(build_exeext) --gimple \ + --header=tmp-gimple-match-auto.h --include=gimple-match-auto.h \ + $(srcdir)/match.pd $(patsubst %, tmp-%, $(GIMPLE_MATCH_PD_SEQ_SRC)) + $(foreach id, $(MATCH_SPLITS_SEQ), \ + $(SHELL) $(srcdir)/../move-if-change tmp-gimple-match-$(id).cc \ + gimple-match-$(id).cc;) + $(SHELL) $(srcdir)/../move-if-change tmp-gimple-match-auto.h \ + gimple-match-auto.h + $(STAMP) s-gimple-match + +s-generic-match: build/genmatch$(build_exeext) \ + $(srcdir)/match.pd cfn-operators.pd + $(RUN_GEN) build/genmatch$(build_exeext) --generic \ + --header=tmp-generic-match-auto.h --include=generic-match-auto.h \ + $(srcdir)/match.pd $(patsubst %, tmp-%, $(GENERIC_MATCH_PD_SEQ_SRC)) + $(foreach id, $(MATCH_SPLITS_SEQ), \ + $(SHELL) $(srcdir)/../move-if-change tmp-generic-match-$(id).cc \ + generic-match-$(id).cc;) + $(SHELL) $(srcdir)/../move-if-change tmp-generic-match-auto.h \ + generic-match-auto.h + $(STAMP) s-generic-match GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \ $(host_xm_file_list) \ @@ -2810,7 +2836,8 @@ generated_files = config.h tm.h $(TM_P_H) $(TM_D_H) $(TM_H) multilib.h \ $(ALL_GTFILES_H) gtype-desc.cc gtype-desc.h version.h \ options.h target-hooks-def.h insn-opinit.h \ common/common-target-hooks-def.h pass-instances.def \ - gimple-match.cc generic-match.cc \ + $(GIMPLE_MATCH_PD_SEQ_SRC) $(GENERIC_MATCH_PD_SEQ_SRC) \ + gimple-match-auto.h generic-match-auto.h \ c-family/c-target-hooks-def.h d/d-target-hooks-def.h \ case-cfn-macros.h \ cfn-operators.pd omp-device-properties.h diff --git a/gcc/configure b/gcc/configure index c7b26d1927de62d7b3a49ea9ac0a998979659cf2..843fd5449dd3c82fd5f7fc869ce951e89446ff6b 100755 --- a/gcc/configure +++ b/gcc/configure @@ -838,6 +838,7 @@ enable_gcov enable_shared enable_fixed_point enable_decimal_float +DEFAULT_MATCHPD_PARTITIONS with_float with_cpu enable_multiarch @@ -965,6 +966,7 @@ enable_valgrind_annotations enable_multilib enable_multiarch with_stack_clash_protection_guard_size +with_matchpd_partitions enable___cxa_atexit enable_decimal_float enable_fixed_point @@ -1826,6 +1828,9 @@ Optional Packages: --with-stack-clash-protection-guard-size=size Set the default stack clash protection guard size for specific targets as a power of two in bytes. + --with-matchpd-partitions=num + Set the number of partitions to make for gimple and + generic when splitting match.pd. [default=10] --with-dwarf2 force the default debug format to be DWARF 2 (or later) --with-specs=SPECS add SPECS to driver command-line processing @@ -7889,6 +7894,26 @@ cat >>confdefs.h <<_ACEOF _ACEOF +# Specify the number of splits of match.pd to generate. + +# Check whether --with-matchpd-partitions was given. +if test "${with_matchpd_partitions+set}" = set; then : + withval=$with_matchpd_partitions; DEFAULT_MATCHPD_PARTITIONS="$with_matchpd_partitions" +else + DEFAULT_MATCHPD_PARTITIONS=10 +fi + +if (test $DEFAULT_MATCHPD_PARTITIONS -lt 1); then + as_fn_error $? "Invalid value $DEFAULT_MATCHPD_PARTITIONS for --with-matchpd-partitions. Cannot be negative." "$LINENO" 5 +fi + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_MATCHPD_PARTITIONS $DEFAULT_MATCHPD_PARTITIONS +_ACEOF + + + # Enable __cxa_atexit for C++. # Check whether --enable-__cxa_atexit was given. if test "${enable___cxa_atexit+set}" = set; then : @@ -19825,7 +19850,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19828 "configure" +#line 19853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19931,7 +19956,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19934 "configure" +#line 19959 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 09082e8ccae395b902a3ef79eb4f27a1186a331e..de5e3aef2c81e1465198f903bfcd1219363c78d8 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -921,6 +921,21 @@ fi AC_DEFINE_UNQUOTED(DEFAULT_STK_CLASH_GUARD_SIZE, $DEFAULT_STK_CLASH_GUARD_SIZE, [Define to larger than zero set the default stack clash protector size.]) +# Specify the number of splits of match.pd to generate. +AC_ARG_WITH(matchpd-partitions, +[AS_HELP_STRING([--with-matchpd-partitions=num], +[Set the number of partitions to make for gimple and generic when splitting match.pd. [default=10]])], +[DEFAULT_MATCHPD_PARTITIONS="$with_matchpd_partitions"], [DEFAULT_MATCHPD_PARTITIONS=10]) +if (test $DEFAULT_MATCHPD_PARTITIONS -lt 1); then + AC_MSG_ERROR(m4_normalize([ + Invalid value $DEFAULT_MATCHPD_PARTITIONS for --with-matchpd-partitions. \ + Cannot be negative.])) +fi + +AC_DEFINE_UNQUOTED(DEFAULT_MATCHPD_PARTITIONS, $DEFAULT_MATCHPD_PARTITIONS, + [Define to larger than one set the number of match.pd partitions to make.]) +AC_SUBST(DEFAULT_MATCHPD_PARTITIONS) + # Enable __cxa_atexit for C++. AC_ARG_ENABLE(__cxa_atexit, [AS_HELP_STRING([--enable-__cxa_atexit], [enable __cxa_atexit for C++])], -- --dsVffH/xRfQLaXdF Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="rb17230.patch" diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 70559a014c0e32d8d825766e0c1516fc2ee05421..f3343eea3339e9dc054e83cfb899799c7d784963 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -214,6 +214,14 @@ rtl-ssa-warn = $(STRICT_WARN) GCC_WARN_CFLAGS = $(LOOSE_WARN) $(C_LOOSE_WARN) $($(@D)-warn) $(if $(filter-out $(STRICT_WARN),$($(@D)-warn)),,$(C_STRICT_WARN)) $(NOCOMMON_FLAG) $($@-warn) GCC_WARN_CXXFLAGS = $(LOOSE_WARN) $($(@D)-warn) $(NOCOMMON_FLAG) $($@-warn) +# The number of splits to be made for the match.pd files. +NUM_MATCH_SPLITS = @DEFAULT_MATCHPD_PARTITIONS@ +MATCH_SPLITS_SEQ = $(shell seq 1 $(NUM_MATCH_SPLITS)) +GIMPLE_MATCH_PD_SEQ_SRC = $(patsubst %, gimple-match-%.cc, $(MATCH_SPLITS_SEQ)) +GIMPLE_MATCH_PD_SEQ_O = $(patsubst %, gimple-match-%.o, $(MATCH_SPLITS_SEQ)) +GENERIC_MATCH_PD_SEQ_SRC = $(patsubst %, generic-match-%.cc, $(MATCH_SPLITS_SEQ)) +GENERIC_MATCH_PD_SEQ_O = $(patsubst %, generic-match-%.o, $(MATCH_SPLITS_SEQ)) + # These files are to have specific diagnostics suppressed, or are not to # be subject to -Werror: # flex output may yield harmless "no previous prototype" warnings @@ -222,9 +230,8 @@ gengtype-lex.o-warn = -Wno-error libgcov-util.o-warn = -Wno-error libgcov-driver-tool.o-warn = -Wno-error libgcov-merge-tool.o-warn = -Wno-error -gimple-match.o-warn = -Wno-unused +gimple-match-head.o-warn = -Wno-unused gimple-match-exports.o-warn = -Wno-unused -generic-match.o-warn = -Wno-unused dfp.o-warn = -Wno-strict-aliasing # All warnings have to be shut off in stage1 if the compiler used then @@ -1310,9 +1317,9 @@ ANALYZER_OBJS = \ # will build them sooner, because they are large and otherwise tend to be # the last objects to finish building. OBJS = \ - gimple-match.o \ + $(GIMPLE_MATCH_PD_SEQ_O) \ gimple-match-exports.o \ - generic-match.o \ + $(GENERIC_MATCH_PD_SEQ_O) \ insn-attrtab.o \ insn-automata.o \ insn-dfatab.o \ @@ -1805,7 +1812,8 @@ MOSTLYCLEANFILES = insn-flags.h insn-config.h insn-codes.h \ insn-output.cc insn-recog.cc insn-emit.cc insn-extract.cc insn-peep.cc \ insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \ insn-latencytab.cc insn-opinit.cc insn-opinit.h insn-preds.cc insn-constants.h \ - tm-preds.h tm-constrs.h checksum-options gimple-match.cc generic-match.cc \ + tm-preds.h tm-constrs.h checksum-options $(GIMPLE_MATCH_PD_SEQ_SRC) \ + $(GENERIC_MATCH_PD_SEQ_SRC) gimple-match-auto.h generic-match-auto.h \ tree-check.h min-insn-modes.cc insn-modes.cc insn-modes.h insn-modes-inline.h \ genrtl.h gt-*.h gtype-*.h gtype-desc.cc gtyp-input.list \ case-cfn-macros.h cfn-operators.pd \ @@ -2420,7 +2428,8 @@ $(common_out_object_file): $(common_out_file) .PRECIOUS: insn-config.h insn-flags.h insn-codes.h insn-constants.h \ insn-emit.cc insn-recog.cc insn-extract.cc insn-output.cc insn-peep.cc \ insn-attr.h insn-attr-common.h insn-attrtab.cc insn-dfatab.cc \ - insn-latencytab.cc insn-preds.cc gimple-match.cc generic-match.cc \ + insn-latencytab.cc insn-preds.cc $(GIMPLE_MATCH_PD_SEQ_SRC) \ + $(GENERIC_MATCH_PD_SEQ_SRC) gimple-match-auto.h generic-match-auto.h \ insn-target-def.h # Dependencies for the md file. The first time through, we just assume @@ -2663,19 +2672,36 @@ s-tm-texi: build/genhooks$(build_exeext) $(srcdir)/doc/tm.texi.in false; \ fi -gimple-match.cc: s-match gimple-match-head.cc gimple-match-exports.cc ; @true -generic-match.cc: s-match generic-match-head.cc ; @true - -s-match: build/genmatch$(build_exeext) $(srcdir)/match.pd cfn-operators.pd - $(RUN_GEN) build/genmatch$(build_exeext) --gimple $(srcdir)/match.pd \ - > tmp-gimple-match.cc - $(RUN_GEN) build/genmatch$(build_exeext) --generic $(srcdir)/match.pd \ - > tmp-generic-match.cc - $(SHELL) $(srcdir)/../move-if-change tmp-gimple-match.cc \ - gimple-match.cc - $(SHELL) $(srcdir)/../move-if-change tmp-generic-match.cc \ - generic-match.cc - $(STAMP) s-match +$(GIMPLE_MATCH_PD_SEQ_SRC): s-gimple-match gimple-match-head.cc \ + gimple-match-exports.cc; @true +gimple-match-auto.h: s-gimple-match gimple-match-head.cc \ + gimple-match-exports.cc; @true +$(GENERIC_MATCH_PD_SEQ_SRC): s-generic-match generic-match-head.cc; @true +generic-match-auto.h: s-generic-match generic-match-head.cc; @true + +s-gimple-match: build/genmatch$(build_exeext) \ + $(srcdir)/match.pd cfn-operators.pd + $(RUN_GEN) build/genmatch$(build_exeext) --gimple \ + --header=tmp-gimple-match-auto.h --include=gimple-match-auto.h \ + $(srcdir)/match.pd $(patsubst %, tmp-%, $(GIMPLE_MATCH_PD_SEQ_SRC)) + $(foreach id, $(MATCH_SPLITS_SEQ), \ + $(SHELL) $(srcdir)/../move-if-change tmp-gimple-match-$(id).cc \ + gimple-match-$(id).cc;) + $(SHELL) $(srcdir)/../move-if-change tmp-gimple-match-auto.h \ + gimple-match-auto.h + $(STAMP) s-gimple-match + +s-generic-match: build/genmatch$(build_exeext) \ + $(srcdir)/match.pd cfn-operators.pd + $(RUN_GEN) build/genmatch$(build_exeext) --generic \ + --header=tmp-generic-match-auto.h --include=generic-match-auto.h \ + $(srcdir)/match.pd $(patsubst %, tmp-%, $(GENERIC_MATCH_PD_SEQ_SRC)) + $(foreach id, $(MATCH_SPLITS_SEQ), \ + $(SHELL) $(srcdir)/../move-if-change tmp-generic-match-$(id).cc \ + generic-match-$(id).cc;) + $(SHELL) $(srcdir)/../move-if-change tmp-generic-match-auto.h \ + generic-match-auto.h + $(STAMP) s-generic-match GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \ $(host_xm_file_list) \ @@ -2810,7 +2836,8 @@ generated_files = config.h tm.h $(TM_P_H) $(TM_D_H) $(TM_H) multilib.h \ $(ALL_GTFILES_H) gtype-desc.cc gtype-desc.h version.h \ options.h target-hooks-def.h insn-opinit.h \ common/common-target-hooks-def.h pass-instances.def \ - gimple-match.cc generic-match.cc \ + $(GIMPLE_MATCH_PD_SEQ_SRC) $(GENERIC_MATCH_PD_SEQ_SRC) \ + gimple-match-auto.h generic-match-auto.h \ c-family/c-target-hooks-def.h d/d-target-hooks-def.h \ case-cfn-macros.h \ cfn-operators.pd omp-device-properties.h diff --git a/gcc/configure b/gcc/configure index c7b26d1927de62d7b3a49ea9ac0a998979659cf2..843fd5449dd3c82fd5f7fc869ce951e89446ff6b 100755 --- a/gcc/configure +++ b/gcc/configure @@ -838,6 +838,7 @@ enable_gcov enable_shared enable_fixed_point enable_decimal_float +DEFAULT_MATCHPD_PARTITIONS with_float with_cpu enable_multiarch @@ -965,6 +966,7 @@ enable_valgrind_annotations enable_multilib enable_multiarch with_stack_clash_protection_guard_size +with_matchpd_partitions enable___cxa_atexit enable_decimal_float enable_fixed_point @@ -1826,6 +1828,9 @@ Optional Packages: --with-stack-clash-protection-guard-size=size Set the default stack clash protection guard size for specific targets as a power of two in bytes. + --with-matchpd-partitions=num + Set the number of partitions to make for gimple and + generic when splitting match.pd. [default=10] --with-dwarf2 force the default debug format to be DWARF 2 (or later) --with-specs=SPECS add SPECS to driver command-line processing @@ -7889,6 +7894,26 @@ cat >>confdefs.h <<_ACEOF _ACEOF +# Specify the number of splits of match.pd to generate. + +# Check whether --with-matchpd-partitions was given. +if test "${with_matchpd_partitions+set}" = set; then : + withval=$with_matchpd_partitions; DEFAULT_MATCHPD_PARTITIONS="$with_matchpd_partitions" +else + DEFAULT_MATCHPD_PARTITIONS=10 +fi + +if (test $DEFAULT_MATCHPD_PARTITIONS -lt 1); then + as_fn_error $? "Invalid value $DEFAULT_MATCHPD_PARTITIONS for --with-matchpd-partitions. Cannot be negative." "$LINENO" 5 +fi + + +cat >>confdefs.h <<_ACEOF +#define DEFAULT_MATCHPD_PARTITIONS $DEFAULT_MATCHPD_PARTITIONS +_ACEOF + + + # Enable __cxa_atexit for C++. # Check whether --enable-__cxa_atexit was given. if test "${enable___cxa_atexit+set}" = set; then : @@ -19825,7 +19850,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19828 "configure" +#line 19853 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19931,7 +19956,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19934 "configure" +#line 19959 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 09082e8ccae395b902a3ef79eb4f27a1186a331e..de5e3aef2c81e1465198f903bfcd1219363c78d8 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -921,6 +921,21 @@ fi AC_DEFINE_UNQUOTED(DEFAULT_STK_CLASH_GUARD_SIZE, $DEFAULT_STK_CLASH_GUARD_SIZE, [Define to larger than zero set the default stack clash protector size.]) +# Specify the number of splits of match.pd to generate. +AC_ARG_WITH(matchpd-partitions, +[AS_HELP_STRING([--with-matchpd-partitions=num], +[Set the number of partitions to make for gimple and generic when splitting match.pd. [default=10]])], +[DEFAULT_MATCHPD_PARTITIONS="$with_matchpd_partitions"], [DEFAULT_MATCHPD_PARTITIONS=10]) +if (test $DEFAULT_MATCHPD_PARTITIONS -lt 1); then + AC_MSG_ERROR(m4_normalize([ + Invalid value $DEFAULT_MATCHPD_PARTITIONS for --with-matchpd-partitions. \ + Cannot be negative.])) +fi + +AC_DEFINE_UNQUOTED(DEFAULT_MATCHPD_PARTITIONS, $DEFAULT_MATCHPD_PARTITIONS, + [Define to larger than one set the number of match.pd partitions to make.]) +AC_SUBST(DEFAULT_MATCHPD_PARTITIONS) + # Enable __cxa_atexit for C++. AC_ARG_ENABLE(__cxa_atexit, [AS_HELP_STRING([--enable-__cxa_atexit], [enable __cxa_atexit for C++])], --dsVffH/xRfQLaXdF--