SuccessChanges

Summary

  1. [mlir] Clarify docs around LLVM dialect-compatible types (details)
  2. [clang] Check for nullptr when instantiating late attrs (details)
  3. [flang][driver] Add support for fixed form detection (details)
  4. [DebugInfo][dexter] Tweak dexter test for merged values (details)
  5. [OpenMP] libomp: cleanup parsing of OMP_ALLOCATOR env variable. (details)
  6. [flang][driver] Add standard macro predefinitions for compiler version (details)
  7. [llvm/Orc] Fix ExecutionEngine module build breakage (details)
  8. [ThinLTO] Also prune Thin-* files from the ThinLTO cache (details)
  9. [mlir][Affine] Revisit and simplify composeAffineMapAndOperands. (details)
  10. AArch64: add apple-a14 as a CPU (details)
  11. [mlir][spirv] Define spv.GLSL.Fma and add lowerings (details)
  12. [lldb] Fix two documentation typos (details)
  13. [X86] Regenerate fmin/fmax reduction tests (details)
  14. [Flang][OpenMP] Add semantic checks for OpenMP Workshare Construct (details)
Commit 9a60ad216d2fa2e9701849922bfb0db9917f9c93 by zinenko
[mlir] Clarify docs around LLVM dialect-compatible types

Explicitly mention that there is exactly one MLIR type that corresponds
to a given LLVM IR type.
The file was modifiedmlir/docs/Dialects/LLVM.md
Commit a6f9077b16da90204b296acd4f840769e83460ac by adamcz
[clang] Check for nullptr when instantiating late attrs

This was already done in SemaTemplateInstantiateDecl.cpp, but not in
SemaTemplateInstantiate.cpp.

Anecdotally I've seen some clangd crashes where coredumps point to this
being a problem, but I cannot reproduce this so far.

Differential Revision: https://reviews.llvm.org/D94933
The file was modifiedclang/lib/Sema/SemaTemplateInstantiate.cpp
Commit 443d6957ca712aacdfd72c3408a8837580f6a286 by andrzej.warzynski
[flang][driver] Add support for fixed form detection

Currently the new flang driver always runs in free form mode. This patch
adds support for fixed form mode detection based on the file extensions.

Like `f18`, `flang-new` will treat files ending with ".f", ".F" and
".ff" as fixed form. Additionally, ".for", ".FOR", ".fpp" and ".FPP"
file extensions are recognised as fixed form files. This is consistent
with gfortran [1]. In summary, files with the following extensions are
treated as fixed-form:
  * ".f", ".F", ".ff", ".for", ".FOR", ".fpp", ".FPP"

For consistency with flang/test/lit.cfg.py and f18, this patch also adds
support for the following file extensions:
  * ".ff", ".FOR", ".for", ".ff90", ".fpp", ".FPP"
This is added in flang/lib/Frontend/FrontendOptions.cpp. Additionally,
the following extensions are included:
  * ".f03", ".F03", ".f08", ".F08"
This is for compatibility with gfortran [1] and other popular Fortran
compilers [2].

NOTE: internally Flang will only differentiate between fixed and free
form files. Currently Flang does not support switching between language
standards, so in this regard file extensions are irrelevant. More
specifically, both `file.f03` and `file.f18` are represented with
`Language::Fortran` (as opposed to e.g. `Language::Fortran03`).

Summary of changes:
- Set Fortran::parser::Options::sFixedForm according to the file type
- Add isFixedFormSuffix and isFreeFormSuffix helper functions to
  FrontendTool/Utils.h
- Change FrontendOptions::GetInputKindForExtension to support the missing
  file extensions that f18 supports and some additional ones
- FrontendActionTest.cpp is updated to make sure that the test input is
  treated as free-form

[1] https://gcc.gnu.org/onlinedocs/gfortran/GNU-Fortran-and-GCC.html
[2] https://github.com/llvm/llvm-project/blob/master/flang/docs/OptionComparison.md#notes

