Skip to content

Unify treatment of cache operations versus memory operations in IR for optimal consumption by tools #7919

@derekbruening

Description

@derekbruening

Some instructions operate on addresses but only affect cache state and do not really affect data at that memory address.
This issue covers how to best represent and separate cache addresses versus memory address in the IR so that tools can act on them appropriately without having to dispatch by opcode.

Tracing tools like drmemtrace often have separate types for cache operations versus memory accesses. drmemtrace has separate cache flush record types. And something like a taint tracking tool might not consider a cache operation to propagate "taint" or other metadata, while a memory operation does.

Some examples of specific instructions here:

The goal here is to come to consensus on which operations most tools would want to treat as memory accesses vs cache state changes, and then agree on what the best IR representation is for each (register operand for cache operation and memory operand for memory access?). We would then change the DR decoder to achieve consistent treatment (e.g., change OP_clflush to not have a memory operand).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions