| commit | 1e7772abcbe1ccf3fd6f2bdf5216f3dabeb55c94 | [log] [tgz] |
|---|---|---|
| author | Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com> | Wed Aug 13 15:53:59 2025 -0500 |
| committer | GitHub <noreply@github.com> | Wed Aug 13 15:53:59 2025 -0500 |
| tree | 9f401f6833d487adf27b5c3249e68ad8f9d214c3 | |
| parent | af87214b849ba064dbe6dc13972b29cc49662fd2 [diff] |
[flang][OpenMP] Reassociate ATOMIC update expressions (#153488) An atomic update expression of form x = x + a + b is technically illegal, since the right-hand side is parsed as (x+a)+b, and the atomic variable x should be an argument to the top-level +. When the type of x is integer, the result of (x+a)+b is guaranteed to be the same as x+(a+b), so instead of reporting an error, the compiler can treat (x+a)+b as x+(a+b). This PR implements this kind of reassociation for integral types, and for the two arithmetic associative/commutative operators: + and *. Reinstate PR153098 one more time with fixes for the issues that came up: - unused variable "lsrc", - use of ‘outer1’ before deduction of ‘auto’.
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.