Skip to content

Multibackend (GCC + LLVM) - #582

Open
SamuelMarks wants to merge 4 commits into
edgcpp:mainfrom
SamuelMarks:multibackend
Open

SamuelMarks wants to merge 4 commits into
edgcpp:mainfrom
SamuelMarks:multibackend

Conversation

@SamuelMarks

Copy link
Copy Markdown

Add unified Stage-0 multi-backend driver, native LLVM IR & GCC (libgccjit) backends, DWARF EH runtime, and 5-way differential test suite. This PR follows the encouraging; intense interest shown in #221 #239 (and #245).


Summary

This pull request transforms cpfe from a source-to-source C/C++ front end into a single-binary, runtime-selectable multi-backend native C/C++23 compiler while preserving 100% backward compatibility with the existing C-generating (c_gen_be) and C++-generating (cp_gen_be / cpfe-cp) pipelines.

Across 111 new C/C++ compiler and runtime files (~81.9k LOC), minimal #if-guarded front-end hooks, cross-platform CMake/preset integration, static error-handling & documentation coverage gates, and 414 new test files (~91.4k LOC), cpfe can now lower EDG Intermediate Language (IL) directly in-memory to native object files, assembly, bitcode, shared libraries, and linked executables via four runtime-selectable code generation pipelines:

  1. Native LLVM IR Backend (src/llvm_gen_be* — 63 files, 40,047 LOC): Direct EDG IL → in-memory llvm::Module SSA lowering targeting LLVM 18–23+ NewPM optimization pipelines, 12 target calling-convention ABIs, zero-cost Itanium DWARF / Windows SEH / SjLj / Wasm EH, C++20 llvm.coro.* switched-resume coroutines, OpenMP 4.5/5.x CPU (libomp) & GPU (nvptx64/amdgcn) offloading, sanitizers, ThinLTO/FullLTO, PGO, and DWARF v5 / CodeView PDB debug info.
  2. Native GCC (libgccjit) Backend (src/gcc_gen_be_* — 40 files, 37,414 LOC) + Thread-Safe EH Runtime (lib_src/gcc_be_eh_rt.* — 2 files, 1,028 LOC): Direct EDG IL → gcc_jit_context GIMPLE/RTL lowering with zero compile-time or link-time hard dependency on libgccjit.so via version-probed runtime dlopen/LoadLibraryA symbol resolution across GCC 10–15+, paired with libedg_gcc_eh_rt.a for thread-safe DWARF personality-backed unwinding and Itanium _ZTI catch matching.
  3. Unified Stage-0 Multi-Backend Driver & System SDK Auto-Discovery (src/edg_be_* — 5 files, 3,186 LOC): Drop-in GCC/Clang-compatible CLI translation (-c, -S, -E, -o, -O0..-Ofast, -g, -std=*, -fPIC, -shared, -MD/-MMD/-MF/-MT/-MQ, -Wl,*, @file response files, multi-TU compilation & linking, and --backend={llvm,gcc,c}) plus automatic macOS SDK, Linux multiarch (libstdc++/libc++/Clang resource), and Windows MSVC/UCRT include discovery.
  4. Coexisting Legacy C Backend (c_gen_be) & Isolated C++ Backend (cp_gen_be): c_gen_be (EDG_ENABLE_C_BACKEND=ON) now coexists in the same cpfe binary alongside the LLVM and GCC backends via c_gen_be_entry() (--backend=c / --c-be), while cpfe-cp (BACK_END_IS_CP_GEN_BE) remains completely isolated on its existing code path.

Motivation

Historically, cpfe delegated machine code generation to downstream host compilers by emitting lowered C (c_gen_be) or reconstructed C++ (cp_gen_be). While portable, source-to-source C emission imposes structural semantic and performance limitations:

  • Zero-cost exception handling: Portable C lowering relies on setjmp/longjmp runtime tables (DO_FULL_PORTABLE_EH_LOWERING), incurring per-scope registration overhead on the non-throwing path and preventing native DWARF .eh_frame / Windows x64 SEH interoperability with system C++ libraries.
  • Coroutines, atomics, SIMD, and OpenMP: C++20 coroutine frame splitting (CoroSplit), C11/C++20 lock-free atomic memory orderings, architecture-specific vector intrinsics (SSE/AVX/NEON), and OpenMP parallel/SIMD/target regions cannot be faithfully represented in portable ISO C.
  • Mid-end optimization & debug fidelity: Emitting intermediate C loses fine-grained alias metadata (TBAA), sanitizer instrumentation hooks, LTO summaries, and column-accurate DWARF v5 / CodeView debug records, while paying double lexing/parsing overhead.
  • Dual-backend resilience & differential validation: Supporting both LLVM (LLVMCore/LLVMPasses) and GCC (libgccjit GIMPLE/RTL) directly atop the same lowered EDG IL lets users target either major open-source optimizer from one front end and enables 5-way cross-compiler differential verification on identical AST/IL inputs.

Detailed Changes by Subsystem

1. Unified Stage-0 Driver, SDK Discovery & Multi-TU Routing

  • Files: src/edg_be_common.h, src/edg_be_driver.{h,cpp}, src/edg_be_sdk.{h,cpp}, src/cfe.c, src/cmd_line.{h,c}, util/eccp.sh
  • GCC/Clang-compatible Stage-0 CLI translator (edg_be_translate_command_line):
    • Normalizes GCC/Clang driver flags into a conflict-free edg_be_invocation_options_t contract shared across cfe.c, llvm_gen_be, gcc_gen_be, and c_gen_be, while preserving native EDG flags untouched when invoked in traditional cpfe mode.
    • Expands nested @file response files (edg_be_expand_response_files), emits Makefile dependency files (-MD, -MMD, -MF, -MT, -MQ via edg_be_write_depfile), and answers compiler queries (--version, -dumpmachine, -dumpversion, --print-search-dirs, --print-target-triple, --print-effective-options).
  • System SDK & Standard Library Discovery (edg_be_discover_system_sdk):
    • Probes --sysroot, SDKROOT, macOS Xcode/CommandLineTools SDKs + Homebrew LLVM/GCC installations, Linux multiarch triples (x86_64-linux-gnu, aarch64-linux-gnu, etc.) for libstdc++, libc++, and Clang resource headers, and Windows MSVC/UCRT layouts.
  • Multi-TU Isolation & Linker Orchestration:
    • Supports multi-source compilation (cpfe a.cpp b.cpp -o app), object-only link invocations (cpfe a.o b.o -o app), and mixed source/object builds via per-TU isolated subprocess compilation (spawn_driver_subcommand) and backend link finalizers (llvm_finalize_multi_tu_link, gcc_gen_be_link_multi_tu_artifacts).
  • eccp.sh Wrapper Integration:
    • Adds direct --llvm / EDG_USE_LLVM_BACKEND=1 and --gcc-be / --gcc_be / --gcc_gen_be / EDG_GCC_BACKEND=1 pass-through modes.

2. Native LLVM IR Backend (src/llvm_gen_be*)

  • Files: 63 files (40,047 LOC) under src/llvm_gen_be*.{h,cpp}
  • Type, Constant & Expression Lowering (llvm_gen_be_type.*, llvm_gen_be_const.*, llvm_gen_be_expr.*, llvm_gen_be_stmt.*, llvm_gen_be_decl.*):
    • Complete lowering of EDG types and expressions including arbitrary-width C23 _BitInt(N) (llvm::IntegerType::get(Ctx, N)), _Float16 / __bf16 / _Float128 (fp128) / x87 x86_fp80, IEEE-754-2008 decimal floating-point (_Decimal32/_Decimal64/_Decimal128 BID & DPD encodings + __bid_*/__dpd_* runtime lowering), C99 _Complex, vector types, bit-fields, VLAs (stacksave/stackrestore), computed goto (indirectbr), statement expressions, and C++17 prvalue in-place destination materialization.
  • 12 Dedicated Target ABI Lowering Modules (llvm_gen_be_abi_*.{h,cpp}):
    • Explicit register classification, HFA/HVA detection, eightbyte merging, sret/byval/inreg/swiftself attributes, and variadic va_arg lowering for:
      • System V x86-64 (sysv_x86_64), Windows x64 (win64), ARM64 AAPCS64 & Darwinpcs (aapcs64), x86-32 cdecl/stdcall/fastcall/thiscall (x86_32), ARM32 AAPCS/AAPCS-VFP (arm32), RISC-V RV64GC LP64D (riscv64), PowerPC64 ELFv2 (ppc64), IBM SystemZ (s390x), MIPS64 N64 (mips), LoongArch64 LP64D (loongarch64), SPARC64 v9 (sparc), and WebAssembly (wasm32/wasm64).
  • C++ Object Model, RTTI, Vtables & Zero-Cost Exception Handling (llvm_gen_be_vtable.*, llvm_gen_be_rtti.*, llvm_gen_be_ptrmem.*, llvm_gen_be_eh.*):
    • Itanium C++ ABI vtable construction groups, VTTs, this/covariant return thunks, _ZTI*/_ZTS* RTTI descriptors (si_class, vmi_class), pointer-to-member representations, and chained DWARF (__gxx_personality_v0), SjLj (__gxx_personality_sj0), Windows SEH (__CxxFrameHandler3 cleanuppad/catchswitch/catchpad), and Wasm EH lowering.
  • C++20 Coroutines, OpenMP 4.5/5.x, Intrinsics & Inline Assembly (llvm_gen_be_coro.*, llvm_gen_be_omp.*, llvm_gen_be_intrinsics.*, llvm_gen_be_asm.*):
    • llvm.coro.id / begin / save / suspend / end / free lowering for LLVM CoroSplit passes.
    • OpenMP parallel, for, sections, single, task, critical, master/masked, barrier, atomic, simd, and target GPU offloading (nvptx64-nvidia-cuda, amdgcn-amd-amdhsa) targeting libomp/libomptarget.
    • Builtin/intrinsic mapping (atomics, saturating/checked arithmetic, byte-swaps, bit manipulation, vector shuffles) and GNU/MSVC inline assembly constraint translation.
  • Mid-End Optimization, Sanitizers, LTO/PGO & Debug Info (llvm_gen_be_opt.*, llvm_gen_be_codegen.*, llvm_gen_be_debug*.{h,cpp}):
    • LLVM PassBuilder (-O0..-O3, -Os, -Oz), ASan/TSan/MSan/UBSan/HWASan, SafeStack/ShadowCallStack, stack protectors, ThinLTO/FullLTO bitcode summaries, PGO generation/use, and full DIBuilder DWARF v5 (including Split DWARF) & Windows CodeView debug info.

