diff options
author | Tom Eccles <tom.eccles@arm.com> | 2023-12-08 10:51:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-08 10:51:20 +0000 |
commit | bdacd56fd1f4825cfe19cf8de0cf24a3d1ff18fa (patch) | |
tree | 5530b2f2f779d9dbb229c3792be14c7d63c417f5 /llvm/lib/Support/CommandLine.cpp | |
parent | 633fe60149ece4bd7f4efe5e945b7982d130254a (diff) | |
download | llvm-bdacd56fd1f4825cfe19cf8de0cf24a3d1ff18fa.zip llvm-bdacd56fd1f4825cfe19cf8de0cf24a3d1ff18fa.tar.gz llvm-bdacd56fd1f4825cfe19cf8de0cf24a3d1ff18fa.tar.bz2 |
[flang][CodeGen] add nsw to address calculations (#74709)
`nsw` is a flag for LLVM arithmetic operations meaning "no signed wrap".
If this keyword is present, the result of the operation is a poison
value if overflow occurs. Adding this keyword permits LLVM to re-order
integer arithmetic more aggressively.
In
https://discourse.llvm.org/t/rfc-changes-to-fircg-xarray-coor-codegen-to-allow-better-hoisting/75257/16
@vzakhari observed that adding nsw is useful to enable hoisting of
address calculations after some loops (or is at least a step in that
direction).
Classic flang also adds nsw to address calculations.
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
0 files changed, 0 insertions, 0 deletions