From patchwork Thu Dec 1 15:29:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Greenhalgh X-Patchwork-Id: 86074 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp745249qgi; Thu, 1 Dec 2016 07:30:07 -0800 (PST) X-Received: by 10.99.60.11 with SMTP id j11mr70942775pga.26.1480606206962; Thu, 01 Dec 2016 07:30:06 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id o20si556028pgn.236.2016.12.01.07.30.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Dec 2016 07:30:06 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-443224-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-443224-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-443224-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; q=dns; s=default; b=CoSGXqQ8thB5q3YE TGGDytMq7CIGSUw1G0bXPcN8BhKGPji5gcqN3HbtNA9SSxGJ31W2qdImMZZY54Ay xy4M+j7B+YYTK6JQcLhFh0yMrGVKQUwqYwagmj5ES63qVePNQPzLnuVWuKG0Z12g k7vVM5VEc7LIZD/9X1O2hle4D4A= 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 :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=default; bh=feC142guB0eM2qRJe09y4j 6pK1w=; b=exzdhyDQWgtHrl0Xro7y3iqXkBgjKWfOiFGEn0WJQdEdyvvhHLKw1m LCIiuLouSTU3KumfR108bQTbYJnbafSsi1/tDa9UvJhSxHtF4ab7OKmku6Bx3Bqr BrqCf8F7rNH4iiwjXCbXtMZmpvQ4aOYzbhTbSx25TpWF3fb+hOUgw= Received: (qmail 82280 invoked by alias); 1 Dec 2016 15:29:43 -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 82255 invoked by uid 89); 1 Dec 2016 15:29:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=tabs, SYMBOL, HX-IncomingTopHeaderMarker:781 X-HELO: EUR01-DB5-obe.outbound.protection.outlook.com Received: from mail-db5eur01on0073.outbound.protection.outlook.com (HELO EUR01-DB5-obe.outbound.protection.outlook.com) (104.47.2.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Dec 2016 15:29:37 +0000 Received: from HE1PR0801CA0016.eurprd08.prod.outlook.com (10.167.184.26) by AM2PR08MB0435.eurprd08.prod.outlook.com (10.163.148.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.13; Thu, 1 Dec 2016 15:29:31 +0000 Received: from AM1FFO11FD006.protection.gbl (2a01:111:f400:7e00::184) by HE1PR0801CA0016.outlook.office365.com (2603:10a6:3:6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9 via Frontend Transport; Thu, 1 Dec 2016 15:29:30 +0000 Authentication-Results: spf=pass (sender IP is 217.140.96.140) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=none (message not signed) header.d=none; gcc.gnu.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 217.140.96.140 as permitted sender) receiver=protection.outlook.com; client-ip=217.140.96.140; helo=nebula.arm.com; Received: from nebula.arm.com (217.140.96.140) by AM1FFO11FD006.mail.protection.outlook.com (10.174.64.68) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.734.4 via Frontend Transport; Thu, 1 Dec 2016 15:29:30 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:781; Count:13 Received: from e107456-lin.cambridge.arm.com (10.1.2.79) by mail.arm.com (10.1.106.66) with Microsoft SMTP Server id 14.3.294.0; Thu, 1 Dec 2016 15:29:22 +0000 From: James Greenhalgh To: CC: Subject: [Patch 1/2 PR78561] Rename get_pool_size to get_pool_size_upper_bound Date: Thu, 1 Dec 2016 15:29:16 +0000 Message-ID: <1480606157-29525-2-git-send-email-james.greenhalgh@arm.com> In-Reply-To: <1480606157-29525-1-git-send-email-james.greenhalgh@arm.com> References: <1480606157-29525-1-git-send-email-james.greenhalgh@arm.com> MIME-Version: 1.0 X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(377424004)(189002)(199003)(246002)(86362001)(305945005)(2476003)(4610100001)(4326007)(76176999)(6916009)(2950100002)(50986999)(5890100001)(6666003)(92566002)(5660300001)(110136003)(36756003)(189998001)(50226002)(8936002)(8676002)(356003)(39410400001)(26826002)(568964002)(38730400001)(7846002)(84326002)(512874002)(39450400002)(626004)(77096006)(104016004)(106466001)(2906002)(33646002)(450100001)(2351001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR08MB0435; H:nebula.arm.com; FPR:; SPF:Pass; PTR:fw-tnat.cambridge.arm.com; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; AM1FFO11FD006; 1:CGeLzV0J5FdO3Ks0zJozGSDQlpxo9j6KTT0lO0IdfhpKcLSWTNMysmm/c+AfI/Iuz0a0vzAOzQEq5bvNW4uHKlgyggoaYkEmiOUsAsnVAGVXpV5E4b1sPCIEhvTKrALzqJzMlLzVa2RVpetJSrNNiI4ET9ldC9dMXoHmQNmKigLN8fIOpFmybwJthUy1r+esjRB0Mza0UnNs5U0dFMMKlVDirAk2L7EsAGKHS/ZLoAsl+xucYCBPmCs8VmewHwSW5KUyPx+jyEnhMd/0ZAD8tI1B9VtBzst/m9UEG4/mEwUbHXe+nsCsXiYUGD3thDwaTu+8j39oh4t3lNy3O12K2vDdIvIoHoPhBTXRC5jpCUtqHot+/cWr88SMejQYtKh25LFcnWliqLkWBCFYprhE590N1BDxfRYH4ddFKmXaefJrB+7Hhl/RfhsPsuGVqNP4WCaL1N5GRhatgcR2a2E+7bBGyqzKa6+6ZRod7XD9RXgokd8Rp4Xzu8SoswtmEP/xdTzc14+gB4z1VJBFT2V9RVrSrjC/iwWErDaen67A6rJoGTh/YOU87kWo2iU8GPJxqS2rkCPNwRzVU4kDD1c4CA== X-MS-Office365-Filtering-Correlation-Id: 13a6a83f-3048-4057-b12a-08d419fed811 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002); SRVR:AM2PR08MB0435; X-Microsoft-Exchange-Diagnostics: 1; AM2PR08MB0435; 3:WG8CqGtZLW846UZkcKybJD/ZsQpamt+EMjw0Xzavpvj4GX70+Ud9e0pVd9hFtgh/lNx2JxUcHc/nyAkSm4T7pGPX9qL2PrT2u5tRq1EYUVApC7q5LgBi07oC1+r7IISjPiO5hMoNqS7Sbtq5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pKEzkDWWBCiEHi1MABQbbZ7cPLHRpzGrvD9v/2ZtyDEh/ToTZhOyZyeFofc2lTvLNgjNzKCP0TgHElL0AfUbECvBk+Kr4Ub8IcVwkHnY3hwLxRT83itQ37rxb1ZYNd9+jM+BNRc1VOO8upabY6LX+boKrTG+jWCptW4gT7/uc= X-Microsoft-Exchange-Diagnostics: 1; AM2PR08MB0435; 31:17dE4RthqRnAr4sGFIn9ieHRqdLMI+geP8z2FtYHkP64pLcqO9HMT3DS1UlPixcB6K85RMsYkXWXuE5B8OaJMcVl5DXICZaL1qtVGYu8wgJlyz7xNrh2kIh6gbJQFGn9G29OsMJvzmUlBqiETsfGWFpTb1th59+tMwvkGmB7H6StjlF7K67PPOJ6ENvk0VsOZ/mmls5r6bnx3C6rv0U1WAN47jUU+I3lrYYrA7xUKqRGvk4+mvKLVTl2Y2/fOdHYDltS7H7QASe7OnNxKdpLZAgkZMSZMOHl/QOCggCyvxBTYIxcFZZrfZZEk5MnobNivEYS4d3MRZmKsMZNX3j3Xg==; 20:1oHWpmz+2T/imEGY2Ygm+c7tvFkjmrK3j+4UkCxCw5Fc/FIs3xkwXOEo4m9S7NGslTqTrwA4dccgZJ/4tjxAcoDeQ5I/jpGBkRJjI9rmbkM96YAI1Am+I3qL59XSULbbD0J5vQRtowhcSeoT6XhbrBEujfgXmln+CnRyPmt00GOAj9rDzfUdoPnLjdZQhT0C6+7TWiCg/QWmo+stYYNnPizCkAcLpjgFHD7kx3BWWYXE5+26K8Ep0nUU9UOXbTBn NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415395)(6040375)(601004)(2401047)(13024025)(13013025)(8121501046)(13020025)(5005006)(13023025)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(6072148); SRVR:AM2PR08MB0435; BCL:0; PCL:0; RULEID:; SRVR:AM2PR08MB0435; X-Microsoft-Exchange-Diagnostics: 1; AM2PR08MB0435; 4:vZVJ49P+C9E2ZnfAbf14pZrS10/uW684nrUmpOf3ZIOFUmBeolr/eGHYGmy9CZ4DX+KmyTh336k3uWKJYhAzj8XgRC3GLlAQBR82ghCGgZs52ExYQYkaOP5IrX2kGTY/eIgbqON/dAEvlUEFDCHZvhdtVik7kHfETO42JHcqQH9MCQKBoapzK9w/7FR08qGWskjlbKlIFFREDrlFzss5ejbaYMtEqA0uhuOHQQIKNokbXxFOGO32ykZwfFnjAidmcF4H9xJlycbeKACM0ZFTpg+Ga5UNmvUTKeLt26Nl4boOHP46weRrDuaVeXWf/+gqa9BV6hOg71pKKj0e3ZseCMvZ+zJM7h3oAR+XXDXX8tfNiCLFmAewFaMRkJYuZebGbvvlI0Ke6rjw7YMCdzoXe9zn3BokCi+MWLQrEBd6xTA8aUEyCqImiidss10GXAvsdXqf8CyELMMsSF8Vjxhv3vdbEk207OseN6Ui7H/st//zYrkPqhYAQFlZ6GbksaQT0/TAX4Nf+sG8H7k0J4U65cHNWnaovXQZ8fSXhnynr34XkLql/+82QHutXyV0qVSAPnLm4+ETTffoEtdWR0lriv/ZK3CaE+b95HVYIIZb4SG7Ry18PGqSEHuvvC6gCD2o3j4CsqzAngjKW0Z0OqsFF+9Ya85GIoynD6rV+Pt/9GngJAWr6ld8YKK8ktLzRFvjcYd0IasuBAi2sHyzNIwxai+GFdaOlPgMSuaEI5jP1dk= X-Forefront-PRVS: 014304E855 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR08MB0435; 23:MgZq6I9XQXq317B5Zxqw2MJT9lLATbX7OQMa0gnRT?= =?us-ascii?Q?GF1F7AuX7Cr05hHwegQotgsuvNrtK5bqVdwjUm6HDEqVxItT45zjqhGQpduS?= =?us-ascii?Q?PzM5W0tgmWADIRPZ1oEAJFvLPrUO4D1jfnOkOQ5GwxZnAF2pLA4tF+6r8lLE?= =?us-ascii?Q?vVUyDg4Cbg8k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H5w+rfSh5ComeN?= =?us-ascii?Q?uDInVIfqVWaXEpLYmuJsNlqESJC?= X-Microsoft-Exchange-Diagnostics: 1; AM2PR08MB0435; 6:Z7mc3YMEzmz8JQ1wuwe3PG9we+ClldvArOk58wXWFFDSvXaQeQrbZDDRRNj3kRmWxHlaHEsjP0jKY89a1GmgNoAcxR8g3sSg1Yded2gOAe2CBZfujXHuPxHL6rjsHy1SzTP4LXYPEejIsD70ejUgvHjoXVCmtN7yyQ27iOo4b+6gvzjBVJDJ0b7rPW1P7agK0wyNsp3A/Z0hbVwSSUhTHhEYwS+eaHmIpLnMa95Q/MvrvDDAwpUqXQ2RV6200m6nicryi4zYUTXNTTPNizyDjbsDW9vp3B7o8gTJ2oEBirBZzeghhAHrTNORiHEyUyeYe7srB6Wqn91X0jGQXzjYSanK/doNex4/qNjayaUDsO0C5jWx8QdKhll9Y/oj11GXljin5dfcn37lKFDTw1Ety8nGTnEGWDAWIWhIsJj74WrSlexUTYDgMXysQ+zGRD98bjWpyxNssTOvGD/vjpgLuD42G1LggwXI2ti/26isdBL2ThXP7e+ZZYQSxJgowqrh; 5:63RShnhARYEHyANYjpbWFiudUmNoQmUbrxQvuS644XBxchmWPXgT84SbwUcpcDsfSn+l3EdotWO2U7pfY1jWP/eydIP0yZFeuMR8kKOjx1vuiwd9S0QE4cfyDrUNLDPsAvrhGgQ0dQmO0d9Xr+ezBg==; 24:y+Mrh/iDIFLYTI9ZCYl84J1a2a4JipWjI6EeOrtS1FzNZX3NTGj0IR93+GYPvDCcjsjSWHyh2yfT426lyfruiF7c90jpRENUiOmkSf10zp8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM2PR08MB0435; 7:V96e7tSJ2uGMZb9FBGImc40idFJcBneccH2BLrpearXZZPriFrhAhbzki/BnlxDDuYvnp5/teosLfTE7LEUEeWx2E7SghyFqNlx5UKJrTyDF5I/qWalZBMNI3/1TjUvaJUZf35mBbU04gi1vitooJ4VWRxcJaP6mSndkUrzhO4tNahy0gwzCif6t5eBq2ZmPBAZFZu8OoXPypHI5z3yK3ujRydaLrA0pcO2GujEUjArxgff0SNPc5ipj6G2DE8QpeWvNTIDiY7BYENwqKjyTSm8R+kJbdqkcvdmUWzn80id3H8PmoGObQLNegfapUL8OxGGOENJqCsXVN458IWXCQxHf8n5WYh7m7JSJ4m42fKre6zZTMFewwSfzggFQTRgpmh23IEiWsYXHSa2bXKuqkJXUtM2lQipVbBNpuBFDk3V5VIWWNN7YUxfEdxe43m2hWNqYekzM6Bg3Q75cBx8Icg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2016 15:29:30.1012 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR08MB0435 X-IsSubscribed: yes Hi, There's no functional change in this patch, just a rename. The size recorded in "offset" is only ever incremented as we add new items to the constant pool. But this information can become stale where those constant pool entries would not get emitted. Thus, it is only ever an upper bound on the size of the constant pool. The only uses of get_pool_size are in rs6000 and there it is only used to check whether a constant pool might be output - but explicitly renaming the function to make it clear that you're getting an upper bound rather than the real size can only be good for programmers using the interface. OK? Thanks, James --- 2016-12-01 James Greenhalgh PR rtl-optimization/78561 * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p) Rename get_pool_size to get_pool_size_upper_bound. (rs6000_stack_info): Likewise. (rs6000_emit_prologue): Likewise. (rs6000_elf_declare_function_name): Likewise. (rs6000_set_up_by_prologue): Likewise. (rs6000_can_eliminate): Likewise, reformat spaces to tabs. * output.h (get_pool_size): Rename to... (get_pool_size_upper_bound): ...This. * varasm.c (get_pool_size): Rename to... (get_pool_size_upper_bound): ...This. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 0a6a784..7e965f9 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -25456,7 +25456,7 @@ rs6000_reg_live_or_pic_offset_p (int reg) if (TARGET_TOC && TARGET_MINIMAL_TOC && (crtl->calls_eh_return || df_regs_ever_live_p (reg) - || get_pool_size ())) + || get_pool_size_upper_bound ())) return true; if ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_DARWIN) @@ -26262,7 +26262,7 @@ rs6000_stack_info (void) #ifdef TARGET_RELOCATABLE || (DEFAULT_ABI == ABI_V4 && (TARGET_RELOCATABLE || flag_pic > 1) - && get_pool_size () != 0) + && get_pool_size_upper_bound () != 0) #endif || rs6000_ra_ever_killed ()) info->lr_save_p = 1; @@ -28039,7 +28039,8 @@ rs6000_emit_prologue (void) cfun->machine->r2_setup_needed = df_regs_ever_live_p (TOC_REGNUM); /* With -mminimal-toc we may generate an extra use of r2 below. */ - if (TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0) + if (TARGET_TOC && TARGET_MINIMAL_TOC + && get_pool_size_upper_bound () != 0) cfun->machine->r2_setup_needed = true; } @@ -28894,7 +28895,8 @@ rs6000_emit_prologue (void) /* If we are using RS6000_PIC_OFFSET_TABLE_REGNUM, we need to set it up. */ if (!TARGET_SINGLE_PIC_BASE - && ((TARGET_TOC && TARGET_MINIMAL_TOC && get_pool_size () != 0) + && ((TARGET_TOC && TARGET_MINIMAL_TOC + && get_pool_size_upper_bound () != 0) || (DEFAULT_ABI == ABI_V4 && (flag_pic == 1 || (flag_pic && TARGET_SECURE_PLT)) && df_regs_ever_live_p (RS6000_PIC_OFFSET_TABLE_REGNUM)))) @@ -34961,7 +34963,7 @@ rs6000_elf_declare_function_name (FILE *file, const char *name, tree decl) if (DEFAULT_ABI == ABI_V4 && (TARGET_RELOCATABLE || flag_pic > 1) && !TARGET_SECURE_PLT - && (get_pool_size () != 0 || crtl->profile) + && (get_pool_size_upper_bound () != 0 || crtl->profile) && uses_TOC ()) { char buf[256]; @@ -37444,10 +37446,11 @@ static bool rs6000_can_eliminate (const int from, const int to) { return (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM - ? ! frame_pointer_needed - : from == RS6000_PIC_OFFSET_TABLE_REGNUM - ? ! TARGET_MINIMAL_TOC || TARGET_NO_TOC || get_pool_size () == 0 - : true); + ? ! frame_pointer_needed + : from == RS6000_PIC_OFFSET_TABLE_REGNUM + ? ! TARGET_MINIMAL_TOC || TARGET_NO_TOC + || get_pool_size_upper_bound () == 0 + : true); } /* Define the offset between two registers, FROM to be eliminated and its @@ -38983,7 +38986,7 @@ rs6000_set_up_by_prologue (struct hard_reg_set_container *set) if (!TARGET_SINGLE_PIC_BASE && TARGET_TOC && TARGET_MINIMAL_TOC - && get_pool_size () != 0) + && get_pool_size_upper_bound () != 0) add_to_hard_reg_set (&set->set, Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM); if (cfun->machine->split_stack_argp_used) add_to_hard_reg_set (&set->set, Pmode, 12); diff --git a/gcc/output.h b/gcc/output.h index 0924499..7186dc1 100644 --- a/gcc/output.h +++ b/gcc/output.h @@ -287,8 +287,11 @@ extern void assemble_real (REAL_VALUE_TYPE, machine_mode, unsigned, /* Write the address of the entity given by SYMBOL to SEC. */ extern void assemble_addr_to_section (rtx, section *); -/* Return the size of the constant pool. */ -extern int get_pool_size (void); +/* Return the maximum size of the constant pool. This may be larger + than the final size of the constant pool, as entries may be added to + the constant pool which become unreferenced, or otherwise not need + output by the time we actually emit the pool. */ +extern int get_pool_size_upper_bound (void); extern rtx_insn *peephole (rtx_insn *); diff --git a/gcc/varasm.c b/gcc/varasm.c index 1e7c2b5..f8af0c1 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3811,7 +3811,7 @@ get_pool_mode (const_rtx addr) /* Return the size of the constant pool. */ int -get_pool_size (void) +get_pool_size_upper_bound (void) { return crtl->varasm.pool->offset; }