You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[EVM] Refine intrinsic memory effects for improved alias analysis accuracy
EVM opcodes can be classified based on how their behavior
or output depends on the transaction state:
- Readnone (Pure)
- Volatile (State-Dependent)
- Side-Effecting (State-Changing)
(Reference: EVM opcodes categorization)
This patch adjusts the memory attributes of LLVM intrinsics corresponding
to these opcodes. At the LLVM IR level, the transaction-scoped EVM
state is modeled as reads/writes to inaccessible memory. This state does
not include the heap, which is modeled separately via regular LLVM pointer
parameters. State-dependent intrinsics are now marked as reading from
inaccessible memory. State-changing intrinsics are marked as both reading
from and writing to it.
To capture memory dependencies between plain loads/stores to storage
(or transient storage) and context (CALL* or CREATE* like) intrinsics, we
extended EVM alias analysis to determine aliasing between the call and
the memory location in a custom way.
0 commit comments