SuccessChanges

Summary

  1. [MLIR,OpenMP] Lowering of parallel operation: proc_bind clause 2/n (details)
  2. [AST] Fix the CXXFoldExpr source range when parentheses range is invalid. (details)
  3. [libc][obvious] Switch copysign[f|l] and fabs[f|l] to the new test matchers. (details)
  4. [VE] Change to promote i32 AND/OR/XOR operations (details)
  5. [SVE][CodeGen] Fix issues with EXTRACT_SUBVECTOR when using scalable FP vectors (details)
  6. [SyntaxTree] Unbox operators into tokens for nodes generated from `CXXOperatorCallExpr` (details)
  7. [ARM][MVE] tail-predication: overflow checks for backedge taken count. (details)
  8. [llvm-dwarfdump] Avoid crashing if an abbreviation offset is invalid. (details)
  9. [SCEV] Look through single value PHIs. (details)
  10. [mlir] use intptr_t in C API (details)
  11. Add missing dependency on Doc generation for the OpenMP dialect (details)
Commit e6c5e6efd080ab80f133a6591a7e4f0b617c291f by kiran.chandramohan
[MLIR,OpenMP] Lowering of parallel operation: proc_bind clause 2/n

This patch adds the translation of the proc_bind clause in a
parallel operation.

The values that can be specified for the proc_bind clause are
specified in the OMP.td tablegen file in the llvm/Frontend/OpenMP
directory. From this single source of truth enumeration for
proc_bind is generated in llvm and mlir (used in specification of
the parallel Operation in the OpenMP dialect). A function to return
the enum value from the string representation is also generated.
A new header file (DirectiveEmitter.h) containing definitions of
classes directive, clause, clauseval etc is created so that it can
be used in mlir as well.

Reviewers: clementval, jdoerfert, DavidTruby

Differential Revision: https://reviews.llvm.org/D84347
The file was modifiedllvm/utils/TableGen/DirectiveEmitter.cpp
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMP.td
The file was modifiedllvm/test/TableGen/directive1.td
The file was modifiedmlir/tools/mlir-tblgen/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPConstants.h
The file was addedllvm/include/llvm/TableGen/DirectiveEmitter.h
The file was modifiedmlir/test/Target/openmp-llvm.mlir
The file was modifiedllvm/include/llvm/Frontend/Directive/DirectiveBase.td
The file was modifiedmlir/include/mlir/Dialect/OpenMP/CMakeLists.txt
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
The file was addedmlir/tools/mlir-tblgen/OpenMPCommonGen.cpp
Commit dc7b1e9db58152273d3232cca3fa95cef721796b by hokein.wu
[AST] Fix the CXXFoldExpr source range when parentheses range is invalid.

The CXXFoldExpr's range is invalid if the cxxfoldexpr is formed via the
Concept's TypeContraints (because the parentheses are not written in the
source code). We fallback to use the range from the pattern.

Differential Revision: https://reviews.llvm.org/D85645
The file was modifiedclang/test/AST/ast-dump-concepts.cpp
The file was modifiedclang/include/clang/AST/ExprCXX.h
Commit a87576592c6326275e4a7aff6a86d5113b5a9766 by sivachandra
[libc][obvious] Switch copysign[f|l] and fabs[f|l] to the new test matchers.
The file was modifiedlibc/test/src/math/fabs_test.cpp
The file was modifiedlibc/test/src/math/copysign_test.cpp
The file was modifiedlibc/test/src/math/copysignl_test.cpp
The file was modifiedlibc/test/src/math/fabsf_test.cpp
The file was modifiedlibc/test/src/math/copysignf_test.cpp
The file was modifiedlibc/test/src/math/fabsl_test.cpp
Commit 5d549219df1c5c9a619e33d7dca662cd2c44fcda by marukawa
[VE] Change to promote i32 AND/OR/XOR operations

VE has only 64 bits AND/OR/XOR instructions.  We pretended that VE has 32 bits
instructions also, but doing it increase the number of generated instructions.
Therefore, we decide to promote 32 bits operations and use only 64 bits
instructions in back end.  We also avoid pretending that VE has 32 bits LEA
instruction.  Update regression tests also.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D85726
The file was modifiedllvm/lib/Target/VE/VEISelLowering.cpp
The file was modifiedllvm/test/CodeGen/VE/or.ll
The file was modifiedllvm/test/CodeGen/VE/selectccf64c.ll
The file was modifiedllvm/test/CodeGen/VE/selectcci32c.ll
The file was modifiedllvm/test/CodeGen/VE/selectcci64c.ll
The file was modifiedllvm/test/CodeGen/VE/xor.ll
The file was modifiedllvm/test/CodeGen/VE/cttz.ll
The file was modifiedllvm/lib/Target/VE/VEInstrInfo.td
The file was modifiedllvm/test/CodeGen/VE/nnd.ll
The file was modifiedllvm/test/CodeGen/VE/selectccf32c.ll
Commit 88bbd30736561190a6733d0ad60aec21446b914c by david.sherwood
[SVE][CodeGen] Fix issues with EXTRACT_SUBVECTOR when using scalable FP vectors

In this patch I have fixed two issues:

