Skip to content
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

Generalise memory orders to expressions #233

Open
MattWindsor91 opened this issue Oct 24, 2020 · 0 comments
Open

Generalise memory orders to expressions #233

MattWindsor91 opened this issue Oct 24, 2020 · 0 comments
Labels
Area:Fuzzer Specifically affecting the program mutator Type:Enhancement New feature or request

Comments

@MattWindsor91
Copy link
Collaborator

Presently, memory orders are a static enumeration. However, it transpires that we miss a lot of Clang codegen code by not having statically unknowable memory orders!

As such, we should be able to have arbitrary memory order expressions. I suspect these would be most easily implemented by:

  • making the memory order enum a variant of expression;
  • adding convenience constructors if necesssary;
  • using variant accessors to grab memory orders when we need to;
  • eventually replacing the memory order generators with new ones that can layer in complex expressions that terminate with specific wanted memory orders.

I'm unsure at which point this sort of exotic memory order work becomes undefined behaviour; maybe I'll need to spend some winter nights with a draft copy of C11.

@MattWindsor91 MattWindsor91 added Type:Enhancement New feature or request Area:Fuzzer Specifically affecting the program mutator labels Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Fuzzer Specifically affecting the program mutator Type:Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant