Skip to content

Generalise memory orders to expressions #233

@MattWindsor91

Description

@MattWindsor91

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area:FuzzerSpecifically affecting the program mutatorType:EnhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions