
White Paper An Le Migrating John J. Oneill Developer Products Division Intel Corporation Applications to Intel® Compilers for Mac OS* White Paper Migrating Applications to Intel® Compilers for Mac OS* Table of Contents Introduction ..........................................................................................................................................................................................................................4 Overview ...........................................................................................................................................................................................................................4 Getting Started ..................................................................................................................................................................................................................4 Supported Features ...................................................................................................................................................................................................4 Performance Features ....................................................................................................................................................................................4 Support for Apple Specific Features .......................................................................................................................................................4 Support for Apple-specific Linker Options ...........................................................................................................................................4 Building Applications .................................................................................................................................................................................................5 Invoking the Compiler from the Command line .................................................................................................................................5 Set the Environment Variables ..................................................................................................................................................................5 Invoking the Compiler with icc or icpc ....................................................................................................................................................5 Command-line Syntax ......................................................................................................................................................................................5 Selecting Intel® C++ Compiler for Mac OS* from Xcode 2.2.1 ...................................................................................................6 Compatibility, Interoperability, and Standard Compliance ..................................................................................................................7 Building a Universal Binary with Intel® C++ Compiler for Mac OS* ................................................................................................7 Building Universal Binary From Xcode 2.2.1 ................................................................................................................................................7 Building Universal Binary from Command Line ..........................................................................................................................................8 Performance ........................................................................................................................................................................................................................8 Auto Vectorization at Default Optimization (-O2) ....................................................................................................................................9 High Level Optimization (-O3) ..............................................................................................................................................................................9 Interprocedural Optimization (IPO) ....................................................................................................................................................................9 Profile Guided Optimization ...................................................................................................................................................................................9 Full Support for OpenMP* 2.5 ..............................................................................................................................................................................9 Auto Parallelization ....................................................................................................................................................................................................9 Migrating Applications to Intel® Compilers for Mac OS* White Paper Conclusion ...........................................................................................................................................................................................................................10 References ..........................................................................................................................................................................................................................10 Appendix A : Equivalent Intel® C++ Compiler Options for Metrowerks CodeWarrior* 9.0 For Mac OS* .........................................................................................................................................11 Table 1: Preprocessing, Precompiling, and Input File Control Options ........................................................................................11 Table 2: C/C++ Language Options ...................................................................................................................................................................12 Table 3: Code Optimization Options ...............................................................................................................................................................13 Table 4: Debugging Control Options ...............................................................................................................................................................13 Appendix B : Equivalent Intel® C++ Compiler options for IBM XL C/C++ Advanced Edition for Mac OS* X .................................................................................................................................14 White Paper Migrating Applications to Intel® Compilers for Mac OS* Introduction This document provides the background for developers who are migrating to the Intel® C++ Compiler 9.1 for Mac OS*. It discusses default behavior, and it highlights optimization and source changes that may be needed as part of the migration. Overview • Interprocedural optimization (IPO) The Intel® C++ Compiler 9.1 for Mac OS* integrates with Apple’s • Profile-guided optimization (PGO) Xcode* ..1 and is compatible with GNU C/C++ .0 to provide very high levels of optimization for Intel® processor technologies. • High-level language optimization (HLO) In addition to performance and industry-compatibility gains, this • Support for OpenMP* .5 version provides full support for processor-specific instruction sets available on Mac OS running on Intel® processors. Intel® • Auto-parallelization software technologies such as code generation, optimization, • Compiler-generated optimization reports and parallel processing, combined with compatibility features and support for language extensions, offer a robust feature set and Support for Apple Specific Features excellent runtime performance. • Support for GNU inline ASM syntax In general, the source changes required to migrate to Intel C++ Compiler for Mac OS are the same as those for GNU C++ .0. In • Support for Microsoft MASM-style inline assembly format most cases, if you can build existing applications with GCC .0 in (-use-msasm) Xcode ..1, you can rebuild the applications with the Intel C++ • Support of Pascal strings (-fpascal-strings) Compiler for Mac OS without source changes. Some applications may need minor coding changes, and build methods may need • Support for the weak_import attribute minor adjustments. • Support for Apple legacy alignment options This document assumes that your project is imported to Xcode (-malign-power, -malign-natural, -malign-mac68k) ..1 or built from the command line. You may want to look at • Support for Apple frameworks and Apple’s C++ the following documents from the Apple developer site for language extensions more information: • Interoperable with objective C, where GCC will compile • Porting CodeWarrior* Project to Xcode 1 object C source • GCC Porting Guide • Universal binary support Getting Started Support for Apple-specific Linker Options • Produce a Mach-O bundle format file with (-bundle) Supported Features The Intel C++ Compiler for Mac OS runs on Intel processor-based • Produce Mach-O demand page executable format Mac systems running Mac OS X* version 10... Key features file (-execute) supported by the Intel C++ Compiler for Mac OS include those • Specify file containing list of files to link (-filelist) discussed below. • Build output as flat namespace image; not default Performance Features (-flat_namespace) • Auto-vectorization
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages22 Page
-
File Size-