Skip to content

Conversation

@vext01
Copy link

@vext01 vext01 commented Dec 9, 2025

This is more obviously safe.

yk-side PR to follow.

Instruction *ThreadTracingState =
LoadInst *ThreadTracingState =
Builder.CreateLoad(I8Ty, ThreadTracingTL);
ThreadTracingState->setAtomic(llvm::AtomicOrdering::Acquire);
Copy link

Choose a reason for hiding this comment

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

This is an atomic int I think? If so, it should be Ordering::Relaxed IMHO.

Copy link
Author

Choose a reason for hiding this comment

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

I think you are right. Doh!

@vext01 vext01 force-pushed the lightweight-swt-atomic branch from 6321aa3 to 5123de2 Compare December 10, 2025 09:28
@vext01
Copy link
Author

vext01 commented Dec 10, 2025

Fixed in a force push.

For whatever reason, what the rest of the world calls "relaxed", they call "monotonic":

Monotonic = 2, // Equivalent to C++'s relaxed.

Similar fixes will need to be applied to they yk side, which I will apply now.

@ltratt ltratt added this pull request to the merge queue Dec 10, 2025
Merged via the queue into ykjit:main with commit a802fdf Dec 10, 2025
2 checks passed
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