aboutsummaryrefslogtreecommitdiff
path: root/src/ThreadPool.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-07-28 18:40:30 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-07-29 02:35:06 -0700
commit1fc24e8d807a489254be46c9fcb951617a04f3b1 (patch)
tree48ffbbb3cc12c3234e1c242f146dd2c9ecb5eca7 /src/ThreadPool.zig
parenta48251735787f590491caf4e446dad74c66aa13c (diff)
downloadzig-1fc24e8d807a489254be46c9fcb951617a04f3b1.tar.gz
zig-1fc24e8d807a489254be46c9fcb951617a04f3b1.zip
Sema: enhance `div` instruction analysis
Concrete improvements: * Added safety for integer overflow (-MAX_INT/-1) * Omit division by zero safety check when RHS is comptime known to be non-zero. * Avoid emitting `_optimized` variants of AIR instructions for integers (this suffix is intended to be used for floats only). Subjective changes: I extracted the div logic out from analyzeArithmetic in order to reduce the amount of branches - not for performance reasons but for code clarity. It is more lines of code however, and some logic is duplicated.
Diffstat (limited to 'src/ThreadPool.zig')
0 files changed, 0 insertions, 0 deletions