This is completely unrelated to LLVM. Side effects are 100% well-defined in the Zig language.
Examples of Not side effects:
- calling a function
- loading from memory
- storing to memory
- inline assembly
- atomics
unreachablein unsafe optimization modes- everything not in the following list
Complete, exhaustive list of all side effects:
- loading through a
volatilepointer - storing through a
volatilepointer - inline assembly with
volatilekeyword - atomics with
volatilepointers - calling an extern function
@panic,@trap,@breakpointunreachablein safe optimization modes (equivalent to@panic)