Changes

Summary

  1. Thread safety analysis: Warn when demoting locks on back edges (details)
  2. Revert "OpenMP 5.0 metadirective" (details)
  3. [mlir-c] Add getting fused loc (details)
  4. [lld/mac] Fix comment typo to cycle bots (details)
  5. [MLIR] Simplex: support adding new variables dynamically (details)
  6. [CodeGen] Use make_early_inc_range (NFC) (details)
  7. [MLIR] Simplex: rename num{Variables,Constraints} to getNum{Variables,Constraints} (details)
  8. [ARM] Prevent large integer VQDMULH pattern crashes (details)
  9. [Support] Attempt to fix deadlock in ThreadGroup (details)
  10. Check for invalid projects passed in LLVM_ENABLE_PROJECTS (details)
  11. Precommit tests for D109807 "[InstCombine] Narrow type of logical operation chains when possible" (details)
  12. OpenMP 5.0 metadirective (details)
  13. [Tests] Fix incorrect noalias metadata (details)
  14. [Tests] Fix noalias metadata in one more test (details)
  15. [X86] Improve i8 all-ones element insertion in pre-SSE4.1 (details)
Commit 9b889f826ff587e9758c80823419512d502e457d by aaron.puchert
Thread safety analysis: Warn when demoting locks on back edges

Previously in D104261 we warned about dropping locks from back edges,
this is the corresponding change for exclusive/shared joins. If we're
entering the loop with an exclusive change, which is then relaxed to a
shared lock before we loop back, we have already analyzed the loop body
with the stronger exclusive lock and thus might have false positives.

There is a minor non-observable change: we modify the exit lock set of a
function, but since that isn't used further it doesn't change anything.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D106713
The file was modifiedclang/test/SemaCXX/warn-thread-safety-analysis.cpp (diff)
The file was modifiedclang/lib/Analysis/ThreadSafety.cpp (diff)
Commit 31cca215654ac5eca01796248696b8d710a5cffc by thakis
Revert "OpenMP 5.0 metadirective"

This reverts commit c7d7b98e5263472f05b2f3cb767b5d16e1349e9a.
Breaks tests on macOS, see comment on https://reviews.llvm.org/D91944
The file was modifiedclang/include/clang/AST/StmtOpenMP.h (diff)
The file was modifiedclang/lib/Serialization/ASTWriterStmt.cpp (diff)
The file was removedclang/test/OpenMP/metadirective_messages.cpp
The file was removedclang/test/OpenMP/metadirective_implementation_codegen.cpp
The file was removedclang/test/OpenMP/metadirective_device_kind_codegen.cpp
The file was modifiedclang/include/clang-c/Index.h (diff)
The file was modifiedclang/lib/AST/StmtOpenMP.cpp (diff)
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td (diff)
The file was modifiedclang/tools/libclang/CXCursor.cpp (diff)
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp (diff)
The file was modifiedclang/include/clang/Basic/DiagnosticParseKinds.td (diff)
The file was removedclang/test/OpenMP/metadirective_ast_print.c
The file was modifiedclang/lib/AST/StmtPrinter.cpp (diff)
The file was modifiedclang/lib/Basic/OpenMPKinds.cpp (diff)
The file was modifiedclang/lib/CodeGen/CGStmt.cpp (diff)
The file was removedclang/test/OpenMP/metadirective_device_kind_codegen.c
The file was modifiedclang/tools/libclang/CIndex.cpp (diff)
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp (diff)
The file was modifiedclang/lib/AST/OpenMPClause.cpp (diff)
The file was modifiedclang/lib/CodeGen/CodeGenFunction.h (diff)
The file was modifiedclang/lib/Sema/TreeTransform.h (diff)
The file was removedclang/test/OpenMP/metadirective_empty.cpp
The file was modifiedflang/lib/Semantics/check-omp-structure.cpp (diff)
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp (diff)
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMP.td (diff)
The file was modifiedclang/include/clang/Basic/StmtNodes.td (diff)
The file was modifiedclang/include/clang/AST/RecursiveASTVisitor.h (diff)
The file was removedclang/test/OpenMP/metadirective_implementation_codegen.c
The file was modifiedclang/include/clang/Sema/Sema.h (diff)
The file was modifiedclang/lib/Parse/ParseOpenMP.cpp (diff)
The file was modifiedclang/lib/Serialization/ASTReaderStmt.cpp (diff)
The file was modifiedclang/lib/Sema/SemaExceptionSpec.cpp (diff)
The file was modifiedclang/lib/AST/StmtProfile.cpp (diff)
The file was modifiedclang/include/clang/Serialization/ASTBitCodes.h (diff)
The file was modifiedclang/lib/StaticAnalyzer/Core/ExprEngine.cpp (diff)
Commit 0a1e569d37e04c75632633d77c7d3f0fb5126b46 by jpienaar
[mlir-c] Add getting fused loc

