Revision tags: llvmorg-21-init, llvmorg-19.1.7 |
|
#
ad38e24e |
| 13-Jan-2025 |
David Pagan <dave.pagan@amd.com> |
[clang][OpenMP] Add 'align' modifier for 'allocate' clause (#121814)
The 'align' modifier is now accepted in the 'allocate' clause. Added LIT tests covering codegen, PCH, template handling, and seri
[clang][OpenMP] Add 'align' modifier for 'allocate' clause (#121814)
The 'align' modifier is now accepted in the 'allocate' clause. Added LIT tests covering codegen, PCH, template handling, and serialization for 'align' modifier.
Added support for align-modifier to release notes.
Testing - New allocate modifier LIT tests. - OpenMP LIT tests. - check-all
show more ...
|
Revision tags: llvmorg-19.1.6, llvmorg-19.1.5 |
|
#
1e3e199e |
| 27-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[Sema] Migrate away from PointerUnion::{is,get} (NFC) (#117498)
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_
[Sema] Migrate away from PointerUnion::{is,get} (NFC) (#117498)
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
// isa<T>, cast<T> and the llvm::dyn_cast<T>
I'm not touching PointerUnion::dyn_cast for now because it's a bit
complicated; we could blindly migrate it to dyn_cast_if_present, but
we should probably use dyn_cast when the operand is known to be
non-null.
show more ...
|
#
612f8ec7 |
| 25-Nov-2024 |
ShashwathiNavada <shashwathinavada@gmail.com> |
seq_cst is allowed in Flush since OpenMP 5.1. (#114072)
This PR adds support seq_cst (sequential consistency) clause for the
flush directive in OpenMP. The seq_cst clause enforces a stricter memory
seq_cst is allowed in Flush since OpenMP 5.1. (#114072)
This PR adds support seq_cst (sequential consistency) clause for the
flush directive in OpenMP. The seq_cst clause enforces a stricter memory
ordering, ensuring that all threads observe the memory effects of the
flush in the same order, improving consistency in memory operations
across threads.
---------
Co-authored-by: Shashwathi N <nshashwa@pe28vega.hpc.amslabs.hpecorp.net>
Co-authored-by: CHANDRA GHALE <chandra.nitdgp@gmail.com>
show more ...
|
Revision tags: llvmorg-19.1.4 |
|
#
46d750be |
| 16-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[Sema] Remove unused includes (NFC) (#116461)
Identified with misc-include-cleaner.
|
#
b9d678d2 |
| 15-Nov-2024 |
Joseph Huber <huberjn@outlook.com> |
[Clang] Use TargetInfo when deciding if an address space is compatible (#115777)
Summary: Address spaces are used in several embedded and GPU targets to describe accesses to different types of memo
[Clang] Use TargetInfo when deciding if an address space is compatible (#115777)
Summary: Address spaces are used in several embedded and GPU targets to describe accesses to different types of memory. Currently we use the address space enumerations to control which address spaces are considered supersets of eachother, however this is also a target level property as described by the C standard's passing mentions. This patch allows the address space checks to use the target information to decide if a pointer conversion is legal. For AMDGPU and NVPTX, all supported address spaces can be converted to the default address space.
More semantic checks can be added on top of this, for now I'm mainly looking to get more standard semantics working for C/C++. Right now the address space conversions must all be done explicitly in C/C++ unlike the offloading languages which define their own custom address spaces that just map to the same target specific ones anyway. The main question is if this behavior is a function of the target or the language.
show more ...
|
#
dde802b1 |
| 15-Nov-2024 |
Sirraide <aeternalmail@gmail.com> |
[Clang] [NFC] Refactor AST visitors in Sema and the static analyser to use DynamicRecursiveASTVisitor (#115144)
This pr refactors all recursive AST visitors in `Sema`, `Analyze`, and
`StaticAnalysi
[Clang] [NFC] Refactor AST visitors in Sema and the static analyser to use DynamicRecursiveASTVisitor (#115144)
This pr refactors all recursive AST visitors in `Sema`, `Analyze`, and
`StaticAnalysis` to inherit from DRAV instead. This is over half of the
visitors that inherit from RAV directly.
See also #115132, #110040, #93462
LLVM Compile-Time Tracker link for this branch:
https://llvm-compile-time-tracker.com/compare.php?from=5adb5c05a2e9f31385fbba8b0436cbc07d91a44d&to=b58e589a86c06ba28d4d90613864d10be29aa5ba&stat=instructions%3Au
show more ...
|
#
435e5846 |
| 06-Nov-2024 |
David Pagan <dave.pagan@amd.com> |
[clang][OpenMP] Add 'allocator' modifier for 'allocate' clause. (#114883)
The 'allocator' modifier is now accepted in the 'allocate' clause. Added
LIT tests covering codegen, PCH, template handling
[clang][OpenMP] Add 'allocator' modifier for 'allocate' clause. (#114883)
The 'allocator' modifier is now accepted in the 'allocate' clause. Added
LIT tests covering codegen, PCH, template handling, and serialization
for 'allocator' modifier.
Added support for allocator-modifier to release notes.
Testing
- New allocate modifier LIT tests.
- OpenMP LIT tests.
- check-all
- relevant sollve_vv test cases
tests/5.2/scope/test_scope_allocate_construct.c
show more ...
|
Revision tags: llvmorg-19.1.3 |
|
#
4dd55c56 |
| 24-Oct-2024 |
Jay Foad <jay.foad@amd.com> |
[clang] Use {} instead of std::nullopt to initialize empty ArrayRef (#109399)
Follow up to #109133.
|
#
f1e455ed |
| 21-Oct-2024 |
Jinsong Ji <jinsong.ji@intel.com> |
[NFC][Sema][OpenMP] Fix free-nonheap-object warning (#112942)
This is one of the many PRs to fix errors with LLVM_ENABLE_WERROR=on.
Built by GCC 11.
Fix warning
In destructor ‘llvm::APInt::~A
[NFC][Sema][OpenMP] Fix free-nonheap-object warning (#112942)
This is one of the many PRs to fix errors with LLVM_ENABLE_WERROR=on.
Built by GCC 11.
Fix warning
In destructor ‘llvm::APInt::~APInt()’,
inlined from ‘llvm::APInt::~APInt()’ at
llvm-project/llvm/include/llvm/ADT/APInt.h:190:3,
inlined from ‘llvm::APSInt::~APSInt()’ at
llvm-project/llvm/include/llvm/ADT/APSInt.h:23:21,
inlined from ‘bool
checkOMPArraySectionConstantForReduction(clang::ASTContext&, const
clang::ArraySectionExpr*, bool&, llvm::SmallVectorImpl<llvm::APSInt>&)’
at llvm-project/clang/lib/Sema/SemaOpenMP.cpp:18357:45,
inlined from ‘bool actOnOMPReductionKindClause(clang::Sema&,
{anonymous}::DSAStackTy*, clang::OpenMPClauseKind,
llvm::ArrayRef<clang::Expr*>, clang::SourceLocation,
clang::SourceLocation, clang::SourceLocation, clang::SourceLocation,
clang::CXXScopeSpec&, const clang::DeclarationNameInfo&,
llvm::ArrayRef<clang::Expr*>, {anonymous}::ReductionData&)’ at
llvm-project/clang/lib/Sema/SemaOpenMP.cpp:18715:68:
llvm-project/llvm/include/llvm/ADT/APInt.h:192:18: error: ‘void operator
delete [](void*)’ called on a pointer to an unallocated object ‘1’
[-Werror=free-nonheap-object]
192 | delete[] U.pVal;
| ^~~~
show more ...
|
#
255a99c2 |
| 17-Oct-2024 |
Nikita Popov <npopov@redhat.com> |
[APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (#80309)
This fixes all the places that hit the new assertion added in
https://github.com/llvm/llvm-project/pull/106524 in t
[APInt] Fix APInt constructions where value does not fit bitwidth (NFCI) (#80309)
This fixes all the places that hit the new assertion added in
https://github.com/llvm/llvm-project/pull/106524 in tests. That is,
cases where the value passed to the APInt constructor is not an N-bit
signed/unsigned integer, where N is the bit width and signedness is
determined by the isSigned flag.
The fixes either set the correct value for isSigned, set the
implicitTrunc flag, or perform more calculations inside APInt.
Note that the assertion is currently still disabled by default, so this
patch is mostly NFC.
show more ...
|
Revision tags: llvmorg-19.1.2 |
|
#
5b03efb8 |
| 09-Oct-2024 |
Michael Kruse <llvm-project@meinersbur.de> |
[Clang][OpenMP] Add permutation clause (#92030)
Add the permutation clause for the interchange directive which will be
introduced in the upcoming OpenMP 6.0 specification. A preview has been
publi
[Clang][OpenMP] Add permutation clause (#92030)
Add the permutation clause for the interchange directive which will be
introduced in the upcoming OpenMP 6.0 specification. A preview has been
published in
[Technical Report12](https://www.openmp.org/wp-content/uploads/openmp-TR12.pdf).
show more ...
|
#
e8f01b05 |
| 05-Oct-2024 |
Kazu Hirata <kazu@google.com> |
[Sema] Avoid repeated hash lookups (NFC) (#111227)
|
Revision tags: llvmorg-19.1.1 |
|
#
4ae0c505 |
| 30-Sep-2024 |
Mariya Podchishchaeva <mariya.podchishchaeva@intel.com> |
[clang] Fix static analyzer concerns (#110243)
It seems in checkOpenMPIterationSpace `OrderedLoopCountExpr` can also be
null, so check before dereferencing.
|
#
815b0046 |
| 17-Sep-2024 |
Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com> |
[clang][OpenMP] Slightly refactor EndOpenMPDSABlock for readability, NFC (#109003)
Change the loop
```
if (isOpenMPExecutableDirective)
for (Clause)
if (Clause is kind1)
mul
[clang][OpenMP] Slightly refactor EndOpenMPDSABlock for readability, NFC (#109003)
Change the loop
```
if (isOpenMPExecutableDirective)
for (Clause)
if (Clause is kind1)
multi
line
do
something1;
else if (Clause is kind2)
...
...
```
to
```
auto do1 = ...do something1...;
auto do2 = ...do something2...;
...
if (isOpenMPExecutableDirective)
for (Clause)
if (Clause is kind1)
do1();
else if (Clause is kind2)
do2();
...
...
```
show more ...
|
Revision tags: llvmorg-19.1.0 |
|
#
3ba0755d |
| 07-Sep-2024 |
Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com> |
[clang][OpenMP] Simplify handling of implicit DSA/mapping information (#106786)
Create `VariableImplicitInfo` to hold the data. Most of it is used all
at once, so aggregating it seems like a good i
[clang][OpenMP] Simplify handling of implicit DSA/mapping information (#106786)
Create `VariableImplicitInfo` to hold the data. Most of it is used all
at once, so aggregating it seems like a good idea.
show more ...
|
Revision tags: llvmorg-19.1.0-rc4 |
|
#
ff04c5b2 |
| 29-Aug-2024 |
Dan Liew <dan@su-root.co.uk> |
[NFC][Sema] Move `Sema::AssignmentAction` into its own scoped enum (#106453)
The primary motivation behind this is to allow the enum type to be
referred to earlier in the Sema.h file which is neede
[NFC][Sema] Move `Sema::AssignmentAction` into its own scoped enum (#106453)
The primary motivation behind this is to allow the enum type to be
referred to earlier in the Sema.h file which is needed for #106321.
It was requested in #106321 that a scoped enum be used (rather than
moving the enum declaration earlier in the Sema class declaration).
Unfortunately doing this creates a lot of churn as all use sites of the
enum constants had to be changed. Appologies to all downstream forks in
advanced.
Note the AA_ prefix has been dropped from the enum value names as they
are now redundant.
show more ...
|
Revision tags: llvmorg-19.1.0-rc3 |
|
#
e732d1ce |
| 19-Aug-2024 |
Yuxuan Chen <ych@fb.com> |
[Clang] Fix ICE in SemaOpenMP with structured binding (#104822)
Fixes https://github.com/llvm/llvm-project/issues/104810.
Clang currently crashes on the following program:
```
struct S {
int
[Clang] Fix ICE in SemaOpenMP with structured binding (#104822)
Fixes https://github.com/llvm/llvm-project/issues/104810.
Clang currently crashes on the following program:
```
struct S {
int i;
};
auto [a] = S{1};
void foo() {
a;
}
```
when `-fopenmp` is enabled.
Because `a` is neither `VarDecl` nor `FieldDecl`. It's a `BindingDecl`
that's not handled in `SemaOpenMP.cpp`'s `getCanonicalDecl`. It appears
to me that this pattern matching is merely just for a refined return
type of the overrides. It can also be achieved with just using the
virtual `Decl::getCanonicalDecl()` instead. Do the final casting should
be safe for `ValueDecl`s.
show more ...
|
#
3188e9b4 |
| 19-Aug-2024 |
Julian Brown <julian.brown@amd.com> |
[clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (#101305)
This patch fixes a couple of cases where Clang aborts with loop nests
that are being collapsed (via the relev
[clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (#101305)
This patch fixes a couple of cases where Clang aborts with loop nests
that are being collapsed (via the relevant OpenMP clause) into a new,
combined loop.
The problematic cases happen when a variable declared within the loop
nest is used in the (init, condition, iter) statement of a more
deeply-nested loop. I don't think these cases (generally?) fall under
the non-rectangular loop nest rules as defined in OpenMP 5.0+, but I
could be wrong (and anyway, emitting an error is better than crashing).
In terms of implementation: the crash happens because (to a first
approximation) all the loop bounds calculations are pulled out to the
start of the new, combined loop, but variables declared in the loop nest
"haven't been seen yet". I believe there is special handling for
iteration variables declared in "for" init statements, but not for
variables declared elsewhere in the "imperfect" parts of a loop nest.
So, this patch tries to diagnose the troublesome cases before they can
cause a crash. This is slightly awkward because at the point where we
want to do the diagnosis (SemaOpenMP.cpp), we don't have scope
information readily available. Instead we "manually" scan through the
AST of the loop nest looking for var decls (ForVarDeclFinder), then we
ensure we're not using any of those in loop control subexprs
(ForSubExprChecker). All that is only done when we have a "collapse"
clause.
Range-for loops can also cause crashes at present without this patch, so
are handled too.
show more ...
|
#
de5ea2d1 |
| 18-Aug-2024 |
Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com> |
[clang][OpenMP] Change /* ParamName */ to /*ParamName=*/, NFC
Change foo(/* Index */ 0); to foo(/*Index=*/0);
There was a mix of these two formats in the source. Clang-format treats the latter
[clang][OpenMP] Change /* ParamName */ to /*ParamName=*/, NFC
Change foo(/* Index */ 0); to foo(/*Index=*/0);
There was a mix of these two formats in the source. Clang-format treats the latter one a bit better, so use that one consistently.
show more ...
|
#
e05307f6 |
| 18-Aug-2024 |
Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com> |
[clang][OpenMP] Avoid multiple calls to getCurrentDirective in DSAChecker, NFC
|
#
1c269929 |
| 10-Aug-2024 |
Shilei Tian <i@tianshilei.me> |
[Clang][Sema][OpenMP] Allow `thread_limit` to accept multiple expressions (#102715)
|
#
55ea3600 |
| 06-Aug-2024 |
Krystian Stasiowski <sdkrystian@gmail.com> |
[Clang][Sema] Make UnresolvedLookupExprs in class scope explicit specializations instantiation dependent (#100392)
A class member named by an expression in a member function that may instantiate to
[Clang][Sema] Make UnresolvedLookupExprs in class scope explicit specializations instantiation dependent (#100392)
A class member named by an expression in a member function that may instantiate to a static _or_ non-static member is represented by a `UnresolvedLookupExpr` in order to defer the implicit transformation to a class member access expression until instantiation. Since `ASTContext::getDecltypeType` only creates a `DecltypeType` that has a `DependentDecltypeType` as its canonical type when the operand is instantiation dependent, and since we do not transform types unless they are instantiation dependent, we need to mark the `UnresolvedLookupExpr` as instantiation dependent in order to correctly build a `DecltypeType` using the expression as its operand with a `DependentDecltypeType` canonical type. Fixes #99873.
show more ...
|
#
cee594cf |
| 06-Aug-2024 |
Shilei Tian <i@tianshilei.me> |
[Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (#99732)
By the OpenMP standard, `num_teams` clause can only accept one
expression (for now). In this patch, we extend it to a
[Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (#99732)
By the OpenMP standard, `num_teams` clause can only accept one
expression (for now). In this patch, we extend it to allow to accept
multiple expressions when it is used with `target teams ompx_bare`
construct. This will allow to launch a multi-dim grid, same as CUDA/HIP.
show more ...
|
#
a42e515e |
| 05-Aug-2024 |
Julian Brown <julian.brown@amd.com> |
[OpenMP] OpenMP 5.1 "assume" directive parsing support (#92731)
This is a minimal patch to support parsing for "omp assume" directives.
These are meant to be hints to a compiler's optimisers: as su
[OpenMP] OpenMP 5.1 "assume" directive parsing support (#92731)
This is a minimal patch to support parsing for "omp assume" directives.
These are meant to be hints to a compiler's optimisers: as such, it is
legitimate (if not very useful) to ignore them. The patch builds on top
of the existing support for "omp assumes" directives (note spelling!).
Unlike the "omp [begin/end] assumes" directives, "omp assume" is
associated with a compound statement, i.e. it can appear within a
function. The "holds" assumption could (theoretically) be mapped onto
the existing builtin "__builtin_assume", though the latter applies to a
single point in the program, and the former to a range (i.e. the whole
of the associated compound statement).
This patch fixes sollve's OpenMP 5.1 "omp assume"-based tests.
show more ...
|
Revision tags: llvmorg-19.1.0-rc2 |
|
#
1fa7f05b |
| 05-Aug-2024 |
Kazu Hirata <kazu@google.com> |
[clang] Construct SmallVector with ArrayRef (NFC) (#101898)
|