Changes

Summary

  1. [flang] Cope with errors with array constructors (details)
  2. [flang][driver] Add missing `! REQUIRES` LIT directive (details)
  3. [flang] Fold MAXVAL & MINVAL (details)
  4. [scudo] Ensure proper allocator alignment in TSD test (details)
  5. [flang] Use a "double-double" accumulator in SUM (details)
  6. Move the definition of LLVM_SUPPORT_XCODE_SIGNPOSTS into llvm-config.h (details)
  7. Use `-cfg-func-name` value as filter for `-view-cfg`, etc. (details)
  8. [flang] Implement runtime for IALL & IANY (details)
  9. [gn build] (manually) port f9aba9a5afe (details)
  10. [mlir] Make Type::print and Type::dump const (details)
  11. [RISCV][test] Add new tests of SH*ADD in the zba extension (details)
Commit ec3049c79beb5ea24921dd5e4f011cf8ade1e9bd by pklausler
[flang] Cope with errors with array constructors

When a program attempts to put something like a subprogram
into an array constructor, emit an error rather than crashing.

Differential Revision: https://reviews.llvm.org/D104336
The file was modifiedflang/lib/Semantics/expression.cpp
The file was modifiedflang/test/Semantics/array-constr-values.f90
Commit 46446e398b5202303280d9e18676c07529f1d0b0 by andrzej.warzynski
[flang][driver] Add missing `! REQUIRES` LIT directive

The test added in https://reviews.llvm.org/D104305 will only work with
the new driver and should be marked as such.

Sending this without a review as it's fairly straightforward and fixes
test failures for developers that don't want to build the new driver.
The file was modifiedflang/test/Driver/dump-all.f90
Commit 47f18af55fd59e813144cc76711806d57a160e50 by pklausler
[flang] Fold MAXVAL & MINVAL

Implement constant folding for the reduction transformational
intrinsic functions MAXVAL and MINVAL.

In anticipation of more folding work to follow, with (I hope)
some common infrastructure, these two have been implemented in a
new header file.

Differential Revision: https://reviews.llvm.org/D104337
The file was modifiedflang/include/flang/Evaluate/shape.h
The file was addedflang/lib/Evaluate/fold-reduction.h
The file was modifiedflang/lib/Evaluate/tools.cpp
The file was modifiedflang/runtime/reduction.cpp
The file was modifiedflang/lib/Evaluate/fold-implementation.h
The file was addedflang/test/Evaluate/folding20.f90
The file was modifiedflang/lib/Evaluate/fold-real.cpp
The file was modifiedflang/lib/Evaluate/fold-integer.cpp
The file was modifiedflang/lib/Evaluate/fold-character.cpp
The file was modifiedflang/include/flang/Evaluate/call.h
The file was modifiedflang/include/flang/Evaluate/integer.h
The file was modifiedflang/include/flang/Evaluate/tools.h
The file was modifiedflang/lib/Evaluate/shape.cpp
Commit 8b062b61606270950645d73b68036c9ab2c7c4bc by kostyak
[scudo] Ensure proper allocator alignment in TSD test

The `MockAllocator` used in `ScudoTSDTest` wasn't allocated
properly aligned, which resulted in the `TSDs` of the shared
registry not being aligned either. This lead to some failures
like: https://reviews.llvm.org/D103119#2822008

This changes how the `MockAllocator` is allocated, same as
Vitaly did in the combined tests, properly aligning it, which
results in the `TSDs` being aligned as well.

Add a `DCHECK` in the shared registry to check that it is.

Differential Revision: https://reviews.llvm.org/D104402
The file was modifiedcompiler-rt/lib/scudo/standalone/quarantine.h
The file was modifiedcompiler-rt/lib/scudo/standalone/primary32.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/tsd_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/tsd.h
The file was modifiedcompiler-rt/lib/scudo/standalone/primary64.h
Commit c375ec86132984bc3915323fbe3f8c71f4d5503f by pklausler
[flang] Use a "double-double" accumulator in SUM

Use a "double-double" accumulator, a/k/a Kahan summation,
in the SUM intrinsic in the runtime for real & complex.
This seems to be the best-recommended technique for reducing
error, as opposed to the initial implementation of SUM's
distinct accumulators for positive and negative items.

Differential Revision: https://reviews.llvm.org/D104338
The file was modifiedflang/runtime/sum.cpp
Commit f9aba9a5afe09788eceb9879aa5c3ad345e0f1e9 by Adrian Prantl
Move the definition of LLVM_SUPPORT_XCODE_SIGNPOSTS into llvm-config.h

since it is now used by a public header file (Signposts.h).
This fixes the standalone LLDB build.
The file was modifiedllvm/include/llvm/Config/config.h.cmake
The file was modifiedllvm/include/llvm/Config/llvm-config.h.cmake
The file was modifiedllvm/include/llvm/Support/Signposts.h
The file was modifiedllvm/lib/Support/Signposts.cpp
The file was modifiedlldb/include/lldb/Utility/Timer.h
Commit 053dbb939d4a4be5cc7e156441ecedef599a4a6f by joachim
Use `-cfg-func-name` value as filter for `-view-cfg`, etc.

Currently the value is only used when calling `F->viewCFG()` which is missing out on its potential and usefulness.
So I added the check to the printer passes as well.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D102011
The file was modifiedllvm/lib/Analysis/CFGPrinter.cpp
The file was modifiedllvm/docs/Passes.rst
The file was addedllvm/test/Other/cfg-printer-filter.ll
Commit fdf33771feeb23ecab25b61d37f5ad575a641a10 by pklausler
[flang] Implement runtime for IALL & IANY

We had IPARITY (xor-reduction) but I missed IALL (and)
and IANY (or).

Differential Revision: https://reviews.llvm.org/D104339
The file was modifiedflang/unittests/RuntimeGTest/Reduction.cpp
The file was modifiedflang/runtime/reduction.cpp
The file was modifiedflang/runtime/reduction.h
Commit a127dffc49e5031b7780b3c747e8970a6f2ce0ee by thakis
[gn build] (manually) port f9aba9a5afe
The file was modifiedllvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
Commit 7cfb7a67c57dfb40518a0873137a21b0a8def503 by i
[mlir] Make Type::print and Type::dump const
The file was modifiedmlir/include/mlir/IR/Types.h
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
Commit 07990571812df2a702daa2d7cbcd7c3f4e09cdda by powerman1st
[RISCV][test] Add new tests of SH*ADD in the zba extension

These tests will show the following optimization by future patches.

Rx + Ry * 6  => (SH1ADD (SH2ADD Rx, Ry), Ry)
Rx + Ry * 10 => (SH1ADD (SH3ADD Rx, Ry), Ry)
Rx + Ry * 12 => (SH2ADD (SH3ADD Rx, Ry), Ry)

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D104210
The file was modifiedllvm/test/CodeGen/RISCV/rv32zba.ll
The file was modifiedllvm/test/CodeGen/RISCV/rv64zba.ll