For creating a fused loc using array of locations and metadata.

Differential Revision: https://reviews.llvm.org/D110022
The file was modifiedmlir/include/mlir-c/IR.h (diff)
The file was modifiedmlir/lib/CAPI/IR/IR.cpp (diff)
The file was modifiedmlir/test/CAPI/ir.c (diff)
Commit 1b2c36aa5fa07a2d64ddda745a138d5eacd5a06c by thakis
[lld/mac] Fix comment typo to cycle bots
The file was modifiedlld/MachO/ConcatOutputSection.cpp (diff)
Commit 2b44a7325c56cdd78bbcfab7ff7a00126aa5c822 by arjunpitchanathan
[MLIR] Simplex: support adding new variables dynamically

Reviewed By: Groverkss

Differential Revision: https://reviews.llvm.org/D109962
The file was modifiedmlir/include/mlir/Analysis/Presburger/Simplex.h (diff)
The file was modifiedmlir/lib/Analysis/Presburger/Simplex.cpp (diff)
The file was modifiedmlir/unittests/Analysis/Presburger/SimplexTest.cpp (diff)
Commit 48719e3b1861a9b8216dc3aa4dce1b05389f0aff by kazu
[CodeGen] Use make_early_inc_range (NFC)
The file was modifiedllvm/lib/CodeGen/GlobalISel/Localizer.cpp (diff)
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp (diff)
The file was modifiedllvm/lib/CodeGen/StackProtector.cpp (diff)
The file was modifiedllvm/lib/CodeGen/BranchFolding.cpp (diff)
Commit 33afea548892b2e7f0f7636ab17367da59f42c4a by arjunpitchanathan
[MLIR] Simplex: rename num{Variables,Constraints} to getNum{Variables,Constraints}

As per the LLVM Coding Standards, function names should be verb phrases.
The file was modifiedmlir/lib/Analysis/Presburger/Simplex.cpp (diff)
The file was modifiedmlir/lib/Analysis/PresburgerSet.cpp (diff)
The file was modifiedmlir/unittests/Analysis/Presburger/SimplexTest.cpp (diff)
The file was modifiedmlir/include/mlir/Analysis/Presburger/Simplex.h (diff)
Commit cb5e3f79592416cc5c1413655eddc641b1dae920 by david.green
[ARM] Prevent large integer VQDMULH pattern crashes

Put a limit on the size of constant integers we test when looking for
VQDMULH, to prevent it from crashing from values more than 64bits.
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vqdmulh.ll (diff)
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp (diff)
Commit 7b25fa8c7a151e94be46ed8f0a56bf4e2af1c104 by alexandre.ganea
[Support] Attempt to fix deadlock in ThreadGroup

This is an attempt to fix the situation described by https://reviews.llvm.org/D104207#2826290 and PR41508.
See sequence of operations leading to the bug in https://reviews.llvm.org/D104207#3004689

We ensure that the Latch is completely "free" before decrementing the number of TaskGroupInstances.

Differential revision: https://reviews.llvm.org/D109914
The file was modifiedllvm/include/llvm/Support/Parallel.h (diff)
The file was modifiedllvm/lib/Support/Parallel.cpp (diff)
Commit 713c768a6d0e385be0f14816494d146bd32ea731 by joker.eph
Check for invalid projects passed in LLVM_ENABLE_PROJECTS

This is catching misconfiguration. For example one of my automation
had a typo running `-DLLVM_ENABLE_PROJECTS=nlir` and it was just
silently ignored. Instead, an error will now be displayed.

Recommit 4121ac1e after fixing it to not fail on "all"

Differential Revision: https://reviews.llvm.org/D110016
The file was modifiedllvm/CMakeLists.txt (diff)
Commit d841c72e09c81a5892a52e3c3200af838f6a2a69 by mnadeem
Precommit tests for D109807 "[InstCombine] Narrow type of logical operation chains when possible"

Change-Id: Iae9bf18619e4926301a866c7e2bd38ced524804e
The file was modifiedllvm/test/Transforms/InstCombine/and-xor-or.ll (diff)
Commit 000875c127c7f2ae10a954bd592c1658e5912cf1 by cchen
OpenMP 5.0 metadirective

This patch supports OpenMP 5.0 metadirective features.
It is implemented keeping the OpenMP 5.1 features like dynamic user condition in mind.

A new function, getBestWhenMatchForContext, is defined in llvm/Frontend/OpenMP/OMPContext.h

