Skip to content

Fix LLVM trunk API v3 compatibility and require full CI builds - #286

Merged
19h merged 2 commits into
masterfrom
chore/bump-llvm-trunk
Oct 5, 2026
Merged

19h merged 2 commits into
masterfrom
chore/bump-llvm-trunk

Conversation

@github-actions

@github-actions github-actions Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

Build Morok against LLVM trunk 201b446bf71c7c6d37a9bb195ed5e448c5231070. The new pin exposes plugin API v3; rejecting it previously allowed a pure-layer build with no plugin or IR tests, so CI reported successful test steps before failing packaging. Earlier LLVM bumps also failed because the public PassInfoMixin was removed.

  • Use RequiredPassInfoMixin for every required Morok pass and migrate removed instruction-insertion, alignment, and opaque-pointer APIs.
  • Accept plugin API v2 and v3 from the matching LLVM headers, discard stale cached plugin-header paths when LLVM_DIR changes, and fail configuration when a requested plugin cannot be built.
  • Require the plugin and IR test targets in CI and reject empty CTest selections. Add configure-time regressions for supported/unsupported APIs, cache changes, and explicit pure-layer builds.

Post-merge follow-up dcc32b6 fixes the Linux arm64 runtime failure exposed by the full matrix. Caller-keyed dispatch overwrote x19, which LLVM reserves as the frame base for dynamic stack frames. An argument reload consequently read target instruction bytes instead of the Fibonacci index. The AArch64 carrier pool now starts at x20; a focused regression with an aligned dynamic frame and 32 arguments crashes with the old implementation on both Linux and macOS arm64 and passes with the fix.

Post-merge follow-up fe5180a6 fixes the Linux x86 runtime failure. MBA emitted shl i1 ..., 1, which produces LLVM poison and corrupted the arena workload's branch condition. Doubling now yields zero modulo 2 for one-bit operands. An exhaustive regression checks all four Boolean inputs for six operations, one to three layers, and both heuristic settings; it fails on the old pass and passes with the fix. The extra Linux x86 sweep also exposed an invalid syscall fixture: the third argument belongs in rdx, not r10; the fixture now uses the d constraint.

Validation of final master tree 30180306530c1de2481bf2452a45704a473b1513:

  • Built LLVM/Clang 24 from the exact new SHA, with ABI-breaking checks disabled as in CI.
  • Complete suites on both API-v3 LLVM 24 and API-v2 LLVM 23: 127 CTest entries each, zero failures, with one existing tracerpid_zero_clean skip each.
  • All 97 corpus programs compiled clean and obfuscated at high, max.toml, and built-in max; all 95 runtime-selected programs matched clean exit status and normalized output. The two existing runtime exclusions remain asm_context_switch.c and syscall_signals.c.
  • Linux arm64: all 93 CI-selected runtime comparisons pass with Ubuntu 24.04/GCC 14 headers and libraries, code generated by the exact pinned LLVM, and the fixed plugin. The existing four platform/runtime exclusions are unchanged.
  • Linux x86: all 93 CI-selected runtime comparisons pass under Docker emulation with Debian/GCC 14 headers and libraries and the exact pinned LLVM. The existing four exclusions are unchanged.
  • Workflow lint, shell syntax, and whitespace checks passed.

The latest master CI run on fe5180a6 is green on Linux x86_64, Linux arm64, macOS arm64, and Windows x86_64. The CI head, remote master head, and locally tested tree were verified against commit fe5180a6e47cb9a5b0f35a1e2956f21e3363e0ef and tree 30180306530c1de2481bf2452a45704a473b1513. The preceding 2e9928b run was intentionally cancelled after all four LLVM caches were saved to release the final run. The queued dcc32b6 run was intentionally cancelled before any jobs started because the Linux x86 failure required the MBA follow-up. The original Linux x86 cancellation was a hosted-runner acquisition failure: no job steps executed, and GitHub annotated it with “The job was not acquired by Runner of type hosted even after multiple attempts.”

