Jump to main content
MPLAB® XC-DSC C/C++ Compiler User Guide for dsPIC33C/E/F and dsPIC30 DSC
MPLAB® XC-DSC C/C++ Compiler User Guide for dsPIC33C/E/F and dsPIC30 DSC
  1. Home
  2. 6 Compiler Command-Line Driver
  3. 6.7 Driver Option Descriptions
  4. 6.7.6 Options for Controlling Optimization
Previous | Next
  • Notice to Development Tools Customers
  • 1 Preface
  • 2 Compiler Overview
  • 3 Compiler and Other Development Tools
  • 4 How To's
  • 5 XC-DSC Toolchain and Supporting IDEs
  • 6 Compiler Command-Line Driver
    • 6.1 Invoking the Compiler
    • 6.2 The C Compilation Sequence
    • 6.3 The C++ Compilation Sequence
    • 6.4 Runtime Files
    • 6.5 Compiler Output
    • 6.6 Compiler Messages
    • 6.7 Driver Option Descriptions
      • 6.7.1 Options Specific to DSC Devices
      • 6.7.2 Options for Controlling the Kind of Output
      • 6.7.3 Options for Controlling the C Dialect
      • 6.7.4 Options for Controlling Warnings and Errors
      • 6.7.5 Options for Debugging
      • 6.7.6 Options for Controlling Optimization
        • 6.7.6.1 -O0: Level 0 Optimizations
        • 6.7.6.2 -O1, -O: Level 1 Optimizations
        • 6.7.6.3 -O2: Level 2 Optimizations
        • 6.7.6.4 -O3: Level 3 Optimizations
        • 6.7.6.5 -Os: Level s Optimizations Option
        • 6.7.6.6 Options For Specific Optimization Control
        • 6.7.6.7 Options that Specify Machine-Independent Flags
      • 6.7.7 Options for Controlling the Preprocessor
      • 6.7.8 Options for Assembling
      • 6.7.9 Options for Linking
      • 6.7.10 Options for Directory Search
      • 6.7.11 Options for Code Generation Conventions
      • 6.7.12 Miscellaneous Options
    • 6.8 MPLAB® X IDE Toolchain Equivalents
  • 7 Device-Related Features
  • 8 Differences Between MPLAB® XC-DSC and Language Standards
  • 9 Supported Data Types and Variables
  • 10 Fixed-Point Arithmetic Support
  • 11 Memory Allocation and Access
  • 12 Operators and Statements
  • 13 Register Usage
  • 14 Functions
  • 15 Interrupts
  • 16 Main, Runtime Startup and Reset
  • 17 Mixing C/C++ and Assembly Code
  • 18 Library Routines
  • 19 Optimizations
  • 20 Preprocessing
  • 21 Linking Programs
  • 22 C Implementation-Defined Behavior
  • 23 C++ Implementation-Defined Behavior
  • 24 Embedded Compiler Compatibility Mode
  • 25 Common C Interface
  • 26 Diagnostic Pragmas
  • 27 Diagnostic Messages
  • 28 GNU Free Documentation License
  • 29 Built-in Functions
  • 30 Document Revision History
  • Microchip Information

6.7.6 Options for Controlling Optimization

The following options control compiler optimizations. See also 19 Optimizations.

Table 6-4. General Optimization Options
OptionSummary
-O0No optimizations (default)
-O1, -OOptimization level 1
-O2Optimization level 2
-O3Optimization level 3
-OsOptimization level s

Other optimization options are:

6.7.6.6 Options For Specific Optimization Control

6.7.6.7 Options that Specify Machine-Independent Flags

DS-50003589D

About

Company
Careers
Contact Us
Media Center
Investor Relations
Corporate Responsibility

Support

Microchip Forums
AVR Freaks
Design Help
Technical Support
Export Control Data
PCNs

Quick Links

microchipDIRECT.com
Microchip University
myMicrochip
Blogs
Reference Designs
Parametric Search
Microchip Logo

Microchip Technology Inc.

2355 West Chandler Blvd.

Chandler, Arizona, USA

Microchip Facebook
Microchip LinkedIn
Microchip Twitter
Microchip Instagram
Microchip Weibo

© Copyright 1998-2024 Microchip Technology Inc. All rights reserved. Shanghai ICP Recordal No.09049794

Terms Of Use
Privacy Notice
Legal
Your Privacy Choices California Consumer Privacy Act (CCPA) Opt-Out Icon