ARM Optimizing C/C++ Compiler V17.9.0.STS User's Guide

Total Page:16

File Type:pdf, Size:1020Kb

ARM Optimizing C/C++ Compiler V17.9.0.STS User's Guide ARM Optimizing C/C++ Compiler v17.9.0.STS User's Guide Literature Number: SPNU151Q September 2017 Contents Preface ........................................................................................................................................ 9 1 Introduction to the Software Development Tools.................................................................... 12 1.1 Software Development Tools Overview ................................................................................. 13 1.2 Compiler Interface.......................................................................................................... 15 1.3 ANSI/ISO Standard ........................................................................................................ 15 1.4 Output Files ................................................................................................................. 15 1.5 Utilities ....................................................................................................................... 16 2 Using the C/C++ Compiler ................................................................................................... 17 2.1 About the Compiler......................................................................................................... 18 2.2 Invoking the C/C++ Compiler ............................................................................................. 18 2.3 Changing the Compiler's Behavior with Options ....................................................................... 19 2.3.1 Linker Options ..................................................................................................... 25 2.3.2 Frequently Used Options......................................................................................... 27 2.3.3 Miscellaneous Useful Options ................................................................................... 28 2.3.4 Run-Time Model Options......................................................................................... 30 2.3.5 Symbolic Debugging and Profiling Options .................................................................... 32 2.3.6 Specifying Filenames ............................................................................................. 33 2.3.7 Changing How the Compiler Interprets Filenames ........................................................... 33 2.3.8 Changing How the Compiler Processes C Files .............................................................. 33 2.3.9 Changing How the Compiler Interprets and Names Extensions ............................................ 34 2.3.10 Specifying Directories............................................................................................ 34 2.3.11 Assembler Options............................................................................................... 35 2.3.12 Deprecated Options.............................................................................................. 35 2.4 Controlling the Compiler Through Environment Variables............................................................ 35 2.4.1 Setting Default Compiler Options (TI_ARM_C_OPTION).................................................... 36 2.4.2 Naming One or More Alternate Directories (TI_ARM_C_DIR) .............................................. 37 2.5 Controlling the Preprocessor ............................................................................................. 38 2.5.1 Predefined Macro Names ........................................................................................ 38 2.5.2 The Search Path for #include Files ............................................................................. 41 2.5.3 Support for the #warning and #warn Directives ............................................................... 42 2.5.4 Generating a Preprocessed Listing File (--preproc_only Option) ........................................... 42 2.5.5 Continuing Compilation After Preprocessing (--preproc_with_compile Option) ........................... 43 2.5.6 Generating a Preprocessed Listing File with Comments (--preproc_with_comment Option) ........... 43 2.5.7 Generating Preprocessed Listing with Line-Control Details (--preproc_with_line Option) ............... 43 2.5.8 Generating Preprocessed Output for a Make Utility (--preproc_dependency Option) ................... 43 2.5.9 Generating a List of Files Included with #include (--preproc_includes Option) ........................... 43 2.5.10 Generating a List of Macros in a File (--preproc_macros Option) ......................................... 43 2.6 Passing Arguments to main()............................................................................................. 44 2.7 Understanding Diagnostic Messages.................................................................................... 44 2.7.1 Controlling Diagnostic Messages ............................................................................... 46 2.7.2 How You Can Use Diagnostic Suppression Options ......................................................... 47 2.8 Other Messages ............................................................................................................ 47 2.9 Generating Cross-Reference Listing Information (--gen_cross_reference Option)................................ 47 2.10 Generating a Raw Listing File (--gen_preprocessor_listing Option)................................................. 48 2.11 Using Inline Function Expansion ......................................................................................... 49 2 Contents SPNU151Q–September 2017 Submit Documentation Feedback Copyright © 2017, Texas Instruments Incorporated www.ti.com 2.11.1 Inlining Intrinsic Operators ...................................................................................... 50 2.11.2 Automatic Inlining ................................................................................................ 50 2.11.3 Inlining Restrictions .............................................................................................. 51 2.12 Using Interlist ............................................................................................................... 52 2.13 Controlling Application Binary Interface ................................................................................. 52 2.14 VFP Support ................................................................................................................ 53 2.15 Enabling Entry Hook and Exit Hook Functions......................................................................... 54 3 Optimizing Your Code......................................................................................................... 55 3.1 Invoking Optimization ...................................................................................................... 56 3.2 Performing File-Level Optimization (--opt_level=3 option)............................................................ 57 3.2.1 Creating an Optimization Information File (--gen_opt_info Option)......................................... 57 3.3 Program-Level Optimization (--program_level_compile and --opt_level=3 options)............................... 57 3.3.1 Controlling Program-Level Optimization (--call_assumptions Option)...................................... 58 3.3.2 Optimization Considerations When Mixing C/C++ and Assembly .......................................... 59 3.4 Link-Time Optimization (--opt_level=4 Option) ......................................................................... 60 3.4.1 Option Handling ................................................................................................... 60 3.4.2 Incompatible Types ............................................................................................... 60 3.5 Using Feedback Directed Optimization.................................................................................. 60 3.5.1 Feedback Directed Optimization ................................................................................ 61 3.5.2 Profile Data Decoder.............................................................................................. 63 3.5.3 Feedback Directed Optimization API ........................................................................... 64 3.5.4 Feedback Directed Optimization Summary .................................................................... 64 3.6 Using Profile Information to Analyze Code Coverage ................................................................. 65 3.6.1 Code Coverage.................................................................................................... 65 3.6.2 Related Features and Capabilities .............................................................................. 66 3.7 Accessing Aliased Variables in Optimized Code....................................................................... 67 3.8 Use Caution With asm Statements in Optimized Code ............................................................... 67 3.9 Automatic Inline Expansion (--auto_inline Option) ..................................................................... 67 3.10 Using the Interlist Feature With Optimization........................................................................... 68 3.11 Debugging and Profiling Optimized Code............................................................................... 70 3.11.1 Profiling Optimized Code........................................................................................ 70 3.12 Controlling
Recommended publications
  • Beginning Portable Shell Scripting from Novice to Professional
    Beginning Portable Shell Scripting From Novice to Professional Peter Seebach 10436fmfinal 1 10/23/08 10:40:24 PM Beginning Portable Shell Scripting: From Novice to Professional Copyright © 2008 by Peter Seebach All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-4302-1043-6 ISBN-10 (pbk): 1-4302-1043-5 ISBN-13 (electronic): 978-1-4302-1044-3 ISBN-10 (electronic): 1-4302-1044-3 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Lead Editor: Frank Pohlmann Technical Reviewer: Gary V. Vaughan Editorial Board: Clay Andres, Steve Anglin, Ewan Buckingham, Tony Campbell, Gary Cornell, Jonathan Gennick, Michelle Lowman, Matthew Moodie, Jeffrey Pepper, Frank Pohlmann, Ben Renow-Clarke, Dominic Shakeshaft, Matt Wade, Tom Welsh Project Manager: Richard Dal Porto Copy Editor: Kim Benbow Associate Production Director: Kari Brooks-Copony Production Editor: Katie Stence Compositor: Linda Weidemann, Wolf Creek Press Proofreader: Dan Shaw Indexer: Broccoli Information Management Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013.
    [Show full text]
  • Chapter 3 Composite Default Screen Blind Folio 3:61
    Color profile: GenericORACLE CMYK printerTips & Techniques profile 8 / Oracle9i for Windows 2000 Tips & Techniques / Jesse, Sale, Hart / 9462-6 / Chapter 3 Composite Default screen Blind Folio 3:61 CHAPTER 3 Configuring Windows 2000 P:\010Comp\OracTip8\462-6\ch03.vp Wednesday, November 14, 2001 3:20:31 PM Color profile: GenericORACLE CMYK printerTips & Techniques profile 8 / Oracle9i for Windows 2000 Tips & Techniques / Jesse, Sale, Hart / 9462-6 / Chapter 3 Composite Default screen Blind Folio 3:62 62 Oracle9i for Windows 2000 Tips & Techniques here are three basic configurations of Oracle on Windows 2000: as T a management platform, as an Oracle client, and as a database server. The first configuration is the platform from which you will manage Oracle installations across various machines on various operating systems. Most system and database administrators are given a desktop PC to perform day-to-day tasks that are not DBA specific (such as reading e-mail). From this desktop, you can also manage Oracle components installed on other operating systems (for example, Solaris, Linux, and HP-UX). Even so, you will want to configure Windows 2000 to make your system and database administrative tasks quick and easy. The Oracle client software configuration is used in more configurations than you might first suspect: ■ Web applications that connect to an Oracle database: ■ IIS 5 ASPs that use ADO to connect to an Oracle database ■ Perl DBI application running on Apache that connects to an Oracle database ■ Any J2EE application server that uses the thick JDBC driver ■ Client/server applications: ■ Desktop Visual Basic application that uses OLEDB or ODBC to connect to an Oracle Database ■ Desktop Java application that uses the thick JDBC to connect to Oracle In any of these configurations, at least an Oracle client installation is required.
    [Show full text]
  • Technical Computing on the OS … That Is Not Linux! Or How to Leverage Everything You‟Ve Learned, on a Windows Box As Well
    Tools of the trade: Technical Computing on the OS … that is not Linux! Or how to leverage everything you‟ve learned, on a Windows box as well Sean Mortazavi & Felipe Ayora Typical situation with TC/HPC folks Why I have a Windows box How I use it It was in the office when I joined Outlook / Email IT forced me PowerPoint I couldn't afford a Mac Excel Because I LIKE Windows! Gaming It's the best gaming machine Technical/Scientific computing Note: Stats completely made up! The general impression “Enterprise community” “Hacker community” Guys in suits Guys in jeans Word, Excel, Outlook Emacs, Python, gmail Run prepackaged stuff Builds/runs OSS stuff Common complaints about Windows • I have a Windows box, but Windows … • Is hard to learn… • Doesn‟t have a good shell • Doesn‟t have my favorite editor • Doesn‟t have my favorite IDE • Doesn‟t have my favorite compiler or libraries • Locks me in • Doesn‟t play well with OSS • …. • In summary: (More like ) My hope … • I have a Windows box, and Windows … • Is easy to learn… • Has excellent shells • Has my favorite editor • Supports my favorite IDE • Supports my compilers and libraries • Does not lock me in • Plays well with OSS • …. • In summary: ( or at least ) How? • Recreating a Unix like veneer over windows to minimize your learning curve • Leverage your investment in know how & code • Showing what key codes already run natively on windows just as well • Kicking the dev tires using cross plat languages Objective is to: Help you ADD to your toolbox, not take anything away from it! At a high level… • Cygwin • SUA • Windowing systems “The Unix look & feel” • Standalone shell/utils • IDE‟s • Editors General purpose development • Compilers / languages / Tools • make • Libraries • CAS environments Dedicated CAS / IDE‟s And if there is time, a couple of demos… Cygwin • What is it? • A Unix like environment for Windows.
    [Show full text]
  • ARM Optimizing C/C++ Compiler V20.2.0.LTS User's Guide (Rev. V)
    ARM Optimizing C/C++ Compiler v20.2.0.LTS User's Guide Literature Number: SPNU151V January 1998–Revised February 2020 Contents Preface ........................................................................................................................................ 9 1 Introduction to the Software Development Tools.................................................................... 12 1.1 Software Development Tools Overview ................................................................................. 13 1.2 Compiler Interface.......................................................................................................... 15 1.3 ANSI/ISO Standard ........................................................................................................ 15 1.4 Output Files ................................................................................................................. 15 1.5 Utilities ....................................................................................................................... 16 2 Using the C/C++ Compiler ................................................................................................... 17 2.1 About the Compiler......................................................................................................... 18 2.2 Invoking the C/C++ Compiler ............................................................................................. 18 2.3 Changing the Compiler's Behavior with Options ......................................................................
    [Show full text]
  • Learning the Bash Shell, 3Rd Edition
    1 Learning the bash Shell, 3rd Edition Table of Contents 2 Preface bash Versions Summary of bash Features Intended Audience Code Examples Chapter Summary Conventions Used in This Handbook We'd Like to Hear from You Using Code Examples Safari Enabled Acknowledgments for the First Edition Acknowledgments for the Second Edition Acknowledgments for the Third Edition 1. bash Basics 3 1.1. What Is a Shell? 1.2. Scope of This Book 1.3. History of UNIX Shells 1.3.1. The Bourne Again Shell 1.3.2. Features of bash 1.4. Getting bash 1.5. Interactive Shell Use 1.5.1. Commands, Arguments, and Options 1.6. Files 1.6.1. Directories 1.6.2. Filenames, Wildcards, and Pathname Expansion 1.6.3. Brace Expansion 1.7. Input and Output 1.7.1. Standard I/O 1.7.2. I/O Redirection 1.7.3. Pipelines 1.8. Background Jobs 1.8.1. Background I/O 1.8.2. Background Jobs and Priorities 1.9. Special Characters and Quoting 1.9.1. Quoting 1.9.2. Backslash-Escaping 1.9.3. Quoting Quotation Marks 1.9.4. Continuing Lines 1.9.5. Control Keys 4 1.10. Help 2. Command-Line Editing 2.1. Enabling Command-Line Editing 2.2. The History List 2.3. emacs Editing Mode 2.3.1. Basic Commands 2.3.2. Word Commands 2.3.3. Line Commands 2.3.4. Moving Around in the History List 2.3.5. Textual Completion 2.3.6. Miscellaneous Commands 2.4. vi Editing Mode 2.4.1.
    [Show full text]
  • Microsoft Windows NT from a UNIX Point of View 1
    Microsoft ® Windows NT™ from a Unix ® Point of View A White Paper from the Business Systems Technology Series Microsoft Windows NT ™ from a Unix ® Point of View A White Paper from the Business Systems Technology Series Abstract This paper provides a technical overview of Windows NT for the information technology (IT) professional with a strong background in Unix. It approaches the subject from the Unix point of view and relates the concepts of Windows NT to corresponding ones found in Unix. It begins with a technical comparison of the two operating systems, moves on to cover how the two can coexist in a heterogeneous environment, and finishes with a brief section describing some of the tools available to aid developers in creating applications for both platforms. About the Microsoft Business Systems Technology Series The Microsoft® Business Systems Technology Series consists of a number of interrelated white papers dedicated to educating information technology (IT) professionals about Windows NT and the Microsoft BackOffice™ family of products. While current technologies used in Microsoft products are often covered, the real purpose of this series is to give the reader an idea of how major technologies are evolving, how Microsoft is using those technologies, and what this means to IT planners. Legal Notice The descriptions of other companies’ products in this paper are provided only as a convenience to the reader. Microsoft cannot guarantee their accuracy, and the products may change over time. Also, the descriptions are intended as brief highlights to aid understanding, rather than as thorough coverage. For authoritative descriptions of these products, please consult their respective manufacturers.
    [Show full text]
  • Building and Installing GNU Units on Microsoft Windows with the MKS Toolkit Edition 2.1 for Units Version 2.21
    Building and Installing GNU units on Microsoft Windows with the MKS Toolkit Edition 2.1 for units Version 2.21 Jeff Conrad This manual is for building and installing GNU units (version 2.21) on Microsoft Windows with the PTC MKS Toolkit. Copyright c 2016{2020 Free Software Foundation, Inc. i Table of Contents Preface ::::::::::::::::::::::::::::::::::::::::::::::: 1 Building and Installing units ::::::::::::::::::::::: 1 Overview :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 1 Configuring configure :::::::::::::::::::::::::::::::::::::::::::::: 2 Customizing the Installation ::::::::::::::::::::::::::::::::::::::::: 2 Administrative Privilege ::::::::::::::::::::::::::::::::::::::::::::: 3 Environment Variables for Visual Studio ::::::::::::::::::::::::::::: 3 Initialization with the Korn Shell ::::::::::::::::::::::::::::::::: 3 Adjustment for Different Visual Studio Installations ::::::::::::::: 3 \install" Programs ::::::::::::::::::::::::::::::::::::::::::::::::::: 4 Running with Administrative Privilege :::::::::::::::::::::::::::: 4 Providing a Manifest File ::::::::::::::::::::::::::::::::::::::::: 4 Embedding a Manifest in the install Program ::::::::::::::::::::: 4 Fine Tuning Makefile ::::::::::::::::::::::::::::::: 5 Behavior of PAGER ::::::::::::::::::::::::::::::::::::::::::::::::::: 5 MKS make and Suffix Rules :::::::::::::::::::::::::::::::::::::::::: 5 Install Program :::::::::::::::::::::::::::::::::::::::::::::::::::::: 5 Icons and File Association :::::::::::::::::::::::::: 6 MKS units:::::::::::::::::::::::::::::::::::::::::::
    [Show full text]
  • Mks Toolkit 64 Bit Free Download
    Mks Toolkit 64 Bit Free Download Mks Toolkit 64 Bit Free Download 1 / 5 2 / 5 The MKS Toolkit Resource Kit, a valuable collection of tools, code, and ... of customers and are free to all valid licensees of PTC MKS Toolkit products. ... The GNU C/C++ add-on for NuTCRACKER is deprecated and is available for download for ... line and source code compatibility and produces both 32 and 64 bit code for .... The MKS Toolkit installer begins. As the installer continues with the process of modifying your MKS Toolkit configuration, you are given the opportunity to select a ... 1. toolkit 2. toolkit meaning 3. toolkitrc m6d If you are using a 64-bit server, you should test both of these settings. ... But it may not be convenient to download the plugin to the PC and upload it ... Create your own free website, get a domain name, fast hosting, online ... PTC MKS Toolkit is the leader in UNIX to Windows scripting, connectivity and application migration.. You could speedily download this mks toolkit unix windows porting guide after ... 10 64 bit free mks toolkit for windows 10 64 bit free most people looking for. toolkit toolkit, toolkit meaning, toolkitcma, toolkit for facebook, toolkit app, toolkit microsoft, toolkit software, toolkit synonym, toolkitsonline, toolkit functions, toolkit case, toolkit meaning in hindi, toolkit case in hindi, toolkit case india, toolkit greta Helpndoc Professional Crack 38 The Windows operating system has a long history of different tools providing a ... Building 64-bit FreeType libraries for OpenJDK 6 on Windows ... Running tests using the downloaded or the built version of jtreg ..
    [Show full text]
  • MKS Toolkit UNIX to Windows Porting Guide
    MKS Toolkit UNIX to Windows Porting Guide MKS Inc. MKS Toolkit: UNIX to Windows Porting Guide ©2004 MKS Software Inc.; in Canada copyright owned by MKS Inc. All rights reserved. MKS, MKS Toolkit, and AlertCentre are registered trademarks of MKS Inc. NuTCRACKER is a registered trademark of MKS Software Inc. All other trademarks referenced are the property of their respective owners. MKS Inc. 12450 Fair Lakes Circle Suite 400 Fairfax, Virginia 22033 Phone: +1 703 803-3343 Fax: +1 703 803-3344 E-mail: [email protected] 8.7-0604 Technical Support To request customer support, please contact us by one of the means listed below and in your request include the name and version number of the product, your serial number, and the operating system and version/patch level that you are using. Contact MKS customer support at: Web: http://www.mkssoftware.com/support E-mail: [email protected] Telephone: +1-703-803-7660 (9:00am to 7:00pm Eastern, Mon-Fri) Fax: +1-703-803-3344 When reporting problems, please provide a test case and test procedure, if possible. If you are following up on a previously reported problem, please include the problem tracking number in your correspondence. Finally, tell us how we can contact you. Please give us your e-mail address and telephone number. UNIX to Windows Porting Guide iii iv MKS Toolkit Table of Contents 1 Introduction...............................................................1 A Note About Compilers ........................................................................2 2 Windows Concepts ..................................................3
    [Show full text]
  • All MKS Toolkit Commands
    All MKS Toolkit Commands The various MKS Toolkit products include different subsets of commands and utilities. Click the product link on the right to view the product-specific command lists. * denotes a Shell built-in † denotes a groff command ‡ denotes a command which requires an X Server § denotes a command that applies only to N uTCRACKER Platform applications ¥ denotes a command whose binary and source code can be found in the Samples directory of the CD distribution or in the Resource Kit and is an example of porting UNIX source code with MKS Toolkit for Enterprise Developers . * — execute KornShell script in current environment : * — expand arguments and do nothing, successfully [ * — test for condition [[ * — test for condition 64decode.exe — decode a file using base64 64encode.exe — encode a file using base64 a2p.exe — awk to perl translator addftinfo.exe †¥ — add information to troff font files for use with groff afmtodit.exe †¥ — create font files fo ruse with groff -Tps alias * — display or create command aliases appc.ksh — arbitrary precision programmable calculator AppPkgWz.exe — Packaging Wizard for deploying MKS Toolkit ported applications. appres.exe ‡ — list X application resource database ar.exe — create and maintain library archives asa.exe — interpret ASA/FORTRAN carriage control assoc.ksh — set file extension association at.exe — execute commands at a later time atobm.exe ‡ — bitmap editor and converter for the X Window System autoload * — display or modify Shell functions autorun.ksh — specify programs to run on bootup
    [Show full text]
  • MKS Toolkit for Developers
    MKS Toolkit for Developers A mixed computing environment, . Efficiently and cost-effectively Issues of interoperability also by consequence, demands a deploy UNIX trained affect development for the Web, consistent set of commands and personnel to new platforms. as companies intermingle UNIX utilities. A significant number of and Windows Web servers. MKS . Ease the interoperability corporate developers are fluent in Toolkit for Developers has high- challenge by seamlessly the UNIX environment, so utilities performance text utilities and sharing programming scripts, which are UNIX-based yet specialized Web development files and data between UNIX operate in Windows, can instantly tools that are ideal for and Windows. leverage the skills of UNIX trained maintaining HTML and all aspects people onto new platforms. of Web sites. Scripting languages and familiar MKS Toolkit for Developers also tools ensure that the valuable accelerates personal performance Lower TCO through Enterprise programming expertise of UNIX on the Windows platform by Interoperability developers, and the power of including Windows specific tools Instead of choosing between commands such as the KornShell, to: Windows and UNIX, most MIS CShell, awk, and Perl, does not . Unify and automate software organizations are opting for a mix have to be compromised because builds across UNIX and of the two operating systems, of the introduction of Windows. Windows. with many larger organizations Such utilities also reduce the using Windows as an add-on to immediate need for cross- . Connect to remote UNIX and their enterprise-wide backroom platform training. Windows machines. strategy. In order to decrease the total cost of ownership (TCO) of Global 2000 customers use the .
    [Show full text]
  • The Table of Equivalents / Replacements / Analogs of Windows Software in Linux
    The table of equivalents / replacements / analogs of Windows software in Linux. Last update: 16.07.2003, 31.01.2005, 27.05.2005, 04.12.2006 You can always find the last version of this table on the official site: http://www.linuxrsp.ru/win-lin-soft/. This page on other languages: Russian, Italian, Spanish, French, German, Hungarian, Chinese. One of the biggest difficulties in migrating from Windows to Linux is the lack of knowledge about comparable software. Newbies usually search for Linux analogs of Windows software, and advanced Linux-users cannot answer their questions since they often don't know too much about Windows :). This list of Linux equivalents / replacements / analogs of Windows software is based on our own experience and on the information obtained from the visitors of this page (thanks!). This table is not static since new application names can be added to both left and the right sides. Also, the right column for a particular class of applications may not be filled immediately. In future, we plan to migrate this table to the PHP/MySQL engine, so visitors could add the program themselves, vote for analogs, add comments, etc. If you want to add a program to the table, send mail to winlintable[a]linuxrsp.ru with the name of the program, the OS, the description (the purpose of the program, etc), and a link to the official site of the program (if you know it). All comments, remarks, corrections, offers and bugreports are welcome - send them to winlintable[a]linuxrsp.ru. Notes: 1) By default all Linux programs in this table are free as in freedom.
    [Show full text]