Currently this function return the index of the when clause with the highest score from the ones applicable in the Context.
But this function is declared with an array which can be used in OpenMP 5.1 implementation to select all the valid when clauses which can be resolved in runtime. Currently this array is set to null by default and its implementation is left for future.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D91944
The file was modifiedclang/lib/CodeGen/CGStmt.cpp (diff)
The file was modifiedclang/include/clang/AST/RecursiveASTVisitor.h (diff)
The file was modifiedclang/lib/AST/StmtProfile.cpp (diff)
The file was addedclang/test/OpenMP/metadirective_device_kind_codegen.cpp
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp (diff)
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td (diff)
The file was modifiedclang/lib/AST/OpenMPClause.cpp (diff)
The file was modifiedclang/lib/AST/StmtOpenMP.cpp (diff)
The file was modifiedclang/tools/libclang/CXCursor.cpp (diff)
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp (diff)
The file was modifiedclang/lib/Serialization/ASTReaderStmt.cpp (diff)
The file was modifiedclang/include/clang/AST/StmtOpenMP.h (diff)
The file was modifiedclang/include/clang/Serialization/ASTBitCodes.h (diff)
The file was modifiedclang/include/clang/Basic/DiagnosticParseKinds.td (diff)
The file was modifiedclang/include/clang/Sema/Sema.h (diff)
The file was modifiedclang/include/clang/Basic/StmtNodes.td (diff)
The file was modifiedclang/lib/Sema/SemaExceptionSpec.cpp (diff)
The file was addedclang/test/OpenMP/metadirective_empty.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/ExprEngine.cpp (diff)
The file was modifiedclang/lib/CodeGen/CodeGenFunction.h (diff)
The file was modifiedclang/lib/Basic/OpenMPKinds.cpp (diff)
The file was modifiedclang/lib/Parse/ParseOpenMP.cpp (diff)
The file was modifiedclang/lib/Serialization/ASTWriterStmt.cpp (diff)
The file was addedclang/test/OpenMP/metadirective_implementation_codegen.cpp
The file was modifiedclang/tools/libclang/CIndex.cpp (diff)
The file was addedclang/test/OpenMP/metadirective_ast_print.c
The file was addedclang/test/OpenMP/metadirective_implementation_codegen.c
The file was addedclang/test/OpenMP/metadirective_device_kind_codegen.c
The file was addedclang/test/OpenMP/metadirective_messages.cpp
The file was modifiedclang/lib/Sema/TreeTransform.h (diff)
The file was modifiedclang/include/clang-c/Index.h (diff)
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMP.td (diff)
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp (diff)
The file was modifiedclang/lib/AST/StmtPrinter.cpp (diff)
The file was modifiedflang/lib/Semantics/check-omp-structure.cpp (diff)
Commit 80110aafa09aff9869cdb50ed718a169888da578 by nikita.ppv
[Tests] Fix incorrect noalias metadata

Mostly this fixes cases where !noalias or !alias.scope were passed
a scope rather than a scope list. In some cases I opted to drop
the metadata entirely instead, because it is not really relevant
to the test.
The file was modifiedllvm/test/Transforms/InferAddressSpaces/AMDGPU/mem-intrinsics.ll (diff)
The file was modifiedllvm/test/Analysis/CostModel/X86/free-intrinsics.ll (diff)
The file was modifiedllvm/test/Transforms/InstCombine/loadstore-metadata.ll (diff)
The file was modifiedllvm/test/Transforms/InstCombine/AMDGPU/memcpy-from-constant.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.atomic.inc.ll (diff)
The file was modifiedllvm/test/Transforms/RewriteStatepointsForGC/drop-invalid-metadata.ll (diff)
The file was modifiedllvm/test/Transforms/DeadStoreElimination/merge-stores.ll (diff)
The file was modifiedllvm/test/Transforms/LoopVectorize/pr25281.ll (diff)
The file was modifiedllvm/test/CodeGen/AArch64/vector_merge_dep_check.ll (diff)
The file was modifiedllvm/test/Analysis/CostModel/free-intrinsics-no_info.ll (diff)
The file was modifiedllvm/test/Transforms/LowerMatrixIntrinsics/remarks-shared-subtrees.ll (diff)
The file was modifiedllvm/test/Analysis/CostModel/free-intrinsics-datalayout.ll (diff)
The file was modifiedllvm/test/CodeGen/MIR/X86/memory-operands.mir (diff)
The file was modifiedllvm/test/Transforms/InstCombine/bitcast-store.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.atomic.inc.ll (diff)
Commit abe21da670f9bcadcb0af6f97a25e1faf9e0b133 by nikita.ppv
[Tests] Fix noalias metadata in one more test

Missed this one in 80110aafa09aff9869cdb50ed718a169888da578. This
is another test mixing up alias scopes and alias scope lists.
The file was modifiedllvm/test/Transforms/InstCombine/noalias-scope-decl.ll (diff)
Commit 6a2c2263fbca07a59b9f41181c1418df052e24d1 by lebedev.ri
[X86] Improve i8 all-ones element insertion in pre-SSE4.1

Should avoid some regressions in D109065

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D109989
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/X86/insertelement-ones.ll (diff)