Changes

Summary

  1. [flang] Disallow INTENT attribute on procedure dummy arguments (details)
  2. [TargetLowering] Don't speculatively call ComputeNumSignBits. NFC (details)
  3. [flang][driver] Copy test file into a temp dir when testing (nfc) (details)
  4. [clangd] Update CC Ranking model with better sampling. (details)
  5. [OpenCL][Docs] Fixed cross-section reference in OpenCLSupport (details)
  6. [DebugInfo][CodeView] Change in line tables only mode to emit type information (details)
  7. [ARM] Constant tripcount tail predication loop tests. NFC (details)
  8. [ARM] Tail predication with constant loop bounds (details)
  9. [MIPatternMatch] Add m_OneNonDBGUse (details)
  10. [mlir] Add Complex dialect. (details)
  11. [RISCV] Add implementation of targetShrinkDemandedConstant to optimize AND immediates. (details)
Commit 1e1a011b09d0e6e9ff62b37721906485c386708c by psteinfeld
[flang] Disallow INTENT attribute on procedure dummy arguments

C843 states that "An entity with the INTENT attribute shall be a dummy
data object or a dummy procedure pointer."  This change enforces that
and fixes some tests that erroneously violated this rule.

Differential Revision: https://reviews.llvm.org/D94781
The file was modifiedflang/test/Semantics/assign03.f90
The file was modifiedflang/test/Semantics/separate-mp02.f90
The file was modifiedflang/lib/Semantics/check-declarations.cpp
The file was modifiedflang/test/Semantics/call09.f90
Commit 4c5066b0789d9c38d6362a684346b68261911d29 by craig.topper
[TargetLowering] Don't speculatively call ComputeNumSignBits. NFC

These methods are recursive so a little costly.

We only look at the result in one place in this function and it's
conditional. We also only need the second call if the first had
enough returned enough sign bits.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Commit b6e06a740c26b2b9d91455ad49a5009335089242 by andrzej.warzynski
[flang][driver] Copy test file into a temp dir when testing (nfc)

The following driver invocation will generate an output file
in the same directory as the input file:

```
flang-new -fc1 -test-io test-input.f90
```

This is the desired behaviour. However, when testing we need to make
sure that we don't pollute the source directory. To this end, copy the
input file into a temporary directory before testing.

This is similar to https://reviews.llvm.org/D94243.
The file was modifiedflang/test/Frontend/input-output-file.f90
Commit d5047d762f391c94939d67fc84cae25b24125694 by usx
[clangd] Update CC Ranking model with better sampling.

A better sampling strategy was used to generate the dataset for this
model.
New signals introduced in this model:
- NumNameInContext: Number of words in the context that matches the name
of the candidate.
- FractionNameInContext: Fraction of the words in context matching the
name of the candidate.

We remove the signal `IsForbidden` from the model and down rank
forbidden signals aggresively.

Differential Revision: https://reviews.llvm.org/D94697
The file was modifiedclang-tools-extra/clangd/quality/model/features.json
The file was modifiedclang-tools-extra/clangd/Quality.cpp
The file was modifiedclang-tools-extra/clangd/quality/model/forest.json
Commit bc84f89c71ab62d510973f64f022bee31e53af96 by anastasia.stulova
[OpenCL][Docs] Fixed cross-section reference in OpenCLSupport

Tags: #clang
The file was modifiedclang/docs/OpenCLSupport.rst
Commit 6227069bdce6b0c3c22f0a0c8f1aef705985125a by akhuang
[DebugInfo][CodeView] Change in line tables only mode to emit type information
for function scopes, rather than using the qualified name.

In line-tables-only mode, we used to emit qualified names as the display name for functions when using CodeView.
This patch changes to emitting the parent scopes instead, with forward declarations for class types.
The total object file size ends up being slightly smaller than if we use the full qualified names.