Differential Revision: https://reviews.llvm.org/D94228
The file was addedflang/test/Flang-Driver/fixed-free-detection.f90
The file was modifiedflang/include/flang/FrontendTool/Utils.h
The file was modifiedflang/lib/Frontend/FrontendAction.cpp
The file was modifiedflang/lib/Frontend/FrontendOptions.cpp
The file was addedflang/test/Flang-Driver/Inputs/fixed-form-test.f
The file was addedflang/test/Flang-Driver/Inputs/free-form-test.f90
The file was modifiedflang/unittests/Frontend/FrontendActionTest.cpp
The file was modifiedflang/test/lit.cfg.py
The file was modifiedflang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
Commit d77a57208770470d546194ad81bd01ae5d94df0d by orlando.hyams
[DebugInfo][dexter] Tweak dexter test for merged values

Tweak dexter-tests/memvars/inline-escaping-function.c added in D94761
(b7e516202eb6) by adding a 'param' use after the merge point. The test XFAILS
with and without this change, but without it the test looks very similar to
memvars/unused-merged-value.c. The test now demonstrates the problem more
clearly.
The file was modifieddebuginfo-tests/dexter-tests/memvars/inline-escaping-function.c
Commit a60bc55c693609e9417419b72754b9984f52acbe by Andrey.Churbanov
[OpenMP] libomp: cleanup parsing of OMP_ALLOCATOR env variable.

Differential Revision: https://reviews.llvm.org/D94932
The file was modifiedopenmp/runtime/src/kmp_settings.cpp
The file was addedopenmp/runtime/test/env/omp_alloc_env_invalid.c
Commit 197d9a55f105391f34a0657e6c1d5ef3166dad7d by andrzej.warzynski
[flang][driver] Add standard macro predefinitions for compiler version

Add the following standard predefinitions that f18 supports:
  * `__flang__`,
  * `__flang_major__`,
  * `__flang_minor__`,
  * `__flang_patchlevel__`

Summary of changes:
- Populate Fortran::parser::Options#predefinitions with the default
  supported predefinitions

Differential Revision: https://reviews.llvm.org/D94516
The file was modifiedflang/lib/Frontend/CompilerInvocation.cpp
The file was addedflang/test/Flang-Driver/predefined-macros-compiler-version.f90
Commit 1d37db6ef53db453534b9edfcc6a58c4f4f5c914 by medismail.bennani
[llvm/Orc] Fix ExecutionEngine module build breakage

This patch updates the llvm module map to reflect changes made in
`24672ddea3c97fd1eca3e905b23c0116d7759ab8` and fixes the module builds
(`-DLLVM_ENABLE_MODULES=On`).

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedllvm/include/llvm/module.modulemap
Commit ec877106a38b760229a2d676b7d2278b2bade8ab by hans
[ThinLTO] Also prune Thin-* files from the ThinLTO cache

Such files (Thin-%%%%%%.tmp.o) are supposed to be deleted immediately
after they're used (either by renaming or deletion). However, we've seen
instances on Windows where this doesn't happen, probably due to the
filesystem being flaky. This is effectively a resource leak which has
prevented us from using the ThinLTO cache on Windows.

Since those temporary files are in the thinlto cache directory which we
prune periodically anyway, allowing them to be pruned too seems like a
tidy way to solve the problem.

Differential revision: https://reviews.llvm.org/D94962
The file was modifiedllvm/lib/Support/CachePruning.cpp
The file was modifiedlld/test/COFF/lto-cache.ll
Commit 93a873dfc9ee7e8b4386dea87e43c5f238eeef06 by nicolas.vasilache
[mlir][Affine] Revisit and simplify composeAffineMapAndOperands.

In prehistorical times, AffineApplyOp was allowed to produce multiple values.
This allowed the creation of intricate SSA use-def chains.
AffineApplyNormalizer was originally introduced as a means of reusing the AffineMap::compose method to write SSA use-def chains.
Unfortunately, symbols that were produced by an AffineApplyOp needed to be promoted to dims and reordered for the mathematical composition to be valid.

Since then, single result AffineApplyOp became the law of the land but the original assumptions were not revisited.

This revision revisits these assumptions and retires AffineApplyNormalizer.

