SuccessChanges

Summary

  1. [clang-check] Add tokens-dump in clang-check. (details)
  2. [LoopVectorize] NFC: Change selectVectorizationFactor to work on ElementCount. (details)
  3. [Syntax] NFC, Simplify a test with annotations (details)
  4. [Syntax] Remove a strict valid source location assertion for TypeLoc. (details)
  5. [ARM] Make a BE predicate bitcast consistent with the rest of llvm (details)
  6. Expand masked mem intrinsics correctly wrt big-endian (details)
  7. [mlir][gpu] Allow all dialects in SCF to GPU conversion. (details)
  8. [TTI] Change TargetTransformInfo::getMinimumVF to return ElementCount (details)
  9. [OpenCL] Add cl_khr_subgroup_extended_types to TableGen BIFs (details)
  10. [DebugInfo] Prevent inlining in NRVO-string test cases (details)
  11. [CodeComplete] Member completion: heuristically resolve some dependent base exprs (details)
  12. [clang][index] report references from unreslovedLookupExpr. (details)
  13. [ARM] Remove dead mov's in preheader of tail predicated loops (details)
  14. Revert "[Codegenprepare][X86] Use usub with overflow opt for IV increment" (details)
  15. NFC: Migrate CodeMetrics to work on InstructionCost (details)
  16. [AMDGPU] Move kill lowering to WQM pass and add live mask tracking (details)
  17. [flang][driver] Move standard macro predefs to a dedicated method (nfc) (details)
  18. [test][Dexter] Fix test failure if space in python path (details)
Commit df1a17c219c073427f9d00eb042057bb3a4a3c64 by hokein.wu
[clang-check] Add tokens-dump in clang-check.

It is useful for syntax-tree developement.

Reviewed By: kbobyrev

Differential Revision: https://reviews.llvm.org/D96017
The file was modifiedclang/tools/clang-check/ClangCheck.cpp
Commit be9bbb57f4739e4653cee77979f6fb72310176c0 by sander.desmalen
[LoopVectorize] NFC: Change selectVectorizationFactor to work on ElementCount.

This patch is NFC and changes occurrences of `unsigned Width`
and `unsigned i` to work on type ElementCount instead.

This patch is a preparatory patch with the ultimate goal of making
`computeMaxVF()` return both a max fixed VF and a max scalable VF,
so that `selectVectorizationFactor()` can pick the most cost-effective
vectorization factor.

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D96019
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Commit 35a5e883906f11b63b60574d8737791448dd478f by hokein.wu
[Syntax] NFC, Simplify a test with annotations
The file was modifiedclang/unittests/Tooling/Syntax/BuildTreeTest.cpp
Commit e159a3ced4c54b539c165b1cc26424fa0b34d53e by hokein.wu
[Syntax] Remove a strict valid source location assertion for TypeLoc.

The EndLoc of a type loc can be invalid for broken code.

Also extend the existing test to support error code with `error-ok`
annotation.

Differential Revision: https://reviews.llvm.org/D96261
The file was modifiedclang/unittests/Tooling/Syntax/BuildTreeTest.cpp
The file was modifiedclang/lib/Tooling/Syntax/BuildTree.cpp
Commit 1db7b9ceaae43ab3c44ac96e238ec078538204ea by david.green
[ARM] Make a BE predicate bitcast consistent with the rest of llvm

We were storing predicate registers, such as a <8 x i1>, in the opposite
order to how the rest of llvm expects. This actually turns out to be
correct for the one place that usually uses it - the
ScalarizeMaskedMemIntrin pass, but only because the pass was incorrect
itself. This fixes the order so that bits are stored in the opposite
order and bitcasts work as expected. This allows the Scalarization pass
to be fixed, as in https://reviews.llvm.org/D94765.

Differential Revision: https://reviews.llvm.org/D94867
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-store.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-loadstore.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-bitcast.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-load.ll
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-ldst.ll
Commit 9498315c9ba35b41e6b82f33ca629482d6db72b9 by david.green
Expand masked mem intrinsics correctly wrt big-endian

