Skip to content

Commit

Permalink
dialects: (riscv) Make riscv.get_register pure (#2797)
Browse files Browse the repository at this point in the history
This makes `get_register` pure, as it should be.

The op never reads/writes and is safe to DCE and CSE.
  • Loading branch information
AntonLydike authored Jun 27, 2024
1 parent e8c3fb7 commit 85f5050
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xdsl/dialects/riscv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2840,7 +2840,7 @@ class GetAnyRegisterOperation(Generic[RDInvT], IRDLOperation, RISCVOp):

res: OpResult = result_def(RDInvT)

traits = frozenset((RegisterAllocatedMemoryEffect(),))
traits = frozenset((Pure(),))

def __init__(
self,
Expand Down

0 comments on commit 85f5050

Please sign in to comment.