Differential Revision: https://reviews.llvm.org/D94920
The file was modifiedmlir/lib/IR/AffineExpr.cpp
The file was modifiedmlir/include/mlir/IR/AffineMap.h
The file was modifiedmlir/test/Dialect/Affine/canonicalize.mlir
The file was modifiedmlir/test/lib/Dialect/Affine/TestVectorizationUtils.cpp
The file was modifiedmlir/test/Dialect/Affine/affine-data-copy.mlir
The file was modifiedmlir/lib/Dialect/Affine/IR/AffineValueMap.cpp
The file was modifiedmlir/include/mlir/Dialect/Affine/IR/AffineOps.h
The file was modifiedmlir/include/mlir/IR/AffineExpr.h
The file was modifiedmlir/lib/IR/AffineMap.cpp
The file was modifiedmlir/test/Dialect/Linalg/reshape_fusion.mlir
The file was modifiedmlir/lib/Dialect/Affine/IR/AffineOps.cpp
The file was removedmlir/test/Dialect/Affine/SuperVectorize/normalize_maps.mlir
The file was modifiedmlir/test/EDSC/builder-api-test.cpp
Commit 6259fbd8b69531133d24b5367a6a2cd9b183ce48 by Tim Northover
AArch64: add apple-a14 as a CPU

This CPU supports all v8.5a features except BTI, and so identifies as v8.5a to
Clang. A bit weird, but the best way for things like xnu to detect the new
features it cares about.
The file was modifiedllvm/include/llvm/Support/AArch64TargetParser.def
The file was modifiedllvm/lib/Target/AArch64/AArch64Subtarget.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64Subtarget.h
The file was modifiedllvm/unittests/Support/TargetParserTest.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64.td
Commit 3a56a96664de955888d63c49a33808e3a1a294d9 by antiagainst
[mlir][spirv] Define spv.GLSL.Fma and add lowerings

Also changes some rewriter.create + rewriter.replaceOp calls
into rewriter.replaceOpWithNewOp calls.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D94965
The file was modifiedmlir/test/Conversion/VectorToSPIRV/simple.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/IR/SPIRVGLSLOps.td
The file was modifiedmlir/test/Dialect/SPIRV/IR/glsl-ops.mlir
The file was modifiedmlir/test/Target/SPIRV/glsl-ops.mlir
The file was modifiedmlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp
Commit 626681b09a3e87cfeda54a3cd00f7b0ed9df3bcc by Raphael Isemann
[lldb] Fix two documentation typos
The file was modifiedlldb/include/lldb/lldb-enumerations.h
The file was modifiedlldb/bindings/interface/SBListener.i
Commit 2988f940d861f0fa76bc5b749772f2b9239d5a1b by llvm-dev
[X86] Regenerate fmin/fmax reduction tests

Add missing check-prefixes + v1f32 tests
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-fmax-nnan.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-fmin-nnan.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-fmax.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-fmin.ll
Commit c42f5ca3d84c7b0d4e735ab3794718c429369309 by praveen
[Flang][OpenMP] Add semantic checks for OpenMP Workshare Construct

Add Semantic checks for OpenMP 4.5 - 2.7.4 Workshare Construct.

- The structured block in a workshare construct may consist of only
   scalar or array assignments, forall or where statements,
   forall, where, atomic, critical or parallel constructs.

- All array assignments, scalar assignments, and masked array
   assignments must be intrinsic assignments.

- The construct must not contain any user defined function calls unless
   the function is ELEMENTAL.

Test cases : omp-workshare03.f90, omp-workshare04.f90, omp-workshare05.f90

Resolve test cases (omp-workshare01.f90 and omp-workshare02.f90) marked as XFAIL

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D93091
The file was modifiedflang/lib/Semantics/check-omp-structure.cpp
The file was addedflang/test/Semantics/omp-workshare05.f90
The file was modifiedflang/test/Semantics/omp-workshare01.f90
The file was modifiedflang/lib/Semantics/check-omp-structure.h
The file was addedflang/test/Semantics/omp-workshare04.f90
The file was addedflang/test/Semantics/omp-workshare03.f90
The file was modifiedflang/test/Semantics/omp-workshare02.f90