Need to take endianness into account when doing vector to scalar casts
such as %bc = bitcast <8 x i1> %v to i8
Companion commit for https://reviews.llvm.org/D94867
Upload in response to
https://lists.llvm.org/pipermail/llvm-dev/2021-January/147862.html
Attempting to document the actual memory layout rules for vectors in
https://reviews.llvm.org/D94964

Differential Revision: https://reviews.llvm.org/D94765
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-ldst.ll
The file was modifiedllvm/lib/Transforms/Scalar/ScalarizeMaskedMemIntrin.cpp
The file was modifiedllvm/test/Transforms/ScalarizeMaskedMemIntrin/AArch64/expand-masked-store.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-load.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-masked-store.ll
The file was modifiedllvm/test/Transforms/ScalarizeMaskedMemIntrin/AArch64/expand-masked-load.ll
Commit 33a58c1c5ced2daec879671e0d3efb3e2f021bbb by herhut
[mlir][gpu] Allow all dialects in SCF to GPU conversion.

With the standard dialect being split up, the set of dialects that are
used when converting to GPU is growing. This change modifies the
SCFToGpu pass to allow all operations inside launch bodies.

Differential Revision: https://reviews.llvm.org/D96480
The file was modifiedmlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp
Commit 703130fb016ac21b0a4537b0c8cf66ac15e8a7ac by sander.desmalen
[TTI] Change TargetTransformInfo::getMinimumVF to return ElementCount

This will be needed in the loop-vectorizer where the minimum VF
requested may be a scalable VF. getMinimumVF now takes an additional
operand 'IsScalableVF' that indicates whether a scalable VF is required.

Reviewed By: kparzysz, rampitec

Differential Revision: https://reviews.llvm.org/D96020
The file was modifiedllvm/lib/Analysis/TargetTransformInfo.cpp
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfoImpl.h
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonTargetTransformInfo.h
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfo.h
The file was modifiedllvm/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp
Commit 0b448854daffd57869254089ebb1bf69e8449823 by sven.vanhaastregt
[OpenCL] Add cl_khr_subgroup_extended_types to TableGen BIFs

Add the builtin functions brought by the
cl_khr_subgroup_extended_types extension to
`-fdeclare-opencl-builtins`.

Differential Revision: https://reviews.llvm.org/D96279
The file was modifiedclang/lib/Sema/OpenCLBuiltins.td
The file was modifiedclang/test/SemaOpenCL/fdeclare-opencl-builtins.cl
Commit a874d182c61c7f8e5291c718b40be0e133bf21f0 by Raphael Isemann
[DebugInfo] Prevent inlining in NRVO-string test cases

Since the new pass manager has been enabled by default these tests had their
-O1 variations failing due to the tested functions being inlined. This just
adds no_inline to the respective code similar to what we did in other
tests (e.g. aa56b30014d96700b2fc945be11866789f341d38 ).
The file was modifieddebuginfo-tests/dexter-tests/nrvo-string.cpp
The file was modifieddebuginfo-tests/llgdb-tests/nrvo-string.cpp
Commit 5c55d3747b0cab17aaa07729cf90a49dbda71bbe by sam.mccall
[CodeComplete] Member completion: heuristically resolve some dependent base exprs

Today, inside a template, you can get completion for:

Foo<T> t;
t.^

t has dependent type Foo<T>, and we use the primary template to find its members.
However we also want this to work:

t.foo.bar().^

The type of t.foo.bar() is DependentTy, so we attempt to resolve using similar
heuristics (e.g. primary template).

Differential Revision: https://reviews.llvm.org/D96376
The file was modifiedclang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
The file was modifiedclang/test/CodeCompletion/member-access.cpp
The file was modifiedclang/lib/Sema/SemaCodeComplete.cpp
Commit 6c47eafb3973a8e3f7455c9655ed666883e7b513 by hokein.wu
[clang][index] report references from unreslovedLookupExpr.

Fix https://github.com/clangd/clangd/issues/675

