-
Notifications
You must be signed in to change notification settings - Fork 14.5k
[libclc] Expose prepare_builtins_*
variables in top-level CMakeLists
#149657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+2
−2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix `libclc/utils/CMakeLists.txt` to expose `prepare_builtins_*` variables in parent scope. This was a regression introduced in llvm#148815 where the code was moved into subdirectory, and the variables would no longer be accessible to calls in top-level CMakeLists, resulting in attempting to build targets with empty command: ``` [1566/1676] cd /var/tmp/portage/llvm-core/libclc-22.0.0.9999/work/libclc_build && -o /var/tmp/portage/llvm-core/libclc-22.0.0.9999/work/libclc_build/clspv--.bc /var/tmp/portage/llvm-core/libclc-22.0.0.9999/work/libclc_build/obj.libclc.dir/clspv--/builtins.opt.clspv--.bc FAILED: clspv--.bc /var/tmp/portage/llvm-core/libclc-22.0.0.9999/work/libclc_build/clspv--.bc cd /var/tmp/portage/llvm-core/libclc-22.0.0.9999/work/libclc_build && -o /var/tmp/portage/llvm-core/libclc-22.0.0.9999/work/libclc_build/clspv--.bc /var/tmp/portage/llvm-core/libclc-22.0.0.9999/work/libclc_build/obj.libclc.dir/clspv--/builtins.opt.clspv--.bc /bin/sh: line 1: -o: command not found ```
This was referenced Jul 19, 2025
thesamesam
approved these changes
Jul 19, 2025
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/38701 Here is the relevant piece of the build log for the reference
|
Thx. |
yonghong-song
pushed a commit
to yonghong-song/llvm-project
that referenced
this pull request
Jul 20, 2025
This patch adds jump table support. A new insn 'gotox <reg>' is added to allow goto through a register. The register represents the address in the current section. Code: int foo(int a, int b) { __label__ l1, l2, l3, l4; void *jt1[] = {[0]=&&l1, [1]=&&l2}; void *jt2[] = {[0]=&&l3, [1]=&&l4}; int ret = 0; goto *jt1[a % 2]; l1: ret += 1; l2: ret += 3; goto *jt2[b % 2]; l3: ret += 5; l4: ret += 7; return ret; } Compilation Command: clang --target=bpf -O2 -S test2.c But I observed that the above compilation command actually hangs with BranchFolding. If I did the following: bool BranchFolderLegacy::runOnMachineFunction(MachineFunction &MF) { + if (true) return false; if (skipFunction(MF.getFunction())) return false; The compilation can be done successful. I roughly took a look at the dbg trace, looks like there is an infinite loop in BranchFolding. This patch is tested on top of commit: commit 58c3aff (origin/main, origin/HEAD, main) Author: Michał Górny <[email protected]> Date: Sun Jul 20 05:26:51 2025 +0200 [libclc] Expose `prepare_builtins_*` variables in top-level CMakeLists (llvm#149657)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix
libclc/utils/CMakeLists.txt
to exposeprepare_builtins_*
variables in parent scope. This was a regression introduced in #148815 where the code was moved into subdirectory, and the variables would no longer be accessible to calls in top-level CMakeLists, resulting in attempting to build targets with empty command: