Skip to content

Conversation

@wenju-he
Copy link
Contributor

The issue observed in 76bc7f9 seems fixed on llvm-14 branch based on new testing of a multi-threaded workload on Ice Lake server and Alder Lake desktop.
The same workload still fails on llvm-9 branch on Alder Lake.

The issue observed in 76bc7f9 seems fixed on llvm-14 branch
based on new testing of a multi-threaded workload on Ice Lake server and
Alder Lake desktop.
The same workload still fails on llvm-9 branch on Alder Lake.
@wenju-he wenju-he requested review from Nuullll, cdai2 and Copilot October 29, 2025 07:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the compileMutex synchronization mechanism that was previously serializing LLVM compilation operations on Windows. Based on testing with LLVM-14, the thread safety issues that necessitated this mutex appear to be resolved.

Key changes:

  • Removal of the global compileMutex declaration and initialization
  • Elimination of platform-specific mutex guards in the compilation path
  • Deletion of explanatory comments about LLVM thread safety concerns

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
common_clang.cpp Removes the compileMutex definition and all scoped lock guards (both Windows-specific and non-Windows-specific) from the Compile function
options_compile.cpp Removes the external compileMutex declaration and its usage in CheckCompileOptions function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


llvm::ManagedStatic<llvm::sys::SmartMutex<true>> compileMutex;

void CommonClangTerminate() { llvm::llvm_shutdown(); }
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

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

With the removal of compileMutex, ensure that llvm::llvm_shutdown() is only called after all compilation threads have completed, as concurrent calls or compilation during shutdown could cause undefined behavior.

Copilot uses AI. Check for mistakes.
@wenju-he wenju-he merged commit 18ec882 into intel:ocl-open-140 Oct 31, 2025
1 check passed
@wenju-he wenju-he deleted the remove-compileMutex branch October 31, 2025 07:50
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