Differential Revision: https://reviews.llvm.org/D96262
The file was modifiedclang/lib/Index/IndexBody.cpp
The file was modifiedclang-tools-extra/clangd/unittests/XRefsTests.cpp
The file was modifiedclang/test/Index/Core/index-dependent-source.cpp
Commit 7786ac8377a27f3e78bfb88bf59ebc489e26a5cd by david.green
[ARM] Remove dead mov's in preheader of tail predicated loops

With t2DoLoopDec we can be left with some extra MOV's in the preheaders
of tail predicated loops. This removes them, in the same way we remove
other dead variables.

Differential Revision: https://reviews.llvm.org/D91857
The file was modifiedllvm/test/CodeGen/Thumb2/mve-postinc-lsr.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-blockplacement.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/while-loops.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/mov-operand.ll
The file was modifiedllvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/exitcount.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-postinc-dct.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-pred-vctpvpsel.ll
Commit 90081f3020e38727eb30506d052cbb4e3a489eb6 by mkazantsev
Revert "[Codegenprepare][X86] Use usub with overflow opt for IV increment"

This reverts commit 3d15b7e7dfc3e2cefc47791d1e8d95909e937842.

We've found an internal failure, need to analyze.
The file was modifiedllvm/test/CodeGen/X86/2020_12_02_decrementing_loop.ll
The file was modifiedllvm/test/CodeGen/X86/usub_inc_iv.ll
The file was modifiedllvm/lib/CodeGen/CodeGenPrepare.cpp
The file was modifiedllvm/test/CodeGen/X86/lsr-loop-exit-cond.ll
Commit 41500836b0f2e335b71919700e5db9341de76e8a by sander.desmalen
NFC: Migrate CodeMetrics to work on InstructionCost

This patch migrates cost values and arithmetic to work on InstructionCost.
When the interfaces to TargetTransformInfo are changed, any InstructionCost
state will propagate naturally.

See this patch for the introduction of the type: https://reviews.llvm.org/D91174
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D96030
The file was modifiedllvm/lib/Analysis/CodeMetrics.cpp
Commit c16f776028ddd39a4d5ea39d5c3831b1bcbb8c02 by carl.ritson
[AMDGPU] Move kill lowering to WQM pass and add live mask tracking

Move implementation of kill intrinsics to WQM pass. Add live lane
tracking by updating a stored exec mask when lanes are killed.
Use live lane tracking to enable early termination of shader
at any point in control flow.

Reviewed By: piotr

Differential Revision: https://reviews.llvm.org/D94746
The file was modifiedllvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.wqm.vote.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/vcmpx-permlane-hazard.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/transform-block-with-return-to-epilog.ll
The file was removedllvm/test/CodeGen/AMDGPU/insert-skips-kill-uncond.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/wave32.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/skip-if-dead.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIInsertSkips.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/early-term.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIOptimizeExecMasking.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_optimizations_pixelshader.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIInstructions.td
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.kill.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/vcmpx-exec-war-hazard.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/wqm.ll
Commit 0feff71eabd39fc93f3d9ec30ed16e26da6cf883 by andrzej.warzynski
[flang][driver] Move standard macro predefs to a dedicated method (nfc)

This patch just addresses one of the outstanding TODOs. More
specifically, it moves all the outstanding standard macro predefinitions
from `SetDefaultFortranOpts` to `setDefaultPredefinitions`. This
dedicated method for standard macro predefs was introduced in:
  * https://reviews.llvm.org/D96032
The file was modifiedflang/lib/Frontend/CompilerInvocation.cpp
Commit a31eae840525e9292a3a42c1fdac3fc594f42949 by james.henderson
[test][Dexter] Fix test failure if space in python path

The '%dexter_regression_test' substitution was missing quotes around the
python executable, unlike other substitutions of a similar nature in the
file. This changes fixes the issue.

Differential Revision: https://reviews.llvm.org/D96420

Reviewed by: jmorse, aganea
The file was modifieddebuginfo-tests/lit.cfg.py