3. Native GCC (libgccjit) Backend & Thread-Safe EH Runtime

  • Files: 40 files (37,414 LOC) under src/gcc_gen_be_*.{h,c} + 2 runtime files (1,028 LOC) under lib_src/gcc_be_eh_rt.{h,c}
  • Zero-Link Dynamic Runtime Loader (gcc_gen_be_lib_loader.*):
    • Dynamically loads libgccjit.so / libgccjit.dylib / libgccjit-0.dll at runtime (dlopen/LoadLibraryA), resolving mandatory GCC 10 baseline entry points and optional GCC 11–15+ capabilities (_BitInt, vector rvalues, target-specific builtins, TLS models, global initializers, inline asm) with graceful capability fallbacks.
  • Lowering Pipeline:
    • Types, Constants, Decls, Exprs & Stmts (gcc_gen_be_type.*, gcc_gen_be_decl.*, gcc_gen_be_expr.*, gcc_gen_be_stmt.*, gcc_gen_be_cache.*): Struct/union bit-field & tail-padding layout matching EDG byte offsets, compound literals, statement expressions, computed goto (gcc_jit_block_end_with_extended_asm_goto / dispatch fallback), VLAs, and static constructors/destructors.
    • Itanium C++ ABI, RTTI & Destructor Scheduling (gcc_gen_be_abi.*, gcc_gen_be_rtti.*, gcc_gen_be_dtor.*): Vtables, VTTs, thunks, _ZTI descriptors, dynamic_cast / typeid, and reverse-order automatic/temporary destructor emission.
    • C11/C++20 Atomics, C++20 Coroutines, OpenMP & SIMD (gcc_gen_be_atomic.*, gcc_gen_be_coro.*, gcc_gen_be_omp.*, gcc_gen_be_simd.*, gcc_gen_be_builtin.*): __atomic_* builtin & libatomic fallback lowering, C++20 coroutine heap frame layout calculation, OpenMP #pragma omp region outlining to GNU libgomp (GOMP_parallel, worksharing, barriers, criticals), and x86 SSE/AVX + ARM64 NEON vector construction/shuffle/lane intrinsics.
  • Thread-Safe DWARF/Itanium Exception Runtime Bridge (gcc_gen_be_eh.*, lib_src/gcc_be_eh_rt.{h,c} → libedg_gcc_eh_rt.a):
    • Eliminates global EH frame races via thread_local unwind state (__edg_gcc_eh_get_tls_chain).
    • Provides __edg_gcc_eh_invoke_region, a real DWARF personality-backed unwind trampoline compiled with -funwind-tables -fasynchronous-unwind-tables, paired with _Unwind_RaiseException rethrow/resume bridging and vptr-inspected Itanium _ZTI single/multiple/virtual inheritance hierarchy catch matching.