1. Our SVE tuple get/set intrinsics were using the wrong constant type
for the index passed to EXTRACT_SUBVECTOR. I have fixed this by using the
function SelectionDAG::getVectorIdxConstant to create the value. Also, I
have updated the documentation for EXTRACT_SUBVECTOR describing what type
the constant index should be and we now enforce this when creating the
node.
2. The AArch64 backend was missing the appropriate patterns for
extracting certain subvectors (nxv4f16 and nxv2f32) from legal SVE types.
I have added them as part of this patch.

The only way that I could find to test the new patterns was to use the
SVE tuple get intrinsics, although I realise it looks a bit unusual.
Tests added here:

  test/CodeGen/AArch64/sve-extract-subvector.ll

Differential Revision: https://reviews.llvm.org/D85516
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/sve-extract-subvector.ll
The file was modifiedllvm/include/llvm/CodeGen/ISDOpcodes.h
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit ac37afa650271d8366b706d79ff8e217fc624cbb by ecaldas
[SyntaxTree] Unbox operators into tokens for nodes generated from `CXXOperatorCallExpr`

For an user define `<`, `x < y` would yield the syntax tree:
```
BinaryOperatorExpression
|-IdExpression
| `-UnqualifiedId
|   `-x
|-IdExpression
| `-UnqualifiedId
|   `-<
`-IdExpression
  `-UnqualifiedId
    `-y
```
But there is no syntatic difference at call site between call site or
built-in `<`. As such they should generate the same syntax tree, namely:
```
BinaryOperatorExpression
|-IdExpression
| `-UnqualifiedId
|   `-x
|-<
`-IdExpression
  `-UnqualifiedId
    `-y
```

Differential Revision: https://reviews.llvm.org/D85750
The file was modifiedclang/unittests/Tooling/Syntax/TreeTest.cpp
The file was modifiedclang/lib/Tooling/Syntax/BuildTree.cpp
Commit 6716e7868ec31668f8200e05d8550d3099b2c697 by sjoerd.meijer
[ARM][MVE] tail-predication: overflow checks for backedge taken count.

This pick ups the work on the overflow checks for get.active.lane.mask,
which ensure that it is safe to insert the VCTP intrinisc that enables
tail-predication. For a 2d auto-correlation kernel and its inner loop j:

  M = Size - i;
  for (j = 0; j < M; j++)
    Sum += Input[j] * Input[j+i];

For this inner loop, the SCEV backedge taken count (BTC) expression is:

  (-1 + (sext i16 %Size to i32)),+,-1}<nw><%for.body>

and LoopUtil cannotBeMaxInLoop couldn't calculate a bound on this, thus "BTC
cannot be max" could not be determined. So overflow behaviour had to be assumed
in the loop tripcount expression that uses the BTC. As a result
tail-predication had to be forced (with an option) for this case.

This change solves that by using ScalarEvolution's helper
getConstantMaxBackedgeTakenCount which is able to determine the range of BTC,
thus can determine it is safe, so that we no longer need to force tail-predication
as reflected in the changed test cases.

Differential Revision: https://reviews.llvm.org/D85737
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/varying-outer-2d-reduction.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/tail-reduce.ll
The file was modifiedllvm/lib/Target/ARM/MVETailPredication.cpp
Commit 9ceb192e14164ecf8a6f714a770c89765327c722 by ikudrin
[llvm-dwarfdump] Avoid crashing if an abbreviation offset is invalid.

Note that DWARFUnit::getAbbreviations() returns nullptr if the
abbreviations could not be read, but callers used the returned
pointer without checking.

Differential Revision: https://reviews.llvm.org/D85738
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFCompileUnit.cpp
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
The file was addedllvm/test/tools/llvm-dwarfdump/X86/invalid_abbrev_offset.s
Commit e441b7a7a0a72c28daf5a8e594559c667e5b4534 by flo
[SCEV] Look through single value PHIs.

Now that SCEVExpander can preserve LCSSA form,
we do not have to worry about LCSSA form when
trying to look through PHIs. SCEVExpander will take
care of inserting LCSSA PHI nodes as required.

This increases precision of the analysis in some cases.

Reviewed By: mkazantsev, bmahjour

Differential Revision: https://reviews.llvm.org/D71539
The file was modifiedllvm/test/Analysis/ScalarEvolution/solve-quadratic-i1.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/solve-quadratic-overflow.ll
The file was modifiedllvm/test/Transforms/LoopStrengthReduce/funclet.ll
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit af838584ec5bfd3487ea86a54966a27f73b7e113 by zinenko
[mlir] use intptr_t in C API

Using intptr_t is a consensus for MLIR C API, but the change was missing
from 75f239e9756b (that was using unsigned initially) due to a
misrebase.

Reviewed By: stellaraccident, mehdi_amini

Differential Revision: https://reviews.llvm.org/D85751
The file was modifiedmlir/lib/CAPI/IR/IR.cpp
The file was modifiedmlir/docs/CAPI.md
The file was modifiedmlir/include/mlir-c/IR.h
Commit 7b18716361a533023d7f5366add759038c8a7825 by joker.eph
Add missing dependency on Doc generation for the OpenMP dialect

This is fixing the bot building the MLIR website.
The file was modifiedmlir/include/mlir/Dialect/OpenMP/CMakeLists.txt