Jump to main content
MPLAB XC-DSC C Compiler User's Guide
MPLAB XC-DSC C Compiler User's Guide
  1. Home
  2. 6 Compiler Command-Line Driver
  3. 6.6 Driver Option Descriptions
  4. 6.6.6 Options for Controlling Optimization
  • 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 MPLAB® X IDE
  • 6 Compiler Command-Line Driver
    • 6.1 Invoking the Compiler
    • 6.2 The Compilation Sequence
    • 6.3 Runtime Files
    • 6.4 Compiler Output
    • 6.5 Compiler Messages
    • 6.6 Driver Option Descriptions
      • 6.6.1 Options Specific to DSC Devices
      • 6.6.2 Options for Controlling the Kind of Output
      • 6.6.3 Options for Controlling the C Dialect
      • 6.6.4 Options for Controlling Warnings and Errors
      • 6.6.5 Options for Debugging
      • 6.6.6 Options for Controlling Optimization
        • 6.6.6.1 -O0: Level 0 Optimizations
        • 6.6.6.2 -O1, -O: Level 1 Optimizations
        • 6.6.6.3 -O2: Level 2 Optimizations
        • 6.6.6.4 -O3: Level 3 Optimizations
        • 6.6.6.5 -Os: Level s Optimizations Option
        • 6.6.6.6 Options For Specific Optimization Control
        • 6.6.6.7 Options that Specify Machine-Independent Flags
      • 6.6.7 Options for Controlling the Preprocessor
      • 6.6.8 Options for Assembling
      • 6.6.9 Options for Linking
      • 6.6.10 Options for Directory Search
      • 6.6.11 Options for Code Generation Conventions
      • 6.6.12 Miscellaneous Options
    • 6.7 MPLAB® X IDE Toolchain Equivalents
  • 7 Device-Related Features
  • 8 Differences Between MPLAB® XC-DSC and C Standard
  • 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 and Assembly Code
  • 18 Library Routines
  • 19 Optimizations
  • 20 Preprocessing
  • 21 Linking Programs
  • 22 Implementation-Defined Behavior
  • 23 Embedded Compiler Compatibility Mode
  • 24 Common C Interface
  • 25 Diagnostic Pragmas
  • 26 Diagnostic Messages
  • 27 GNU Free Documentation License
  • 28 Built-in Functions
  • 29 Document Revision History
  • The Microchip Website
  • Product Change Notification Service
  • Customer Support
  • Product Identification System
  • Microchip Devices Code Protection Feature
  • Legal Notice
  • Trademarks
  • Quality Management System
  • Worldwide Sales and Service

6.6.6 Options for Controlling Optimization

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

Table 6-4. General Optimization Options
Option License Summary
-O0 All No optimizations (default)
-O1, -O All Optimization level 1
-O2 All Optimization level 2
-O3 PRO Optimization level 3
-Os PRO Optimization level s

Other optimization options are:

6.6.6.6 Options For Specific Optimization Control

6.6.6.7 Options that Specify Machine-Independent Flags

The online versions of the documents are provided as a courtesy. Verify all content and data in the device’s PDF documentation found on the device product page.

Microchip Facebook
Microchip LinkedIn
Microchip Twitter
Microchip YouTube
Microchip Instagram
Microchip Weibo
Microchip Blog
Contact |
Legal |
Privacy Policy |
Cookies |
Careers

Stay on the leading edge with our blog

MicroSolutions

© Copyright 1998-2022 Microchip Technology Inc. All rights reserved.