@github-actions github-actions Bot added dependencies Pull requests that update a dependency file llvm labels Aug 3, 2026
@github-actions
github-actions Bot force-pushed the chore/bump-llvm-trunk branch from e50b30d to f632c07 Compare August 10, 2026 07:45
@github-actions github-actions Bot changed the title ci: bump LLVM trunk pin to fb77712fd1dd911330bd432d1fd9313081b40c59 ci: bump LLVM trunk pin to 8ea1b9dc4dbea13e0c093389399a28b9b35bb629 Aug 10, 2026
@github-actions
github-actions Bot force-pushed the chore/bump-llvm-trunk branch from f632c07 to a2ddae1 Compare August 17, 2026 06:59
@github-actions github-actions Bot changed the title ci: bump LLVM trunk pin to 8ea1b9dc4dbea13e0c093389399a28b9b35bb629 ci: bump LLVM trunk pin to 8a34f9d127e52586c7285fa07efd1b6b8e428ca0 Aug 17, 2026
@github-actions
github-actions Bot force-pushed the chore/bump-llvm-trunk branch from a2ddae1 to 275a57d Compare August 24, 2026 07:02
@github-actions github-actions Bot changed the title ci: bump LLVM trunk pin to 8a34f9d127e52586c7285fa07efd1b6b8e428ca0 ci: bump LLVM trunk pin to 3c6519006af45003813933136037c376a23a1338 Aug 24, 2026
@github-actions
github-actions Bot force-pushed the chore/bump-llvm-trunk branch from 275a57d to 1dff6c9 Compare August 31, 2026 13:02
@github-actions github-actions Bot changed the title ci: bump LLVM trunk pin to 3c6519006af45003813933136037c376a23a1338 ci: bump LLVM trunk pin to 09231ed02384f388ae5b87b9d89b804d8e94babf Aug 31, 2026
@github-actions github-actions Bot changed the title ci: bump LLVM trunk pin to 09231ed02384f388ae5b87b9d89b804d8e94babf ci: bump LLVM trunk pin to cd3a2657c7193abbdba4620649ff5b8f7409e47a Sep 7, 2026
@github-actions
github-actions Bot force-pushed the chore/bump-llvm-trunk branch from 1dff6c9 to 3814c7f Compare September 7, 2026 11:54
@github-actions github-actions Bot changed the title ci: bump LLVM trunk pin to cd3a2657c7193abbdba4620649ff5b8f7409e47a ci: bump LLVM trunk pin to 900b3d6aae5735ba040951d0029161c42da52417 Sep 14, 2026
@github-actions
github-actions Bot force-pushed the chore/bump-llvm-trunk branch from 3814c7f to c3fbe47 Compare September 14, 2026 12:09
@github-actions github-actions Bot changed the title ci: bump LLVM trunk pin to 900b3d6aae5735ba040951d0029161c42da52417 ci: bump LLVM trunk pin to 7818c91f7151a50df614fae9211eedfbfd32e938 Sep 21, 2026
@github-actions
github-actions Bot force-pushed the chore/bump-llvm-trunk branch from c3fbe47 to 806cb2e Compare September 21, 2026 12:18
@github-actions
github-actions Bot force-pushed the chore/bump-llvm-trunk branch from 806cb2e to 35c1c1c Compare September 28, 2026 13:14
@github-actions github-actions Bot changed the title ci: bump LLVM trunk pin to 7818c91f7151a50df614fae9211eedfbfd32e938 ci: bump LLVM trunk pin to b3f84790c4e5092745b22525bd249146ccf2ebad Sep 28, 2026
@github-actions
github-actions Bot force-pushed the chore/bump-llvm-trunk branch from 35c1c1c to fe1c348 Compare October 5, 2026 13:57
@github-actions github-actions Bot changed the title ci: bump LLVM trunk pin to b3f84790c4e5092745b22525bd249146ccf2ebad ci: bump LLVM trunk pin to 201b446bf71c7c6d37a9bb195ed5e448c5231070 Oct 5, 2026
Bump the pinned LLVM trunk commit to 201b446bf71c7c6d37a9bb195ed5e448c5231070
and update Morok to support both plugin API v2 and v3.

Key changes:
- cmake: Accept LLVM_PLUGIN_API_VERSION 2 or 3 in MorokLLVM.cmake, clear
  MOROK_PASSPLUGIN_HEADER cache across LLVM_DIR changes, and fail CMake
  configuration if MOROK_BUILD_PLUGIN=ON cannot find a usable LLVM.
- passes: Migrate pass classes from PassInfoMixin to RequiredPassInfoMixin
  and drop redundant isRequired() definitions.
- ir: Update instruction insertion and PHINode creation calls to use
  iterators, migrate opaque PointerType creation, and use getAlign()
  instead of getAlignment() in IR tests.
- ci & test: Add tests/cmake/llvm_discovery.py to validate LLVM discovery,
  build morok_plugin and morok_ir_tests explicitly in CI, and enforce
  --no-tests=error in ctest invocations.
@19h 19h changed the title ci: bump LLVM trunk pin to 201b446bf71c7c6d37a9bb195ed5e448c5231070 Fix LLVM trunk API v3 compatibility and require full CI builds Oct 5, 2026
@19h
19h merged commit 2e9928b into master Oct 5, 2026
3 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file llvm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant