Compiler Porting Guide for ICC Nextgen Apr 9 2020

Compiler Porting Guide for ICC Nextgen Apr 9 2020

Compiler Porng Guide for ICC NextGen Contents Compiler Por+ng Guide for ICC NextGen ......................................................................................................1 Nomenclature ...........................................................................................................................................2 Guiding Principles for ICC NextGen ..........................................................................................................2 Major Changes in Compiler Defaults ........................................................................................................2 Important New Op+ons ............................................................................................................................3 Op+ons to aid Intel Analyzers and other profiling tools. Use all of these to assist Analyzers. .............3 ICC NextGen OpenMP Op+ons .............................................................................................................3 Compiler Versioning .................................................................................................................................3 Data Parallel C++ Version String ............................................................................................................3 ICC NextGen Version String ..................................................................................................................4 Important Compiler Op+ons Mapping .....................................................................................................4 Pragma Support ........................................................................................................................................5 Predefined Macro Support .......................................................................................................................6 Built-In Func+ons ......................................................................................................................................6 Support for Pre-Compiled Header Files ....................................................................................................7 Changes in Diagnos+cs Op+ons and Diagnos+c Message Numbering .....................................................7 Linking, IPO and PGO changes ..................................................................................................................9 Language Features ....................................................................................................................................9 Intrinsic Usage Model Change ..................................................................................................................9 Example of LLVM Intrinsics Handling Differences ...............................................................................10 Intrinsics Via Func+on Defini+on __a\ribute__((target())) In the above example we used a compiler op+on to target a specific instruc+on set ( -mavx512f ). This can be used if just one instruc+on set exists in the source file. Oaen, source files will contain mul+ple instruc+on sets represented in intrinsic data declara+ons and intrinsic instruc+ons. This is done to call specific func+ons or code sec+ons based on the run+me processor discovery. Typically, these func+ons or code sec+ons are protected by #IFDEFs with specific target architectures and the user code does processor dispatch to these sec+ons or func+ons. ...........................................................................................................13 Intel Proprietary Processsor Targe+ng Pragmas and Func+ons Support ............................................14 Legacy Intrinsics Promo+on with Op+on intrinsic-promote: ..............................................................14 Floa+ng Point Reproducibility Controls ..................................................................................................15 Brutus or Bisec+onal Op+miza+on Support ...........................................................................................15 Appendix I: ICC Classic Compiler Op+ons Status ...................................................................................15 March 6, 2020 1 Nomenclature • For simplicity and clarity, we will informally refer to the Intel® C++ Compiler Next Genera+on framework as “ICC NextGen” and the classic or “tradi+onal ICC” Intel® C++ Compiler as “ICC Classic” throughout this document. Guiding Principles for ICC NextGen • ICC Classic and ICC NextGen use the same name for many of the compiler drivers ( icc, icpc, icl ). In addi+on to providing a core C++ compiler, ICC NextGen is the base compiler for the Intel® Data Parallel C++ compiler and its new driver, ‘dpcpp’. ICC NextGen is our newer “Next Genera+on” compiler. Keep this in mind: ICC NextGen is not a drop-in replacement for ICC Classic. Although considerable effort is being made to make the transi+on from ICC Classic to ICC NextGen as smooth and as effortless as possible, customers can expect that some effort may be required to port and tune exis+ng applica+ons from ICC Classic to ICC NextGen. o For Data Parallel C++ applica0ons: Our underlying compiler is ICC NextGen. The driver is named ‘dpcpp’. o For standard C++ applica0ons: ICC Classic (icc/icpc/icl drivers) will remain Intel’s recommended produc+on compiler AND THE DEFAULT compiler un+l ICC NextGen has performance and features superior to ICC Classic. In the future, when ICC NextGen func+onality and performance equivalence or be\er against ICC Classic is achieved, Intel may change the default for ICC to be ICC NextGen, instead of, ICC Classic. We have no set +meline for this transi+on as it is condi+onal on reaching equivalence or be\er than current ICC Classic technology. Going forward BOTH ICC Classic and ICC NextGen compilers will be provided in Intel Compiler packages. Compiler op+ons will be used to select one or the other compilers. Major Changes in Compiler Defaults 1. C++ Users: The compiler driver name is s+ll icc/icpc (Linux*) or icl (Windows*), but requires the – qnextgen (Linux*) or /Qnextgen (Windows*) op+on to invoke the ICC NextGen compiler. Without the [-q|/Q]nextgen op+on the ICC Classic compiler will be invoked. 2. DPC++ Users: Use the ‘dpcpp’ driver which invokes ICC NextGen with DPC++ extensions. 3. Default floa+ng point model is -fp:precise –no-fma. 4. Macro __INTEL_LLVM_COMPILER is defined for ICC NextGen, instead of, the __INTEL_COMPILER macro used in ICC Classic. To see all defined values for the compiler, use -E -dM opons which will either create a .ii file with this informa+on or write the values to stderr. For example: for Data Parallel C++ dpcpp -E -dM ./hello.cpp more hello.ii for ICC NextGen the output will be sent to stderr icc -qnextgen -E -dM ./hello.cpp 5. No diagnos+cs numbers are listed for remarks/warnings/notes. Every diagnos+c is emi\ed with the corresponding compiler op+on to disable the same. March 6, 2020 2 6. Compiler intrinsics will not be automa+cally recognized without processor targe+ng op+ons, unlike the behavior in ICC Classic. If you use intrinsics, please read more on this intrinsic behavior change later in this document. Important New Op>ons Op>ons to aid Intel Analyzers and other profiling tools. Use all of these to assist Analyzers. • -gline-tables-only This opon is helpful for profiling tools. This opon generates line table debug informa+on only. This allows symbolic back traces with inlining informa+on, but does not include any informa+on about variables, their loca+ons, or types. • -fdebug-info-for-profiling adds extra debug info for more accurate profile ICC NextGen OpenMP Op>ons • -fiopenmp Compile and recognize OpenMP parallel and SIMD pragmas/direc+ves and clauses and use the Intel OpenMP run+me libraries. • -fopenmp-targets=spir64 is needed when OpenMP 4.5/5.0 TARGET pragmas/direc+ves are used. • OpenMP 4.5/5.0 TARGET direc+ves are only recognized by the ICC NextGen compiler that is included in the Intel® oneAPI HPC Toolkit. Use the two compiler op+ons above together: o icc -qnextgen -fiopenmp -fopenmp-targets=spir64 o icpc -qnextgen -fiopenmp -fopenmp-targets=spir64 Compiler Versioning Data Parallel C++ Version String The Data Parallel C++ compiler version string is new. An example: dpcpp --version DPC++ Compiler 2021.1-betaXX (2019.8.x.1010) The format is: VVVV.MINOR -[beta]XX (build string) where • VVVVV is the product VERSION in the format of year. • MINOR is a single-digit minor version number, star+ng at “1” for ini+al release and incremented as needed for minor releases. • [beta] may or may not appear. If the compiler is a Beta compiler you will see the string “beta”, else this will not be present for produc+on compilers. • XX is the beta release • The (build string) can be decoded: (YYYY.<Clang Version>.PULL.UPDATE .<build date> ) March 6, 2020 3 where • YYYY is the year • <Clang Version> is the version of Clang incorporated into ICC NextGen front-end. • PULL is 1- or 2-digit and indicates the month we pulled Clang and merged into our build. • UPDATE is a single-digit minor version number. Typically it is “x” for beta, unless two or more compilers are released in a given month. • <build date> is of the form yyyymmdd. For example, (2019.8.x.1108) This compiler was built in 2019. The Clang front end is version 8. The PULL in this beta is “x”, but in a later compiler this will indicate the pull date or minor version. The exact date of the build is 2019 1108 in YYYY MMDD Another example: If, hypothe+cally, Clang 9 releases and we

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    18 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us