WIPIVERSE All articles

AMD Optimizing C/C++ Compiler

The AMD Optimizing C/C++ Compiler (AOCC) is a production-quality compiler suite developed by Advanced Micro Devices (AMD) for the C and C++ programming languages. It is designed to generate highly optimized code for AMD processor architectures, specifically targeting the "Zen" microarchitecture family (Ryzen, EPYC, Threadripper).

Technical Basis AOCC is built upon the LLVM/Clang open-source compiler infrastructure. AMD contributes upstream patches and optimizations to the LLVM project and packages specific releases as AOCC to provide a validated, supported toolchain for enterprise and high-performance computing (HPC) customers.

Key Features

  • Target Architecture Optimization: Includes specific tuning for AMD "Zen," "Zen 2," "Zen 3," "Zen 4," and "Zen 5" microarchitectures, including instruction scheduling, vectorization (AVX2, AVX-512), and cache hierarchy optimizations.
  • Profile-Guided Optimization (PGO): Supports instrumentation-based and sampling-based PGO to improve runtime performance based on actual workload behavior.
  • Link-Time Optimization (LTO): Supports ThinLTO and full LTO for whole-program optimization across translation units.
  • OpenMP Support: Provides support for OpenMP 4.5/5.0/5.1/5.2 standards for shared-memory parallel programming, targeting both CPUs and (via plugins/extensions) AMD GPUs.
  • Fortran Support: The AOCC suite typically includes flang (LLVM Fortran frontend) to provide Fortran compilation capabilities alongside C/C++.
  • Compatibility: Maintains high source and binary compatibility with GCC (GNU Compiler Collection) and standard Clang, allowing it to serve as a drop-in replacement in many Linux build environments.

Distribution and Licensing AOCC is distributed as a free download for Linux operating systems (typically RHEL, CentOS, Ubuntu, SLES). It is provided under a proprietary "AMD Optimizing C/C++ Compiler End User License Agreement" (EULA), distinct from the open-source licenses governing the underlying LLVM/Clang components. AMD provides the compiler binaries, libraries, and documentation packages (.rpm, .deb, .tar.gz).

Release History Major versions generally align with upstream LLVM release milestones (e.g., AOCC 4.x based on LLVM 15/16, AOCC 5.x based on LLVM 17/18). Release notes detail specific optimization improvements, bug fixes, and newly supported processor models (e.g., support for 4th/5th Gen EPYC "Genoa"/"Turin" or Ryzen 7000/9000 series).

Relationship to Other AMD Tools AOCC is a core component of the AMD Developer Tool Suite, which also includes:

  • AOCC Fortran Compiler (flang)
  • AMD μProf (Performance profiling tool)
  • AMD Optimizing CPU Libraries (AOCL) (Math libraries like BLAS, FFT, RNG optimized for Zen)
  • HIP/ROCm (Heterogeneous computing stack for GPU offloading, separate but interoperable)
Browse

More topics to explore

    Browse all articles