PRU Optimizing C/C++ Compiler V2.2 User's Guide (Rev. B) Manual
User Manual:
Open the PDF directly: View PDF
Page Count: 151 [warning: Documents this large are best viewed by clicking the View PDF Link!]
- Table of Contents
- Preface
- 1 Introduction to the Software Development Tools
- 2 Using the C/C++ Compiler
- 2.1 About the Compiler
- 2.2 Invoking the C/C++ Compiler
- 2.3 Changing the Compiler's Behavior with Options
- 2.3.1 Linker Options
- 2.3.2 Frequently Used Options
- 2.3.3 Miscellaneous Useful Options
- 2.3.4 Run-Time Model Options
- 2.3.5 Symbolic Debugging Options
- 2.3.6 Specifying Filenames
- 2.3.7 Changing How the Compiler Interprets Filenames
- 2.3.8 Changing How the Compiler Processes C Files
- 2.3.9 Changing How the Compiler Interprets and Names Extensions
- 2.3.10 Specifying Directories
- 2.3.11 Assembler Options
- 2.4 Controlling the Compiler Through Environment Variables
- 2.5 Controlling the Preprocessor
- 2.5.1 Predefined Macro Names
- 2.5.2 The Search Path for #include Files
- 2.5.3 Support for the #warning and #warn Directives
- 2.5.4 Generating a Preprocessed Listing File (--preproc_only Option)
- 2.5.5 Continuing Compilation After Preprocessing (--preproc_with_compile Option)
- 2.5.6 Generating a Preprocessed Listing File with Comments (--preproc_with_comment Option)
- 2.5.7 Generating Preprocessed Listing with Line-Control Details (--preproc_with_line Option)
- 2.5.8 Generating Preprocessed Output for a Make Utility (--preproc_dependency Option)
- 2.5.9 Generating a List of Files Included with #include (--preproc_includes Option)
- 2.5.10 Generating a List of Macros in a File (--preproc_macros Option)
- 2.6 Passing Arguments to main()
- 2.7 Understanding Diagnostic Messages
- 2.8 Other Messages
- 2.9 Generating Cross-Reference Listing Information (--gen_cross_reference Option)
- 2.10 Generating a Raw Listing File (--gen_preprocessor_listing Option)
- 2.11 Using Inline Function Expansion
- 2.12 Using Interlist
- 2.13 Enabling Entry Hook and Exit Hook Functions
- 3 Optimizing Your Code
- 3.1 Invoking Optimization
- 3.2 Performing File-Level Optimization (--opt_level=3 option)
- 3.3 Program-Level Optimization (--program_level_compile and --opt_level=3 options)
- 3.4 Link-Time Optimization (--opt_level=4 Option)
- 3.5 Accessing Aliased Variables in Optimized Code
- 3.6 Use Caution With asm Statements in Optimized Code
- 3.7 Automatic Inline Expansion (--auto_inline Option)
- 3.8 Using the Interlist Feature With Optimization
- 3.9 Debugging and Profiling Optimized Code
- 3.10 Controlling Code Size Versus Speed
- 3.11 What Kind of Optimization Is Being Performed?
- 3.11.1 Cost-Based Register Allocation
- 3.11.2 Alias Disambiguation
- 3.11.3 Branch Optimizations and Control-Flow Simplification
- 3.11.4 Data Flow Optimizations
- 3.11.5 Expression Simplification
- 3.11.6 Inline Expansion of Functions
- 3.11.7 Function Symbol Aliasing
- 3.11.8 Induction Variables and Strength Reduction
- 3.11.9 Loop-Invariant Code Motion
- 3.11.10 Loop Rotation
- 3.11.11 Instruction Scheduling
- 3.11.12 Tail Merging
- 3.11.13 Autoincrement Addressing
- 3.11.14 Epilog Inlining
- 3.11.15 Integer Division With Constant Divisor
- 4 Linking C/C++ Code
- 4.1 Invoking the Linker Through the Compiler (-z Option)
- 4.2 Linker Code Optimizations
- 4.3 Controlling the Linking Process
- 5 PRU C/C++ Language Implementation
- 5.1 Characteristics of PRU C
- 5.2 Characteristics of PRU C++
- 5.3 Using MISRA C 2004
- 5.4 Data Types
- 5.5 Keywords
- 5.6 C++ Exception Handling
- 5.7 Register Variables and Parameters
- 5.8 The __asm Statement
- 5.9 Pragma Directives
- 5.9.1 The CALLS Pragma
- 5.9.2 The CHECK_MISRA Pragma
- 5.9.3 The CODE_SECTION Pragma
- 5.9.4 The DATA_ALIGN Pragma
- 5.9.5 The DATA_SECTION Pragma
- 5.9.6 The Diagnostic Message Pragmas
- 5.9.7 The FUNC_ALWAYS_INLINE Pragma
- 5.9.8 The FUNC_CANNOT_INLINE Pragma
- 5.9.9 The FUNC_EXT_CALLED Pragma
- 5.9.10 The FUNCTION_OPTIONS Pragma
- 5.9.11 The LOCATION Pragma
- 5.9.12 The MUST_ITERATE Pragma
- 5.9.13 The NOINIT and PERSISTENT Pragmas
- 5.9.14 The NO_HOOKS Pragma
- 5.9.15 The pack Pragma
- 5.9.16 The RESET_MISRA Pragma
- 5.9.17 The RETAIN Pragma
- 5.9.18 The SET_CODE_SECTION and SET_DATA_SECTION Pragmas
- 5.9.19 The UNROLL Pragma
- 5.9.20 The WEAK Pragma
- 5.10 The _Pragma Operator
- 5.11 PRU Instruction Intrinsics
- 5.12 Object File Symbol Naming Conventions (Linknames)
- 5.13 Changing the ANSI/ISO C/C++ Language Mode
- 5.14 GNU Language Extensions
- 5.15 Compiler Limits
- 6 Run-Time Environment
- 6.1 Memory Model
- 6.2 Object Representation
- 6.3 Register Conventions
- 6.4 Function Structure and Calling Conventions
- 6.5 Accessing Linker Symbols in C and C++
- 6.6 Interfacing C and C++ With Assembly Language
- 6.7 System Initialization
- 7 Using Run-Time-Support Functions and Building Libraries
- 8 C++ Name Demangler
- A Glossary
- B Revision History
- Important Notice