Skip to content

[SYCL] Fixed an issue building shared-libs config#3301

Merged
bader merged 1 commit intointel:syclfrom
DenisBakhvalov:dbakhval/fix-shared-libs
Mar 5, 2021
Merged

[SYCL] Fixed an issue building shared-libs config#3301
bader merged 1 commit intointel:syclfrom
DenisBakhvalov:dbakhval/fix-shared-libs

Conversation

@DenisBakhvalov
Copy link
Contributor

No description provided.

@DenisBakhvalov DenisBakhvalov force-pushed the dbakhval/fix-shared-libs branch from 78cb504 to 759f114 Compare March 4, 2021 18:54
Copy link
Contributor

@elizabethandrews elizabethandrews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

clangCrossTU
clangFrontend
clangLex
clangSema
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change is needed? Is this dependency introduced by SYCL changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change is needed?

Some other failures were hidden by the one that I fixed with the change in llvm/lib/Passes/CMakeLists.txt. I.e. after I fixed one unresolved external problem there were 4 more.

Is this dependency introduced by SYCL changes?

Yes, I believe this failure was triggered by the recent pulldown to SYCL.
I'm not familiar with this part of FE, so I let FE people decide whether this dependency makes sense.

Copy link
Contributor

@bader bader Mar 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very suspicious. Community version doesn't have this dependency. https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/CMakeLists.txt#L92
+@erichkeane, @AaronBallman, do you know the reason for clang's CodeGen to depend on Sema library?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to merge this PR, but I'll open a separate issue to understand what's going on here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #3309.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Clang's CodeGen library relies on Sema because of: https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/CGDecl.cpp#L44 but I admit that this looks really suspicious to me. I could have sworn this is a layering violation (now Sema relies on CodeGen which relies on Sema). The patch that introduced the change was: llvm/llvm-project@0d61cd2 and it had all of 15 minutes of review before landing, and after landing someone pointed out the layering violation but no rollback happened. I've commented on it in community.

@bader bader merged commit 9cfbc8f into intel:sycl Mar 5, 2021
jsji pushed a commit that referenced this pull request Sep 6, 2025
A recent spirv-val change requires that OpDecorateId IDs are
well-ordered, which means that the decoration operand ID cannot be the
same as the decoration target ID. See:
KhronosGroup/SPIRV-Tools#6227

This leads to the failure:

```
error: line 6: Parameter <ID> '2[%uint_0]' must appear earlier in the binary than the target
  OpDecorateId %uint_0 UniformId %uint_0
```

The fix is to use a different ID for the decoration operand and the
decoration target.

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@fc5873ee760c333
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.

4 participants