Differential Revision: https://reviews.llvm.org/D94639
The file was modifiedclang/test/CodeGenCXX/debug-info-codeview-display-name.cpp
The file was addedclang/test/CodeGenCXX/debug-info-codeview-scopes.cpp
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
Commit a0770f9e4e923292066dd095cf01a28671e40ad6 by david.green
[ARM] Constant tripcount tail predication loop tests. NFC
The file was addedllvm/test/CodeGen/Thumb2/LowOverheadLoops/constbound.ll
Commit f5abf0bd485a1fa7e332f5f8266c25755d385a8a by david.green
[ARM] Tail predication with constant loop bounds

The TripCount for a predicated vector loop body will be
ceil(ElementCount/Width). This alters the conversion of an
active.lane.mask to a VCPT intrinsics to match.

Differential Revision: https://reviews.llvm.org/D94608
The file was modifiedllvm/lib/Target/ARM/MVETailPredication.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/constbound.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/tp-multiple-vpst.ll
Commit cc90d41945f6c72d92fbbc6e7b38ceff6e7e1e93 by Jessica Paquette
[MIPatternMatch] Add m_OneNonDBGUse

Add a matcher that checks if the given subpattern has only one non-debug use.

Also improve existing m_OneUse testcase.

Differential Revision: https://reviews.llvm.org/D94705
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
The file was modifiedllvm/unittests/CodeGen/GlobalISel/PatternMatchTest.cpp
Commit d0cb0d30a431578ecedb98c57780154789f3c594 by pifon
[mlir] Add Complex dialect.

Differential Revision: https://reviews.llvm.org/D94764
The file was addedmlir/include/mlir/Dialect/Complex/IR/ComplexBase.td
The file was addedmlir/include/mlir/Dialect/Complex/IR/ComplexOps.td
The file was addedmlir/test/Dialect/Complex/ops.mlir
The file was modifiedmlir/include/mlir/Conversion/Passes.h
The file was modifiedmlir/include/mlir/Dialect/CMakeLists.txt
The file was modifiedmlir/include/mlir/InitAllDialects.h
The file was addedmlir/test/Conversion/ComplexToLLVM/convert-to-llvm.mlir
The file was addedmlir/lib/Dialect/Complex/IR/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/CMakeLists.txt
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was addedmlir/include/mlir/Conversion/ComplexToLLVM/ComplexToLLVM.h
The file was addedmlir/include/mlir/Dialect/Complex/IR/Complex.h
The file was addedmlir/lib/Conversion/ComplexToLLVM/CMakeLists.txt
The file was addedmlir/lib/Dialect/Complex/IR/ComplexDialect.cpp
The file was modifiedmlir/lib/Conversion/PassDetail.h
The file was modifiedmlir/test/mlir-opt/commandline.mlir
The file was addedmlir/lib/Dialect/Complex/CMakeLists.txt
The file was addedmlir/include/mlir/Dialect/Complex/IR/CMakeLists.txt
The file was addedmlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was addedmlir/lib/Dialect/Complex/IR/ComplexOps.cpp
The file was addedmlir/include/mlir/Dialect/Complex/CMakeLists.txt
Commit 86e604c4d68528478333a8901d7c79c09ca16fa8 by craig.topper
[RISCV] Add implementation of targetShrinkDemandedConstant to optimize AND immediates.

SimplifyDemandedBits can remove set bits from immediates from instructions
like AND/OR/XOR. This can prevent them from being efficiently
codegened on RISCV.

This adds an initial version that tries to keep or form 12 bit
sign extended immediates for AND operations to enable use of ANDI.
If that doesn't work we'll try to create a 32 bit sign extended immediate
to use LUI+ADDIW.

More optimizations are possible for different size immediates or
different operations. But this is a good starting point that already
has test coverage.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D94628
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rv64Zbp.ll
The file was modifiedllvm/test/CodeGen/RISCV/srem-lkk.ll
The file was modifiedllvm/test/CodeGen/RISCV/vararg.ll
The file was modifiedllvm/test/CodeGen/RISCV/srem-vector-lkk.ll
The file was modifiedllvm/test/CodeGen/RISCV/half-bitmanip-dagcombines.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/test/CodeGen/RISCV/stack-realignment-with-variable-sized-objects.ll
The file was modifiedllvm/test/CodeGen/RISCV/copysign-casts.ll
The file was modifiedllvm/test/CodeGen/RISCV/frame-info.ll