4. Minimal, Guarded Front-End IL & Lowering Extensions (src/*)

All modifications to existing front-end sources are strictly #if-guarded (BACK_END_IS_LLVM_GEN_BE, BACK_END_IS_GCC_GEN_BE, DO_IL_LOWERING) so non-native configurations retain identical behavior:

  • Post-lowering Itanium ABI mangling (src/fe_wrapup.c, src/il_def.h, src/lower_il.c): Snapshots pre-lowering routine signatures (unlowered_type on tk_routine) before lower_file_scope() mutates return/parameter types (e.g., this injection, NRVO/sret rewriting) so native backends emit exact Itanium/MSVC mangled symbol names.
  • File-scope & front-end memory region lifetime (src/fe_wrapup.c, src/il_alloc.*): Keeps FRONT_END_REGION_NUMBER alive until native backend code generation completes when BACK_END_IS_LLVM_GEN_BE || BACK_END_IS_GCC_GEN_BE is active.
  • 64-bit Itanium guard variables (src/cfe.c): Sets targ_ia64_abi_use_int_static_init_guard = FALSE on 64-bit native targets when generating native code so __cxa_guard_acquire receives ABI-compliant 64-bit guard variables.
  • Dependent _BitInt(N) template deduction & C++17 host build cleanups (src/templates.c, src/types.c, src/folding.c, src/const_ints.*, src/float_pt.c, src/ifc_modules_read.c, src/lexical.c, src/host_envir.*, src/linux_libc_compat.c): Supports template argument deduction for dependent _BitInt(N) bit-width expressions, avoids macro collisions with LLVM/Windows SDK headers (WIN32_LEAN_AND_MEAN granular Win32 headers, linux_libc_compat.c for glibc C23 __isoc23_strtol), and upgrades src/CMakeLists.txt to C++17 (required by LLVM C++ headers) with -fno-exceptions -fno-rtti parity on GCC, Clang, and MSVC (/EHs-c- /GR-).

5. Build System, Presets, Packaging & CI Workflows

  • CMake Options (CMakeLists.txt, cmake/macro-conf.cmake, cmake/FindLibGCCJIT.cmake):
    • EDG_ENABLE_LLVM_BACKEND (OFF by default; ENABLE_LLVM_BACKEND supported as alias)
    • EDG_ENABLE_GCC_BACKEND (OFF by default)
    • EDG_ENABLE_C_BACKEND (ON by default)
    • EDG_LLVM_BE_COVERAGE / EDG_GCC_BE_ENABLE_COVERAGE (OFF by default)
    • Automatically configures DO_FULL_PORTABLE_EH_LOWERING=0 and GENERATE_EH_TABLES=0 when either native backend is enabled, while keeping portable EH tables enabled for standalone C-backend builds.
  • New CMakePresets.json Presets & cmake/macro-conf/ Targets:
    • llvm-backend-debug, llvm-backend-release, llvm-backend-coverage
    • linux-gcc-be-debug, linux-gcc-be-release, macos-arm-gcc-be-debug, macos-arm-gcc-be-release
    • multibackend-debug, multibackend-release
    • Adds linux-arm-{gcc,clang}{,-release} and macos-x86-clang* macro configurations plus Windows MSVC SoftFloat support (cmake/softfloat.cmake).
  • CI Workflows (.github/workflows/):
    • strict-build-check.yml: Adds backend-modes-check verifying all 4 combinations of EDG_ENABLE_LLVM_BACKEND × EDG_ENABLE_GCC_BACKEND (neither, llvm, gcc, llvm+gcc) via dev_tools/verify_backend_modes.py.
    • llvm_be_coverage.yml & build-and-test-ci.yml: Enforces Doxygen documentation coverage and Clang source-based code coverage gates.
    • release.yml: 15-job multi-OS (linux-x86_64, linux-aarch64, macos-aarch64, windows-x86_64, windows-arm64) × 3-flavor (edgcpp+llvm, edgcpp+gcc, edgcpp+llvm+gcc) release packaging workflow with CPack archives.

6. Verification, Static Policy Enforcement & 5-Way Differential Suite

  • Strict Error Enum & noexcept Policy (dev_tools/check_error_and_noexcept_policy.py + unit tests):
    • Statically verifies zero throw / try / catch constructs across all C++ driver and backend TUs, mandatory [[nodiscard]] / warn_unused_result error enums (edg_be_driver_error_t, llvm_gen_be_error_t, gcc_gen_be_error_t), and noexcept annotations on every function definition.
  • 100% Doxygen Documentation Coverage Gates:
    • dev_tools/check_doc_coverage.py (LLVM backend), dev_tools/check_gcc_be_doc_coverage.py (GCC backend), and dev_tools/check_driver_doc_coverage.py (Stage-0 driver & SDK).
  • 414 New Test Files Across Four Test Suites:
    1. Stage-0 Driver Suite (tests/driver/*): CLI flag translation, @file response expansion, depfiles, SDK discovery, and multi-TU orchestration.
    2. LLVM IR Backend Suite (tests/test_llvm_*, tests/lit/**, tests/llvm_ir_backend_tests/*, tests/realworld/*, tests/fuzz_llvm_backend.cpp): GoogleTest unit/integration tests, LLVM lit + FileCheck IR verification, end-to-end execution harnesses, LibFuzzer harness, and real-world single-header C/C++ libraries.
    3. GCC Backend Suite (tests/gcc_be/*): 70 files covering types, expressions, statements, Itanium vtables/RTTI, thread-safe DWARF EH unwinding, _Atomic, coroutines, OpenMP, SIMD, sanitizers, and cross-TU ABI compatibility.
    4. 5-Way Cross-Backend Differential Torture Suite (tests/differential/**): 232 single-TU and multi-TU test cases across 12 categories (cat01_int_bit, cat02_fp_complex, cat03_abi_agg, cat04_control_flow, cat05_obj_model, cat06_eh_cleanup, cat07_rtti_dyncast, cat08_templates_lambdas, cat09_coroutines, cat10_atomics_tls, cat11_gnu_ext, cat12_cross_abi). Every case is compiled and executed 5 ways:
      • cpfe --backend=llvm -O0
      • cpfe --backend=llvm -O2
      • cpfe --backend=gcc -O0
      • cpfe --backend=gcc -O2
      • System reference compiler (clang++/g++) -O2
        asserting identical exit codes, stdout, and stderr (including mixed-TU binaries where TU A is compiled by --backend=llvm and TU B is compiled by --backend=gcc).

7. Documentation

  • Adds INTERNALS_OF_LLVM_AND_GCC_BACKENDS.md documenting the multi-backend architecture, IL lowering contracts, target ABI state machines, EH runtime design, and build/test workflows.
  • Adds Doxyfile.llvm_be and updates doc/source/ext_intf.rst.

Build & Verification Quickstart

# Configure and build unified multi-backend cpfe (LLVM + GCC + C backends in one binary)
cmake --preset multibackend-debug
cmake --build build/multibackend-debug --target cpfe gcc_be_eh_rt

# Verify runtime backend mode dispatch ({llvm, gcc, c})
python3 dev_tools/verify_backend_modes.py --cpfe build/multibackend-debug/src/cpfe --llvm 1 --gcc 1 --c 1

# Run CTest suites (driver, LLVM backend, GCC backend)
ctest --test-dir build/multibackend-debug --output-on-failure

# Run the 232-case 5-way cross-backend differential torture suite
python3 tests/differential/run_differential_suite.py --cpfe build/multibackend-debug/src/cpfe

# Run static error/noexcept & 100% Doxygen documentation coverage gates
python3 dev_tools/check_error_and_noexcept_policy.py
python3 dev_tools/check_doc_coverage.py
python3 dev_tools/check_gcc_be_doc_coverage.py
python3 dev_tools/check_driver_doc_coverage.py

Backward Compatibility & Risk Isolation

  • Default build unchanged: Both EDG_ENABLE_LLVM_BACKEND and EDG_ENABLE_GCC_BACKEND default to OFF. Existing presets (linux-gcc-debug, linux-clang-debug, macos-arm-clang-debug, windows-msvc, etc.) continue building cpfe and cpfe-cp without requiring LLVM or libgccjit installed.
  • cpfe-cp untouched: All Stage-0 driver hooks and native backend entry points in src/cfe.c and src/fe_wrapup.c are guarded by #if !BACK_END_IS_CP_GEN_BE / #if BACK_END_IS_LLVM_GEN_BE || BACK_END_IS_GCC_GEN_BE.
  • Optional runtime libgccjit loading: Even when compiled with -DEDG_ENABLE_GCC_BACKEND=ON, cpfe dynamically loads libgccjit via dlopen/LoadLibraryA only when --backend=gcc is invoked, so binaries run cleanly on machines without libgccjit when using --backend=llvm or --backend=c.

@SamuelMarks
SamuelMarks requested review from a team November 22, 2026 06:34
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 632 files, which is 482 over the limit of 150.

To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

Usage-priced reviews support at most 500 files.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0d4f185 and 957eb6a.

Files selected for processing: 632

  • .git-hooks/pre-push.py
  • .github/workflows/acknowledg-deploy.yml
  • .github/workflows/acknowledg-forge-deploy.yml
  • .github/workflows/acknowledg-forge.yml
  • .github/workflows/build-and-test-ci.yml
  • .github/workflows/ci-toolchain.yml
  • .github/workflows/llvm_be_coverage.yml
  • .github/workflows/promote-test-cache.yml
  • .github/workflows/release.yml
  • .github/workflows/strict-build-check.yml
  • .gitignore
  • CMakeLists.txt
  • CMakePresets.json
  • Doxyfile.llvm_be
  • INTERNALS_OF_LLVM_AND_GCC_BACKENDS.md
  • cmake/FindLibGCCJIT.cmake
  • cmake/host-defaults.cmake
  • cmake/macro-conf.cmake
  • cmake/macro-conf/default/cpfe.cmakedef
  • cmake/macro-conf/linux-arm-clang-release/base.cmakedef
  • cmake/macro-conf/linux-arm-clang-release/cdisp.cmakedef
  • cmake/macro-conf/linux-arm-clang-release/cpfe-cp.cmakedef
  • cmake/macro-conf/linux-arm-clang-release/cpfe.cmakedef
  • cmake/macro-conf/linux-arm-clang-release/cpprtlib.cmakedef
  • cmake/macro-conf/linux-arm-clang/base.cmakedef
  • cmake/macro-conf/linux-arm-clang/cdisp.cmakedef
  • cmake/macro-conf/linux-arm-clang/cpfe-cp.cmakedef
  • cmake/macro-conf/linux-arm-clang/cpfe.cmakedef
  • cmake/macro-conf/linux-arm-clang/cpprtlib.cmakedef
  • cmake/macro-conf/linux-arm-gcc-release/base.cmakedef
  • cmake/macro-conf/linux-arm-gcc-release/cdisp.cmakedef
  • cmake/macro-conf/linux-arm-gcc-release/cpfe-cp.cmakedef
  • cmake/macro-conf/linux-arm-gcc-release/cpfe.cmakedef
  • cmake/macro-conf/linux-arm-gcc-release/cpprtlib.cmakedef
  • cmake/macro-conf/linux-arm-gcc/base.cmakedef
  • cmake/macro-conf/linux-arm-gcc/cdisp.cmakedef
  • cmake/macro-conf/linux-arm-gcc/cpfe-cp.cmakedef
  • cmake/macro-conf/linux-arm-gcc/cpfe.cmakedef
  • cmake/macro-conf/linux-arm-gcc/cpprtlib.cmakedef
  • cmake/macro-conf/linux-gcc-reflection-release/cpfe-cp.cmakedef
  • cmake/macro-conf/macos-x86-clang-multi-thread/cpfe-cp.cmakedef
  • cmake/macro-conf/macos-x86-clang-release/cpfe-cp.cmakedef
  • cmake/macro-conf/macos-x86-clang/cpfe-cp.cmakedef
  • cmake/macro-conf/support/build-type/release/base.cmakedef
  • cmake/macro-conf/support/platform/linux-arm64/base.cmakedef
  • cmake/macro-conf/support/platform/macos-x86/base.cmakedef
  • cmake/macro-conf/support/platform/macos/base.cmakedef
  • cmake/macro-conf/support/platform/windows/base.cmakedef
  • cmake/macro-conf/windows-msvc-release/cpfe-cp.cmakedef
  • cmake/macro-conf/windows-msvc/cpfe-cp.cmakedef
  • cmake/softfloat.cmake
  • dev_tools/CMakeLists.txt
  • dev_tools/bin/run_coverage.sh
  • dev_tools/bin/run_gcc_torture_llvm.py
  • dev_tools/bin/run_sanitizer_test.sh
  • dev_tools/builtins/libgccjit.h
  • dev_tools/check_doc_coverage.py
  • dev_tools/check_driver_coverage.py
  • dev_tools/check_driver_doc_coverage.py
  • dev_tools/check_error_and_noexcept_policy.py
  • dev_tools/check_gcc_be_coverage.sh
  • dev_tools/check_gcc_be_doc_coverage.py
  • dev_tools/check_llvm_be_coverage.py
  • dev_tools/tests/test_check_error_and_noexcept_policy.py
  • dev_tools/verify_backend_modes.py
  • doc/source/ext_intf.rst
  • lib_src/CMakeLists.txt
  • lib_src/gcc_be_eh_rt.c
  • lib_src/gcc_be_eh_rt.h
  • run_pgo_test.sh
  • run_sanitizer_test.sh
  • src/CMakeLists.txt
  • src/c_gen_be.c
  • src/c_gen_be.h
  • src/cfe.c
  • src/cmake/cpfe-cp/CMakeLists.txt
  • src/cmake/cpfe/CMakeLists.txt
  • src/cmd_line.c
  • src/cmd_line.h
  • src/const_ints.c
  • src/const_ints.h
  • src/cp_gen_be.c
  • src/cp_gen_be.h
  • src/defines.h
  • src/edg_be_common.h
  • src/edg_be_driver.cpp
  • src/edg_be_driver.h
  • src/edg_be_sdk.cpp
  • src/edg_be_sdk.h
  • src/error.h
  • src/expr.c
  • src/fe_wrapup.c
  • src/float_pt.c
  • src/folding.c
  • src/gcc_gen_be_abi.c
  • src/gcc_gen_be_abi.h
  • src/gcc_gen_be_atomic.c
  • src/gcc_gen_be_atomic.h
  • src/gcc_gen_be_builtin.c
  • src/gcc_gen_be_builtin.h
  • src/gcc_gen_be_cache.c
  • src/gcc_gen_be_cache.h
  • src/gcc_gen_be_context.c
  • src/gcc_gen_be_context.h
  • src/gcc_gen_be_coro.c
  • src/gcc_gen_be_coro.h
  • src/gcc_gen_be_debug.c
  • src/gcc_gen_be_debug.h
  • src/gcc_gen_be_decl.c
  • src/gcc_gen_be_decl.h
  • src/gcc_gen_be_dtor.c
  • src/gcc_gen_be_dtor.h
  • src/gcc_gen_be_eh.c
  • src/gcc_gen_be_eh.h
  • src/gcc_gen_be_error.c
  • src/gcc_gen_be_error.h
  • src/gcc_gen_be_expr.c
  • src/gcc_gen_be_expr.h
  • src/gcc_gen_be_lib_loader.c
  • src/gcc_gen_be_lib_loader.h
  • src/gcc_gen_be_location.c
  • src/gcc_gen_be_location.h
  • src/gcc_gen_be_main.c
  • src/gcc_gen_be_main.h
  • src/gcc_gen_be_omp.c
  • src/gcc_gen_be_omp.h
  • src/gcc_gen_be_rtti.c
  • src/gcc_gen_be_rtti.h
  • src/gcc_gen_be_simd.c
  • src/gcc_gen_be_simd.h
  • src/gcc_gen_be_stmt.c
  • src/gcc_gen_be_stmt.h
  • src/gcc_gen_be_type.c
  • src/gcc_gen_be_type.h
  • src/host_envir.c
  • src/host_envir.h
  • src/ifc_modules_read.c
  • src/il.c
  • src/il.h
  • src/il_alloc.c
  • src/il_alloc.h
  • src/il_def.h
  • src/il_to_str.c
  • src/il_to_str.h
  • src/inline.c
  • src/lang_feat.h
  • src/layout.c
  • src/lexical.c
  • src/linux_libc_compat.c
  • src/llvm_gen_be.cpp
  • src/llvm_gen_be.h
  • src/llvm_gen_be_abi_aapcs64.cpp
  • src/llvm_gen_be_abi_aapcs64.h
  • src/llvm_gen_be_abi_arm32.cpp
  • src/llvm_gen_be_abi_arm32.h
  • src/llvm_gen_be_abi_loongarch64.cpp
  • src/llvm_gen_be_abi_loongarch64.h
  • src/llvm_gen_be_abi_mips.cpp
  • src/llvm_gen_be_abi_mips.h
  • src/llvm_gen_be_abi_ppc64.cpp
  • src/llvm_gen_be_abi_ppc64.h
  • src/llvm_gen_be_abi_riscv64.cpp
  • src/llvm_gen_be_abi_riscv64.h
  • src/llvm_gen_be_abi_s390x.cpp
  • src/llvm_gen_be_abi_s390x.h
  • src/llvm_gen_be_abi_sparc.cpp
  • src/llvm_gen_be_abi_sparc.h
  • src/llvm_gen_be_abi_sysv_x86_64.cpp
  • src/llvm_gen_be_abi_sysv_x86_64.h
  • src/llvm_gen_be_abi_wasm.cpp
  • src/llvm_gen_be_abi_wasm.h
  • src/llvm_gen_be_abi_win64.cpp
  • src/llvm_gen_be_abi_win64.h
  • src/llvm_gen_be_abi_x86_32.cpp
  • src/llvm_gen_be_abi_x86_32.h
  • src/llvm_gen_be_asm.cpp
  • src/llvm_gen_be_asm.h
  • src/llvm_gen_be_codegen.cpp
  • src/llvm_gen_be_codegen.h
  • src/llvm_gen_be_const.cpp
  • src/llvm_gen_be_const.h
  • src/llvm_gen_be_coro.cpp
  • src/llvm_gen_be_coro.h
  • src/llvm_gen_be_debug.cpp
  • src/llvm_gen_be_debug.h
  • src/llvm_gen_be_debug_scopes.cpp
  • src/llvm_gen_be_debug_types.cpp
  • src/llvm_gen_be_decl.cpp
  • src/llvm_gen_be_driver.cpp
  • src/llvm_gen_be_driver.h
  • src/llvm_gen_be_eh.cpp
  • src/llvm_gen_be_eh.h
  • src/llvm_gen_be_error.cpp
  • src/llvm_gen_be_error.h
  • src/llvm_gen_be_expr.cpp
  • src/llvm_gen_be_expr.h
  • src/llvm_gen_be_internal.h
  • src/llvm_gen_be_intrinsics.cpp
  • src/llvm_gen_be_intrinsics.h
  • src/llvm_gen_be_omp.cpp
  • src/llvm_gen_be_omp.h
  • src/llvm_gen_be_opt.cpp
  • src/llvm_gen_be_opt.h
  • src/llvm_gen_be_ptrmem.cpp
  • src/llvm_gen_be_ptrmem.h
  • src/llvm_gen_be_rtti.cpp
  • src/llvm_gen_be_rtti.h
  • src/llvm_gen_be_stmt.cpp
  • src/llvm_gen_be_type.cpp
  • src/llvm_gen_be_type.h
  • src/llvm_gen_be_vtable.cpp
  • src/llvm_gen_be_vtable.h
  • src/lower_il.c
  • src/ms_metadata.cpp
  • src/sys_predef.c
  • src/targ_def.h
  • src/templates.c
  • src/types.c
  • tests/CMakeLists.txt
  • tests/differential/cases/cat01_int_bit/c01_int_widths.c
  • tests/differential/cases/cat01_int_bit/c02_int128_arith.c
  • tests/differential/cases/cat01_int_bit/c03_shifts_signed_unsigned.c
  • tests/differential/cases/cat01_int_bit/c04_bitfields_signed_unsigned.c
  • tests/differential/cases/cat01_int_bit/c05_packed_bitfields.c
  • tests/differential/cases/cat01_int_bit/c06_unsigned_wraparound.c
  • tests/differential/cases/cat01_int_bit/c07_bit_clz_ctz.c
  • tests/differential/cases/cat01_int_bit/c08_bit_popcount_parity_ffs.c
  • tests/differential/cases/cat01_int_bit/c09_bswap_widths.c
  • tests/differential/cases/cat01_int_bit/c10_enum_underlying.cpp
  • tests/differential/cases/cat01_int_bit/c11_divmod_matrix_11.c
  • tests/differential/cases/cat01_int_bit/c12_divmod_matrix_12.c
  • tests/differential/cases/cat01_int_bit/c13_divmod_matrix_13.c
  • tests/differential/cases/cat01_int_bit/c14_divmod_matrix_14.c
  • tests/differential/cases/cat01_int_bit/c15_divmod_matrix_15.c
  • tests/differential/cases/cat01_int_bit/c16_divmod_matrix_16.c
  • tests/differential/cases/cat01_int_bit/c17_divmod_matrix_17.c
  • tests/differential/cases/cat01_int_bit/c18_divmod_matrix_18.c
  • tests/differential/cases/cat01_int_bit/c19_zero_width_volatile_bitfields.c
  • tests/differential/cases/cat01_int_bit/c20_c23_bitint_arith.c
  • tests/differential/cases/cat02_fp_complex/c01_fp_basic_casts.c
  • tests/differential/cases/cat02_fp_complex/c02_ieee_nan_inf_signbit.c
  • tests/differential/cases/cat02_fp_complex/c03_c99_complex_double.c
  • tests/differential/cases/cat02_fp_complex/c04_c99_complex_float.c
  • tests/differential/cases/cat02_fp_complex/c05_std_complex_cxx.cpp
  • tests/differential/cases/cat02_fp_complex/c06_math_intrinsics.c
  • tests/differential/cases/cat02_fp_complex/c07_horner_poly_7.c
  • tests/differential/cases/cat02_fp_complex/c08_horner_poly_8.c
  • tests/differential/cases/cat02_fp_complex/c09_horner_poly_9.c
  • tests/differential/cases/cat02_fp_complex/c10_horner_poly_10.c
  • tests/differential/cases/cat02_fp_complex/c11_horner_poly_11.c
  • tests/differential/cases/cat02_fp_complex/c12_horner_poly_12.c
  • tests/differential/cases/cat02_fp_complex/c13_horner_poly_13.c
  • tests/differential/cases/cat02_fp_complex/c14_horner_poly_14.c
  • tests/differential/cases/cat02_fp_complex/c15_horner_poly_15.c
  • tests/differential/cases/cat02_fp_complex/c16_horner_poly_16.c
  • tests/differential/cases/cat02_fp_complex/c17_horner_poly_17.c
  • tests/differential/cases/cat02_fp_complex/c18_horner_poly_18.c
  • tests/differential/cases/cat02_fp_complex/c19_complex_abi_calls.c
  • tests/differential/cases/cat02_fp_complex/c20_fixed_decimal_scaled.c
  • tests/differential/cases/cat03_abi_agg/c01_struct_byval_sz1.c
  • tests/differential/cases/cat03_abi_agg/c02_struct_byval_sz3.c
  • tests/differential/cases/cat03_abi_agg/c03_struct_byval_sz5.c
  • tests/differential/cases/cat03_abi_agg/c04_struct_byval_sz7.c
  • tests/differential/cases/cat03_abi_agg/c05_struct_byval_sz8.c
  • tests/differential/cases/cat03_abi_agg/c06_struct_byval_sz9.c
  • tests/differential/cases/cat03_abi_agg/c07_struct_byval_sz12.c
  • tests/differential/cases/cat03_abi_agg/c08_struct_byval_sz15.c
  • tests/differential/cases/cat03_abi_agg/c09_struct_byval_sz16.c
  • tests/differential/cases/cat03_abi_agg/c10_struct_byval_sz24.c
  • tests/differential/cases/cat03_abi_agg/c11_struct_byval_sz32.c
  • tests/differential/cases/cat03_abi_agg/c12_struct_byval_sz48.c
  • tests/differential/cases/cat03_abi_agg/c13_hfa_float4.c
  • tests/differential/cases/cat03_abi_agg/c14_hfa_double3.c
  • tests/differential/cases/cat03_abi_agg/c15_many_mixed_params_spill.c
  • tests/differential/cases/cat03_abi_agg/c16_variadic_ints_doubles.c
  • tests/differential/cases/cat03_abi_agg/c17_union_nested_agg.c
  • tests/differential/cases/cat03_abi_agg/c18_nontrivial_cxx_return_byval.cpp
  • tests/differential/cases/cat03_abi_agg/c19_va_arg_structs_hfa.c
  • tests/differential/cases/cat04_control_flow/c01_dense_switch.c
  • tests/differential/cases/cat04_control_flow/c02_sparse_switch_fallthrough.c
  • tests/differential/cases/cat04_control_flow/c03_computed_goto_vm.c
  • tests/differential/cases/cat04_control_flow/c04_stmt_expr_nested.c
  • tests/differential/cases/cat04_control_flow/c05_goto_raii_cleanup.cpp
  • tests/differential/cases/cat04_control_flow/c06_ternary_lvalue_shortcircuit.cpp
  • tests/differential/cases/cat04_control_flow/c07_nested_loops_break_continue_7.c
  • tests/differential/cases/cat04_control_flow/c08_nested_loops_break_continue_8.c
  • tests/differential/cases/cat04_control_flow/c09_nested_loops_break_continue_9.c
  • tests/differential/cases/cat04_control_flow/c10_nested_loops_break_continue_10.c
  • tests/differential/cases/cat04_control_flow/c11_nested_loops_break_continue_11.c
  • tests/differential/cases/cat04_control_flow/c12_nested_loops_break_continue_12.c
  • tests/differential/cases/cat04_control_flow/c13_nested_loops_break_continue_13.c
  • tests/differential/cases/cat04_control_flow/c14_nested_loops_break_continue_14.c
  • tests/differential/cases/cat04_control_flow/c15_nested_loops_break_continue_15.c
  • tests/differential/cases/cat04_control_flow/c16_nested_loops_break_continue_16.c
  • tests/differential/cases/cat04_control_flow/c17_nested_loops_break_continue_17.c
  • tests/differential/cases/cat04_control_flow/c18_nested_loops_break_continue_18.c
  • tests/differential/cases/cat04_control_flow/c19_inline_asm_portable.c
  • tests/differential/cases/cat05_obj_model/c01_single_virtual_dispatch.cpp
  • tests/differential/cases/cat05_obj_model/c02_multiple_inheritance_this_adj.cpp
  • tests/differential/cases/cat05_obj_model/c03_diamond_virtual_inheritance.cpp
  • tests/differential/cases/cat05_obj_model/c04_covariant_return.cpp
  • tests/differential/cases/cat05_obj_model/c05_deleting_destructor_d0.cpp
  • tests/differential/cases/cat05_obj_model/c06_array_new_delete_cookie.cpp
  • tests/differential/cases/cat05_obj_model/c07_ptr_to_data_member.cpp
  • tests/differential/cases/cat05_obj_model/c08_ptr_to_member_functions.cpp
  • tests/differential/cases/cat05_obj_model/c09_polymorphic_chain_9.cpp
  • tests/differential/cases/cat05_obj_model/c10_polymorphic_chain_10.cpp
  • tests/differential/cases/cat05_obj_model/c11_polymorphic_chain_11.cpp
  • tests/differential/cases/cat05_obj_model/c12_polymorphic_chain_12.cpp
  • tests/differential/cases/cat05_obj_model/c13_polymorphic_chain_13.cpp
  • tests/differential/cases/cat05_obj_model/c14_polymorphic_chain_14.cpp
  • tests/differential/cases/cat05_obj_model/c15_polymorphic_chain_15.cpp
  • tests/differential/cases/cat05_obj_model/c16_polymorphic_chain_16.cpp
  • tests/differential/cases/cat05_obj_model/c17_polymorphic_chain_17.cpp
  • tests/differential/cases/cat05_obj_model/c18_polymorphic_chain_18.cpp
  • tests/differential/cases/cat05_obj_model/c19_construction_vtable_dtor_d0_d1_d2.cpp
  • tests/differential/cases/cat06_eh_cleanup/c01_throw_catch_int.cpp
  • tests/differential/cases/cat06_eh_cleanup/c02_raii_lifo_unwind_multiframe.cpp
  • tests/differential/cases/cat06_eh_cleanup/c03_catch_base_ref.cpp
  • tests/differential/cases/cat06_eh_cleanup/c04_rethrow_and_catch_all.cpp
  • tests/differential/cases/cat06_eh_cleanup/c05_partial_ctor_subobject_unwind.cpp
  • tests/differential/cases/cat06_eh_cleanup/c06_nested_try_in_catch.cpp
  • tests/differential/cases/cat06_eh_cleanup/c07_std_runtime_error_hierarchy.cpp
  • tests/differential/cases/cat06_eh_cleanup/c08_catch_pointer_upcast.cpp
  • tests/differential/cases/cat06_eh_cleanup/c09_unwind_loop_cleanup_9.cpp
  • tests/differential/cases/cat06_eh_cleanup/c10_unwind_loop_cleanup_10.cpp
  • tests/differential/cases/cat06_eh_cleanup/c11_unwind_loop_cleanup_11.cpp
  • tests/differential/cases/cat06_eh_cleanup/c12_unwind_loop_cleanup_12.cpp
  • tests/differential/cases/cat06_eh_cleanup/c13_unwind_loop_cleanup_13.cpp
  • tests/differential/cases/cat06_eh_cleanup/c14_unwind_loop_cleanup_14.cpp
  • tests/differential/cases/cat06_eh_cleanup/c15_unwind_loop_cleanup_15.cpp
  • tests/differential/cases/cat06_eh_cleanup/c16_unwind_loop_cleanup_16.cpp
  • tests/differential/cases/cat06_eh_cleanup/c17_unwind_loop_cleanup_17.cpp
  • tests/differential/cases/cat06_eh_cleanup/c18_unwind_loop_cleanup_18.cpp
  • tests/differential/cases/cat06_eh_cleanup/c19_multithread_eh_and_raii_scopes.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c01_typeid_polymorphic.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c02_dyncast_downcast_and_fail.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c03_dyncast_sibling_crosscast.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c04_dyncast_diamond_virtual.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c05_dyncast_ref_bad_cast.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c06_rtti_dispatch_table_6.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c07_rtti_dispatch_table_7.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c08_rtti_dispatch_table_8.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c09_rtti_dispatch_table_9.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c10_rtti_dispatch_table_10.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c11_rtti_dispatch_table_11.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c12_rtti_dispatch_table_12.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c13_rtti_dispatch_table_13.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c14_rtti_dispatch_table_14.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c15_rtti_dispatch_table_15.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c16_rtti_dispatch_table_16.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c17_rtti_dispatch_table_17.cpp
  • tests/differential/cases/cat07_rtti_dyncast/c18_rtti_dispatch_table_18.cpp
  • tests/differential/cases/cat08_templates_lambdas/c01_variadic_fold_exprs.cpp
  • tests/differential/cases/cat08_templates_lambdas/c02_concepts_requires_overload.cpp
  • tests/differential/cases/cat08_templates_lambdas/c03_generic_init_mutable_lambdas.cpp
  • tests/differential/cases/cat08_templates_lambdas/c04_if_constexpr_structured_bindings.cpp
  • tests/differential/cases/cat08_templates_lambdas/c05_spaceship_three_way.cpp
  • tests/differential/cases/cat08_templates_lambdas/c06_constexpr_sieve.cpp
  • tests/differential/cases/cat08_templates_lambdas/c07_template_metaprog_7.cpp
  • tests/differential/cases/cat08_templates_lambdas/c08_template_metaprog_8.cpp
  • tests/differential/cases/cat08_templates_lambdas/c09_template_metaprog_9.cpp
  • tests/differential/cases/cat08_templates_lambdas/c10_template_metaprog_10.cpp
  • tests/differential/cases/cat08_templates_lambdas/c11_template_metaprog_11.cpp
  • tests/differential/cases/cat08_templates_lambdas/c12_template_metaprog_12.cpp
  • tests/differential/cases/cat08_templates_lambdas/c13_template_metaprog_13.cpp
  • tests/differential/cases/cat08_templates_lambdas/c14_template_metaprog_14.cpp
  • tests/differential/cases/cat08_templates_lambdas/c15_template_metaprog_15.cpp
  • tests/differential/cases/cat08_templates_lambdas/c16_template_metaprog_16.cpp
  • tests/differential/cases/cat08_templates_lambdas/c17_template_metaprog_17.cpp
  • tests/differential/cases/cat08_templates_lambdas/c18_template_metaprog_18.cpp
  • tests/differential/cases/cat08_templates_lambdas/c19_namespaces_nullptr_consteval_deducing_this.cpp
  • tests/differential/cases/cat09_coroutines/c01_coro_fibonacci_yield.cpp
  • tests/differential/cases/cat09_coroutines/c02_coro_return_value_task.cpp
  • tests/differential/cases/cat09_coroutines/c03_coro_raii_frame_destroy.cpp
  • tests/differential/cases/cat09_coroutines/c04_coro_unhandled_exception.cpp
  • tests/differential/cases/cat09_coroutines/c05_coro_stepper_5.cpp
  • tests/differential/cases/cat09_coroutines/c06_coro_stepper_6.cpp
  • tests/differential/cases/cat09_coroutines/c07_coro_stepper_7.cpp
  • tests/differential/cases/cat09_coroutines/c08_coro_stepper_8.cpp
  • tests/differential/cases/cat09_coroutines/c09_coro_stepper_9.cpp
  • tests/differential/cases/cat09_coroutines/c10_coro_stepper_10.cpp
  • tests/differential/cases/cat09_coroutines/c11_coro_stepper_11.cpp
  • tests/differential/cases/cat09_coroutines/c12_coro_stepper_12.cpp
  • tests/differential/cases/cat09_coroutines/c13_coro_stepper_13.cpp
  • tests/differential/cases/cat09_coroutines/c14_coro_stepper_14.cpp
  • tests/differential/cases/cat09_coroutines/c15_coro_stepper_15.cpp
  • tests/differential/cases/cat09_coroutines/c16_coro_stepper_16.cpp
  • tests/differential/cases/cat09_coroutines/c17_coro_stepper_17.cpp
  • tests/differential/cases/cat09_coroutines/c18_coro_stepper_18.cpp
  • tests/differential/cases/cat09_coroutines/c19_coro_custom_new_and_caught_eh.cpp
  • tests/differential/cases/cat10_atomics_tls/c01_atomic_builtins_rmw.c
  • tests/differential/cases/cat10_atomics_tls/c02_atomic_bitwise_64.c
  • tests/differential/cases/cat10_atomics_tls/c03_std_atomic_multithread.cpp
  • tests/differential/cases/cat10_atomics_tls/c04_thread_local_isolation.cpp
  • tests/differential/cases/cat10_atomics_tls/c05_mutex_lock_guard_threads.cpp
  • tests/differential/cases/cat10_atomics_tls/c06_cas_retry_loop_6.cpp
  • tests/differential/cases/cat10_atomics_tls/c07_cas_retry_loop_7.cpp
  • tests/differential/cases/cat10_atomics_tls/c08_cas_retry_loop_8.cpp
  • tests/differential/cases/cat10_atomics_tls/c09_cas_retry_loop_9.cpp
  • tests/differential/cases/cat10_atomics_tls/c10_cas_retry_loop_10.cpp
  • tests/differential/cases/cat10_atomics_tls/c11_cas_retry_loop_11.cpp
  • tests/differential/cases/cat10_atomics_tls/c12_cas_retry_loop_12.cpp
  • tests/differential/cases/cat10_atomics_tls/c13_cas_retry_loop_13.cpp
  • tests/differential/cases/cat10_atomics_tls/c14_cas_retry_loop_14.cpp
  • tests/differential/cases/cat10_atomics_tls/c15_cas_retry_loop_15.cpp
  • tests/differential/cases/cat10_atomics_tls/c16_cas_retry_loop_16.cpp
  • tests/differential/cases/cat10_atomics_tls/c17_cas_retry_loop_17.cpp
  • tests/differential/cases/cat10_atomics_tls/c18_cas_retry_loop_18.cpp
  • tests/differential/cases/cat10_atomics_tls/c19_c11_atomic_scalars_and_structs.c
  • tests/differential/cases/cat10_atomics_tls/c20_static_guard_and_tls_dtors.cpp
  • tests/differential/cases/cat11_gnu_ext/c01_attr_cleanup_lifo.c
  • tests/differential/cases/cat11_gnu_ext/c02_attr_constructor_destructor.c
  • tests/differential/cases/cat11_gnu_ext/c03_attr_packed_aligned.c
  • tests/differential/cases/cat11_gnu_ext/c04_gnu_vector_arith_cmp.c
  • tests/differential/cases/cat11_gnu_ext/c05_vla_sizeof_and_loop_stack.c
  • tests/differential/cases/cat11_gnu_ext/c06_builtin_choose_types_compat.c
  • tests/differential/cases/cat11_gnu_ext/c07_gnu_vec_pipeline_7.c
  • tests/differential/cases/cat11_gnu_ext/c08_gnu_vec_pipeline_8.c
  • tests/differential/cases/cat11_gnu_ext/c09_gnu_vec_pipeline_9.c
  • tests/differential/cases/cat11_gnu_ext/c10_gnu_vec_pipeline_10.c
  • tests/differential/cases/cat11_gnu_ext/c11_gnu_vec_pipeline_11.c
  • tests/differential/cases/cat11_gnu_ext/c12_gnu_vec_pipeline_12.c
  • tests/differential/cases/cat11_gnu_ext/c13_gnu_vec_pipeline_13.c
  • tests/differential/cases/cat11_gnu_ext/c14_gnu_vec_pipeline_14.c
  • tests/differential/cases/cat11_gnu_ext/c15_gnu_vec_pipeline_15.c
  • tests/differential/cases/cat11_gnu_ext/c16_gnu_vec_pipeline_16.c
  • tests/differential/cases/cat11_gnu_ext/c17_gnu_vec_pipeline_17.c
  • tests/differential/cases/cat11_gnu_ext/c18_gnu_vec_pipeline_18.c
  • tests/differential/cases/cat11_gnu_ext/c19_c11_generic_desig_fam_vmp.c
  • tests/differential/cases/cat11_gnu_ext/c20_cxx17_aligned_new_copy_elision.cpp
  • tests/differential/cases/cat11_gnu_ext/c21_openmp_parallel_reduction.cpp
  • tests/differential/cases/cat12_cross_abi/x01_c_structs_hfa/a.c
  • tests/differential/cases/cat12_cross_abi/x01_c_structs_hfa/b.c
  • tests/differential/cases/cat12_cross_abi/x01_c_structs_hfa/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x02_cxx_stl_and_eh/a.cpp
  • tests/differential/cases/cat12_cross_abi/x02_cxx_stl_and_eh/b.cpp
  • tests/differential/cases/cat12_cross_abi/x02_cxx_stl_and_eh/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x03_cross_vtable_rtti/a.cpp
  • tests/differential/cases/cat12_cross_abi/x03_cross_vtable_rtti/b.cpp
  • tests/differential/cases/cat12_cross_abi/x03_cross_vtable_rtti/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x04_cross_variadic/a.c
  • tests/differential/cases/cat12_cross_abi/x04_cross_variadic/b.c
  • tests/differential/cases/cat12_cross_abi/x04_cross_variadic/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x05_cross_abi_mix_5/a.cpp
  • tests/differential/cases/cat12_cross_abi/x05_cross_abi_mix_5/b.cpp
  • tests/differential/cases/cat12_cross_abi/x05_cross_abi_mix_5/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x06_cross_abi_mix_6/a.cpp
  • tests/differential/cases/cat12_cross_abi/x06_cross_abi_mix_6/b.cpp
  • tests/differential/cases/cat12_cross_abi/x06_cross_abi_mix_6/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x07_cross_abi_mix_7/a.cpp
  • tests/differential/cases/cat12_cross_abi/x07_cross_abi_mix_7/b.cpp
  • tests/differential/cases/cat12_cross_abi/x07_cross_abi_mix_7/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x08_cross_abi_mix_8/a.cpp
  • tests/differential/cases/cat12_cross_abi/x08_cross_abi_mix_8/b.cpp
  • tests/differential/cases/cat12_cross_abi/x08_cross_abi_mix_8/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x09_cross_abi_mix_9/a.cpp
  • tests/differential/cases/cat12_cross_abi/x09_cross_abi_mix_9/b.cpp
  • tests/differential/cases/cat12_cross_abi/x09_cross_abi_mix_9/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x10_cross_abi_mix_10/a.cpp
  • tests/differential/cases/cat12_cross_abi/x10_cross_abi_mix_10/b.cpp
  • tests/differential/cases/cat12_cross_abi/x10_cross_abi_mix_10/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x11_cross_abi_mix_11/a.cpp
  • tests/differential/cases/cat12_cross_abi/x11_cross_abi_mix_11/b.cpp
  • tests/differential/cases/cat12_cross_abi/x11_cross_abi_mix_11/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x12_cross_abi_mix_12/a.cpp
  • tests/differential/cases/cat12_cross_abi/x12_cross_abi_mix_12/b.cpp
  • tests/differential/cases/cat12_cross_abi/x12_cross_abi_mix_12/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x13_cross_abi_mix_13/a.cpp
  • tests/differential/cases/cat12_cross_abi/x13_cross_abi_mix_13/b.cpp
  • tests/differential/cases/cat12_cross_abi/x13_cross_abi_mix_13/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x14_cross_abi_mix_14/a.cpp
  • tests/differential/cases/cat12_cross_abi/x14_cross_abi_mix_14/b.cpp
  • tests/differential/cases/cat12_cross_abi/x14_cross_abi_mix_14/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x15_cross_abi_mix_15/a.cpp
  • tests/differential/cases/cat12_cross_abi/x15_cross_abi_mix_15/b.cpp
  • tests/differential/cases/cat12_cross_abi/x15_cross_abi_mix_15/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x16_cross_abi_mix_16/a.cpp
  • tests/differential/cases/cat12_cross_abi/x16_cross_abi_mix_16/b.cpp
  • tests/differential/cases/cat12_cross_abi/x16_cross_abi_mix_16/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x17_cross_abi_mix_17/a.cpp
  • tests/differential/cases/cat12_cross_abi/x17_cross_abi_mix_17/b.cpp
  • tests/differential/cases/cat12_cross_abi/x17_cross_abi_mix_17/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x18_cross_abi_mix_18/a.cpp
  • tests/differential/cases/cat12_cross_abi/x18_cross_abi_mix_18/b.cpp
  • tests/differential/cases/cat12_cross_abi/x18_cross_abi_mix_18/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x19_cxx20_modules/case.manifest.json
  • tests/differential/cases/cat12_cross_abi/x19_cxx20_modules/m_math.cppm
  • tests/differential/cases/cat12_cross_abi/x19_cxx20_modules/main.cpp
  • tests/differential/populate_cases.py
  • tests/differential/run_differential_suite.py
  • tests/driver/CMakeLists.txt
  • tests/driver/test_edg_be_driver.cpp
  • tests/fuzz_llvm_backend.cpp
  • tests/gcc_be/CMakeLists.txt
  • tests/gcc_be/check_coverage.py
  • tests/gcc_be/gcc_be_eh_rt.cpp
  • tests/gcc_be/generate_tests.py
  • tests/gcc_be/test_aggregates.c
  • tests/gcc_be/test_c23_atomics_vla.c
  • tests/gcc_be/test_common.h
  • tests/gcc_be/test_control_flow.c
  • tests/gcc_be/test_coro_large_frame.cpp
  • tests/gcc_be/test_cpp_classes.cpp
  • tests/gcc_be/test_dynamic_init.cpp
  • tests/gcc_be/test_edge_cases.c
  • tests/gcc_be/test_eh.cpp
  • tests/gcc_be/test_error.c
  • tests/gcc_be/test_expr_ops.c
  • tests/gcc_be/test_functions.c
  • tests/gcc_be/test_gcc_be_abi.cpp
  • tests/gcc_be/test_gcc_be_abi_targets.cpp
  • tests/gcc_be/test_gcc_be_bitfields.cpp
  • tests/gcc_be/test_gcc_be_builtin.cpp
  • tests/gcc_be/test_gcc_be_cache.cpp
  • tests/gcc_be/test_gcc_be_context.cpp
  • tests/gcc_be/test_gcc_be_coroutines.cpp
  • tests/gcc_be/test_gcc_be_debug.cpp
  • tests/gcc_be/test_gcc_be_debug_dwarf.cpp
  • tests/gcc_be/test_gcc_be_decl.cpp
  • tests/gcc_be/test_gcc_be_driver.cpp
  • tests/gcc_be/test_gcc_be_dtor.cpp
  • tests/gcc_be/test_gcc_be_eh.cpp
  • tests/gcc_be/test_gcc_be_eh_dwarf.cpp
  • tests/gcc_be/test_gcc_be_eh_rt_unit.cpp
  • tests/gcc_be/test_gcc_be_error.cpp
  • tests/gcc_be/test_gcc_be_errors.cpp
  • tests/gcc_be/test_gcc_be_expr.cpp
  • tests/gcc_be/test_gcc_be_expr_common.h
  • tests/gcc_be/test_gcc_be_expr_cov_init_const.cpp
  • tests/gcc_be/test_gcc_be_expr_cov_lval.cpp
  • tests/gcc_be/test_gcc_be_expr_cov_rval.cpp
  • tests/gcc_be/test_gcc_be_expr_lval.cpp
  • tests/gcc_be/test_gcc_be_expr_rval.cpp
  • tests/gcc_be/test_gcc_be_expr_rval2.cpp
  • tests/gcc_be/test_gcc_be_lib_loader.cpp
  • tests/gcc_be/test_gcc_be_loader.cpp
  • tests/gcc_be/test_gcc_be_location.cpp
  • tests/gcc_be/test_gcc_be_main.cpp
  • tests/gcc_be/test_gcc_be_omp_atomic_coro_unit.cpp
  • tests/gcc_be/test_gcc_be_regression.cpp
  • tests/gcc_be/test_gcc_be_rtti.cpp
  • tests/gcc_be/test_gcc_be_rtti_full.cpp
  • tests/gcc_be/test_gcc_be_simd.cpp
  • tests/gcc_be/test_gcc_be_stmt.cpp
  • tests/gcc_be/test_gcc_be_stmt2.cpp
  • tests/gcc_be/test_gcc_be_type.cpp
  • tests/gcc_be/test_incomp_arr_def.c
  • tests/gcc_be/test_incomp_arr_use.c
  • tests/gcc_be/test_inline_asm.c
  • tests/gcc_be/test_multi_tu_a.cpp
  • tests/gcc_be/test_multi_tu_b.cpp
  • tests/gcc_be/test_multi_tu_hdr.h
  • tests/gcc_be/test_noexcept_raii.cpp
  • tests/gcc_be/test_omp_exec.c
  • tests/gcc_be/test_scalars.c
  • tests/gcc_be/test_short_circuit.c
  • tests/gcc_be/test_stl_eh_a.cpp
  • tests/gcc_be/test_stl_eh_b.cpp
  • tests/gcc_be/test_stl_eh_hdr.h
  • tests/gcc_be/test_types.c
  • tests/gcc_be/test_types_numerics_exec.cpp
  • tests/gcc_be/test_virtual.cpp
  • tests/lit/abi_test.cpp
  • tests/lit/atomic_test.cpp
  • tests/lit/coro_test.cpp
  • tests/lit/ctor_dtor_test.cpp
  • tests/lit/eh_filter_test.cpp
  • tests/lit/eh_noexcept_test.cpp
  • tests/lit/eh_test.cpp
  • tests/lit/llvm/bitfield_test.c
  • tests/lit/llvm/codegen_cli_test.c
  • tests/lit/llvm/dbg_location_test.c
  • tests/lit/llvm/memcpy_test.c
  • tests/lit/llvm/opaque_pointers.c
  • tests/lit/llvm/sret_test.c
  • tests/lit/llvm/stmt_for.c
  • tests/lit/msvc_eh_test.cpp
  • tests/lit/overflow_test.cpp
  • tests/lit/ptrmem_test.cpp
  • tests/lit/rtti_test.cpp
  • tests/lit/simd_test.cpp
  • tests/lit/stmt_expr.cpp
  • tests/lit/thunk_test.cpp
  • tests/lit/tls_test.cpp
  • tests/lit/vector_test.cpp
  • tests/llvm_ir_backend_tests/stmt_test.cpp
  • tests/realworld/stl_torture_44.cpp
  • tests/run_llvm_tests.py
  • tests/test_llvm_abi.cpp
  • tests/test_llvm_abi_alignment.sh
  • tests/test_llvm_build_config.cpp
  • tests/test_llvm_builtins.cpp
  • tests/test_llvm_codegen.cpp
  • tests/test_llvm_const_evaluation.cpp
  • tests/test_llvm_control_flow.cpp
  • tests/test_llvm_coro_atomics.cpp
  • tests/test_llvm_coverage.sh
  • tests/test_llvm_datalayout.cpp
  • tests/test_llvm_debug_info.cpp
  • tests/test_llvm_decl.cpp
  • tests/test_llvm_declarations.cpp
  • tests/test_llvm_driver_flag.cpp
  • tests/test_llvm_e2e_execution.cpp
  • tests/test_llvm_error.cpp
  • tests/test_llvm_exceptions.cpp
  • tests/test_llvm_execution.sh
  • tests/test_llvm_expressions.cpp
  • tests/test_llvm_expressions.sh
  • tests/test_llvm_functions.sh
  • tests/test_llvm_fuzz.cpp
  • tests/test_llvm_globals.sh
  • tests/test_llvm_inline_asm.cpp
  • tests/test_llvm_integration.sh
  • tests/test_llvm_lto.cpp
  • tests/test_llvm_modules.cpp
  • tests/test_llvm_msvc_asm.cpp
  • tests/test_llvm_omp.cpp
  • tests/test_llvm_opt_pipeline.cpp
  • tests/test_llvm_orchestrator.cpp
  • tests/test_llvm_output_generation.sh
  • tests/test_llvm_pgo.cpp
  • tests/test_llvm_stl_headers.sh
  • tests/test_llvm_target_intrinsics.cpp
  • tests/test_llvm_type_lowering.cpp
  • tests/test_llvm_type_translation.cpp
  • tests/test_llvm_verifier.cpp
  • tests/test_llvm_vtable_rtti.cpp
  • tests/tests/imported/clang/cpp/SemaCXX/.ext-int.rto/default.1.1.txt
  • util/CMakeLists.txt
  • util/eccp.sh
  • util/mk_errinfo.c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

[!WARNING]
Review details and warnings were omitted to fit the comment limit.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…river [GH edgcpp#582]

Unify the EDG C/C++ front end with native LLVM IR (llvm_gen_be) and GCC
(libgccjit / gcc_gen_be) code-generating backends, a shared Stage-0
GCC/Clang/MSVC-compatible CLI driver and SDK discovery layer, an Itanium
C++ ABI exception-handling runtime for libgccjit, CMake 4-way backend
option support, and 100% documentation, function/line/branch test
coverage, and error-enum/noexcept enforcement across all platforms.

Signed-off-by: Samuel Marks <807580+SamuelMarks@users.noreply.github.com>
@edgcpp-bot

Copy link
Copy Markdown
Collaborator

AcknowlEDG review results updated for b15e65373b14:

CI failure.

…dgcpp#582]

Resolve the four cross-platform build, linkage, and Release-posture
defects surfaced by the 15-job multi-OS release matrix
(.github/workflows/release.yml, configured with -DEDG_BUILD_LIB=OFF
-DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release):

1. Standalone gcc_be_eh_rt target configuration (CMakeLists.txt,
   .github/workflows/release.yml):
   - When both EDG_BUILD_LIB and BUILD_TESTING are OFF, neither lib_src/
     nor tests/gcc_be/ defines gcc_be_eh_rt, activating the root
     CMakeLists.txt fallback target. That fallback omitted
     ${CMAKE_SOURCE_DIR}/src from target_include_directories (failing on
     #include "gcc_gen_be_error.h"), compiled C++17 DWARF/Itanium source
     lib_src/gcc_be_eh_rt.c as C11 without BACK_END_IS_GCC_GEN_BE=1, and
     attempted to build the POSIX/Itanium <unwind.h> trampoline archive
     under WIN32/MSVC.
   - Gate the standalone gcc_be_eh_rt target on NOT WIN32, expose both
     lib_src/ and src/ include directories, define
     BACK_END_IS_GCC_GEN_BE=1, compile as C++17 (-x c++ -std=c++17
     -fno-exceptions -fno-rtti -funwind-tables
     -fasynchronous-unwind-tables -Wunused-result
     -Werror=unused-result), and bundle lib/libedg_gcc_eh_rt.a into
     POSIX release archives when present.

2. MSVC _MSVC_LANG C++17 noexcept/[[nodiscard]] parity
   (src/edg_be_common.h, src/edg_be_sdk.h, src/gcc_gen_be_error.h,
   tests/driver/test_edg_be_driver.cpp):
   - MSVC cl.exe defines __cplusplus as 199711L by default even under
     /std:c++17 unless /Zc:__cplusplus is supplied, reporting the active
     standard in _MSVC_LANG (201703L). Checking only __cplusplus caused
     EDG_BE_NOEXCEPT and GCC_GEN_BE_NOEXCEPT to expand empty on header
     declarations while .cpp definitions and edg_be_path_exists_fn_t
     carried noexcept, triggering C++17 P0012R1 function-type mismatches
     (MSVC C2382 and C2440).
   - Inspect _MSVC_LANG alongside __cplusplus in EDG_BE_NODISCARD,
     EDG_BE_NOEXCEPT, GCC_GEN_BE_NODISCARD, GCC_GEN_BE_NOEXCEPT, and
     enum gcc_gen_be_error, align edg_be_path_exists_fn_t on
     EDG_BE_NOEXCEPT, and add static_assert(noexcept(...)) plus callback
     function-pointer verification in test_edg_be_driver.cpp.

3. Release-posture VLA lowering layout (src/gcc_gen_be_expr.c,
   src/gcc_gen_be_stmt.c):
   - Debug macro configurations set LOWER_VARIABLE_LENGTH_ARRAYS=0
     (exposing a_vla_dimension::dimension_variable), whereas Release
     macro configurations leave LOWER_VARIABLE_LENGTH_ARRAYS=1 (exposing
     a_vla_dimension::total_number_of_elements in src/il_def.h). Guard
     all four VLA dimension variable lookups on
     #if LOWER_VARIABLE_LENGTH_ARRAYS.

4. Windows MSVC CRT and dynamic libgccjit symbol resolution
   (src/gcc_gen_be_main.c, src/gcc_gen_be_omp.c,
   src/gcc_gen_be_lib_loader.h, src/gcc_gen_be_lib_loader.c):
   - Use _access(output_path, 0) from <io.h> on _WIN32 instead of POSIX
     access(output_path, F_OK) in gcc_gen_be_emit_artifact.
   - Include gcc_gen_be_lib_loader.h in gcc_gen_be_omp.c and bind
     p_gcc_jit_context_set_bool_allow_unreachable_blocks and
     p_gcc_jit_type_is_integral via GetProcAddress on _WIN32 so MSVC
     builds link without unresolved libgccjit imports.

Signed-off-by: Samuel Marks <807580+SamuelMarks@users.noreply.github.com>
@edgcpp-bot

Copy link
Copy Markdown
Collaborator

AcknowlEDG review results updated for 5f6d9031b7ab:

CI failure.

…p#582]

Resolve the three distinct root causes (plus a latent Linux ext4
directory-hash branch-coverage nondeterminism) behind the five failing
CI checks on PR edgcpp#582:

1. Windows MSVC Stage-0 driver SoftFloat wiring
   (tests/driver/CMakeLists.txt):
   - test_edg_be_driver compiles test_edg_be_driver.cpp,
     src/edg_be_sdk.cpp, and src/edg_be_driver.cpp with
     -DUSE_CMAKE_DEFINES and ${CMAKE_BINARY_DIR}/src/includes. Under
     the windows-msvc-release preset, cmake_defines.h defines
     USE_SOFTFLOAT=1, causing src/targ_def.h:2377 to include
     "softfloat.h" (MSVC C1083).
   - Linux CI images masked the missing dependency because SoftFloat
     headers reside under /usr/local/include, whereas Windows CI builds
     SoftFloat out-of-tree and supplies EDG_SOFTFLOAT_INCLUDE_PATH and
     EDG_SOFTFLOAT_LIB_PATH. Include cmake/softfloat.cmake and wire
     add_softfloat_to_target(test_edg_be_driver) to match cpfe,
     cpfe-cp, and cdisp.

2. x86_64 libLLVM-18 Constant::getNullValue(VoidTy) UB segfault
   (src/llvm_gen_be_expr.h, src/llvm_gen_be_expr.cpp,
   tests/test_llvm_builtins.cpp):
   - Synthetic IL expression nodes with expr->type == nullptr (such as
     op2 in test_llvm_builtins.cpp's __builtin_expect fixture) lower via
     llvm_type_from_edg_type(nullptr, ...) to llvm::Type::getVoidTy().
     Passing VoidTy (or raw FunctionType on enk_routine) into
     llvm::Constant::getNullValue hits the default llvm_unreachable arm
     in llvm/lib/IR/Constants.cpp, which compiles under -DNDEBUG in
     Ubuntu 24.04's x86_64 libLLVM.so.18.1 to __builtin_unreachable()
     with no epilogue, causing SIGSEGV (exit 139).
   - Introduce noexcept helper llvm_materialize_null_constant returning
     llvm_gen_be_error_t to substitute a first-class fallback LLVM type
     when expr_llvm_ty is void or FunctionType, percolate its status in
     enk_constant and enk_routine, harden test_llvm_builtins.cpp's
     evaluate_constant stub, and add 100% branch-coverage unit tests.

3. Linux ext4 HTree GCC CRT version discovery determinism
   (src/llvm_gen_be_driver.cpp, tests/test_llvm_orchestrator.cpp):
   - In discover_linux_gcc_crt_and_ldso, testing
     (gcc_crt_dir.empty() || ver_leaf > best_ver) within a single
     candidate base left the right-hand branch unexercised on Linux ext4
     whenever HTree half-MD4 filename hashing yielded version "30"
     ahead of "20", "10", and "05".
   - Remove the redundant gcc_crt_dir.empty() guard (best_ver starts as
     "") and early base-directory break so all candidate_gcc_bases are
     scanned for the highest GCC version, and populate both
     candidate_gcc_bases[0] ("30") and candidate_gcc_bases[1] ("10") in
     test_llvm_orchestrator.cpp for deterministic True/False branch
     execution across all filesystems.

4. _BitInt(I) template non-type deduction expectation update
   (tests/tests/imported/clang/cpp/SemaCXX/.ext-int.rto/default.1.1.txt):
   - Reaching tptk_bit_precise_int in
     ttt_is_or_contains_deduced_template_param (src/types.c) and
     matching bit-width bounds in src/templates.c allows
     template<int I> void deduced_bound(_BitInt(I)) to deduce I=3 on
     deduced_bound(b) as upstream Clang expects (29 errors instead of
     30). Update the recorded expectation accordingly.

Signed-off-by: Samuel Marks <807580+SamuelMarks@users.noreply.github.com>
@edgcpp-bot

Copy link
Copy Markdown
Collaborator

AcknowlEDG review results updated for bd4d22ea4eb2:

CI failure.

…pp#582]

Resolve the System V AMD64 long double / _Complex long double lowering
and ABI classification defects behind the Ubuntu 24.04 x86_64 failure in
test_llvm_e2e_execution (plus a latent x86_64 __int128 va_arg stack
alignment trap and Clang 20+ <arm_neon.h> __mfp8 compatibility):

1. x86 / x86_64 fk_long_double and tk_complex element lowering
   (src/llvm_gen_be_type.cpp, tests/test_llvm_type_lowering.cpp):
   - llvm_type_from_float previously matched x86_fp80 only when
     edg_type->size * targ_char_bit == 80. Because edg_type->size
     records ABI storage sizeof(long double) rather than 80-bit x87
     precision width, 16-byte-padded System V / MinGW x86_64 long double
     (128 bits in memory) mislowered to IEEE 754 binary128 (fp128,
     emitting __netf2 softfloat calls and binary128 bit patterns), while
     12-byte System V i386 long double (96 bits) fell through to double.
   - Halve edg_type->size when edg_type->kind == tk_complex to obtain
     the per-component byte width, and select x86_fp80 for 80-bit (10B),
     96-bit (12B i386), and 128-bit (16B non-Android x86/x86_64)
     representations while preserving ppc_fp128 on PowerPC, fp128 on
     128-bit IEEE targets (AArch64, RISC-V, SystemZ, Android x86_64),
     and double otherwise.

2. System V AMD64 COMPLEX_X87 classification under DO_IL_LOWERING=1
   (src/llvm_gen_be_abi_sysv_x86_64.h,
   src/llvm_gen_be_abi_sysv_x86_64.cpp, tests/test_llvm_abi.cpp,
   tests/test_llvm_e2e_execution.cpp):
   - With DO_IL_LOWERING=1 (LOWER_COMPLEX=1), lower_c99.c rewrites C99
     _Complex long double into a tk_typeref referencing internal
     tk_struct "_Complex_long_double" (size 32). Checking only unlowered
     tk_complex caused 32-byte lowered _Complex long double to hit
     size > 16 -> MEMORY (sret in %rdi with void return), conflicting
     with Clang's System V psABI section 3.2.3 COMPLEX_X87 convention
     (no sret; align-16 stack byval arguments; { x86_fp80, x86_fp80 }
     returned in %st(0) and %st(1)).
   - Add noexcept helper is_sysv_complex_x87_type returning
     llvm_gen_be_error_t to recognize both unlowered tk_complex and
     synthesized _Complex_long_double / _Complex_float80 structs while
     keeping user-defined 32-byte aggregates and Android fp128 _Complex
     long double in MEMORY / sret, and propagate >8-byte parameter
     alignments onto System V byval attributes.
   - Extend test_e2e_complex_clang_abi to exercise bidirectional Clang
     <-> cpfe _Complex long double calls.

3. System V x86_64 multi-eightbyte va_arg alignment & NEON Clang 20+
   (src/llvm_gen_be_abi_sysv_x86_64.cpp,
   tests/test_llvm_e2e_execution.cpp):
   - Align temporary register-reassembly buffer vaarg.reg.tmp ([2 x i64])
     to 16 bytes in lower_sysv_va_arg so 16-byte-aligned i128 loads
     (__int128 va_arg) never fault on x86_64 aligned SSE instructions.
   - Pass --clang_version=210000 in the macOS ARM64 <arm_neon.h> smoke
     test so Clang 20+ ARMv9.5 FP8 (__mfp8 and mf8_fpm) builtins are
     enabled when modern host resource headers are included.

Signed-off-by: Samuel Marks <807580+SamuelMarks@users.noreply.github.com>
@edgcpp-bot

Copy link
Copy Markdown
Collaborator

AcknowlEDG review results updated for 957eb6a6f0ff:

@edgcpp-bot

Copy link
Copy Markdown
Collaborator

AcknowlEDG review results updated for 957eb6a6f0ff:

CI failure.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants