From patchwork Fri Jan 24 00:57:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Martin X-Patchwork-Id: 23661 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A645B20307 for ; Fri, 24 Jan 2014 00:58:25 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id e14sf6009928iej.4 for ; Thu, 23 Jan 2014 16:58:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:thread-topic :thread-index:message-id:references:in-reply-to:accept-language :acceptlanguage:mime-version:subject:precedence:reply-to:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-language:content-type :content-transfer-encoding; bh=74QRXDvMP3ywohZWOUxuTmZH/FFxX+11APzUilouWts=; b=JToOMVoIO6kQMNnRD0UYivaOdoT5+kzF5D3Cv4piN8BaJ3hvBEe+6OfHSFfPrWwyK4 SZzNcgjC6EBIYg+2J1ektwoECMo4BXsAUiS4TizKYx4JrpDQYqCjt0FRkjolUmNCDdvF myJXcq/vsa+rVmxzBzlGtEI9PPMtv48BcAUz/BHaj6KuZ0eOMx4W+/tRLp4wNtdtrJ5B rBK/UqfvQ+oNpH+X6p6BFClaRzaRNI7oL7NFd8f1bEw7og3VD9WaPRneAIY0lG+TslD7 5GMH1QlZF65ePh+K/DPStqBJFQgQ8YNdRG2p63FHBNjMBndWrZbQNGyvhyjizrs3S6RV 5NTQ== X-Gm-Message-State: ALoCoQnas4CqJuwLqlBe+QHc62vVmO8OcnRi0VYAIalz8u/JAyt+/S0Gdx3tXKC5wX6AKmMDVdnT X-Received: by 10.182.216.200 with SMTP id os8mr4229112obc.0.1390525104640; Thu, 23 Jan 2014 16:58:24 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.85.133 with SMTP id n5ls69059qgd.64.gmail; Thu, 23 Jan 2014 16:58:24 -0800 (PST) X-Received: by 10.58.66.137 with SMTP id f9mr6035265vet.11.1390525104427; Thu, 23 Jan 2014 16:58:24 -0800 (PST) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id uh1si7615415vcb.100.2014.01.23.16.58.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Jan 2014 16:58:24 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id ie18so1487295vcb.26 for ; Thu, 23 Jan 2014 16:58:24 -0800 (PST) X-Received: by 10.58.80.103 with SMTP id q7mr6131419vex.33.1390525104089; Thu, 23 Jan 2014 16:58:24 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp65383vcz; Thu, 23 Jan 2014 16:58:23 -0800 (PST) X-Received: by 10.43.78.78 with SMTP id zl14mr8681182icb.5.1390525102953; Thu, 23 Jan 2014 16:58:22 -0800 (PST) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id b7si1088627igb.43.2014.01.23.16.58.22 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 Jan 2014 16:58:22 -0800 (PST) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1W6V64-0003YO-J0; Fri, 24 Jan 2014 00:58:12 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1W6V63-0003YI-Em for edk2-devel@lists.sourceforge.net; Fri, 24 Jan 2014 00:58:11 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of arm.com designates 195.130.217.12 as permitted sender) client-ip=195.130.217.12; envelope-from=olivier.martin@arm.com; helo=service88.mimecast.com; Received: from service88.mimecast.com ([195.130.217.12]) by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1W6V61-0001WK-2c for edk2-devel@lists.sourceforge.net; Fri, 24 Jan 2014 00:58:11 +0000 Received: from emea-cam-gw1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) (Using TLS) by service88.mimecast.com; Fri, 24 Jan 2014 00:58:02 +0000 Received: from george.Emea.Arm.com ([fe80::4c19:a8f:5c9a:76df]) by emea-cam-gw1.Emea.Arm.com ([::1]) with mapi; Fri, 24 Jan 2014 00:58:00 +0000 From: Olivier Martin To: "edk2-devel@lists.sourceforge.net" Date: Fri, 24 Jan 2014 00:57:07 +0000 Thread-Topic: [edk2] Need for FixedFeaturePcdGet() ? Thread-Index: Ac8Yb8HjcTZqi5R3QS+eepBypDlv/AAL3JCd Message-ID: <0877601216922E4B83A7129715B5DA2B9A6C574B09@GEORGE.Emea.Arm.com> References: <006c01cf1864$f062d980$d1288c80$%martin@arm.com> <7236196A5DF6C040855A6D96F556A53F16DCDC@msmail.insydesw.com.tw> <007501cf1868$b6447980$22cd6c80$%martin@arm.com> , In-Reply-To: Accept-Language: en-US, en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, en-GB MIME-Version: 1.0 X-MC-Unique: 114012400580200202 X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1W6V61-0001WK-2c Subject: Re: [edk2] Need for FixedFeaturePcdGet() ? X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: olivier.martin@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.181 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Content-Language: en-GB It actually came back to my mind that GCC has a similar feature ... which has the same name LTO for 'Link Time Optimization': http://gcc.gnu.org/wiki/LinkTimeOptimization I have just tried it using a quite recent toolchain (arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.8.3 20131129 (release)). And it saved me 8 bytes! Without -lto: FVMAIN_SEC [9%Full] 524288 total, 47648 used, 476640 free FVMAIN_COMPACT [28%Full] 2621440 total, 748992 used, 1872448 free FVMAIN [99%Full] 1941376 total, 1941344 used, 32 free With -lto: FVMAIN_SEC [9%Full] 524288 total, 47648 used, 476640 free FVMAIN_COMPACT [28%Full] 2621440 total, 748984 used, 1872456 free FVMAIN [99%Full] 1941376 total, 1941344 used, 32 free I am now wondering if the 8 bytes comes from the change of date from Thursday to Friday... --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -1077,6 +1077,8 @@ def CreateLibraryPcdCode(Info, AutoGenC, AutoGenH, Pcd): if PcdItemType == TAB_PCDS_FIXED_AT_BUILD and key in Info.ConstPcd: AutoGenH.Append('#define _PCD_VALUE_%s %s\n' %(TokenCName, Pcd.DefaultValue)) + else: + AutoGenH.Append('#define _PCD_VALUE_%s %s\n' %(TokenCName, Pcd.DefaultValue) -------------- After rebuilding my platform (ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-RTSM-A9x4.dsc) in RELEASE build, here is the result: -------------- bl ArmDisableFiq