SuccessChanges

Summary

  1. TableGen: change a couple of member names to clarify their use. (details)
  2. [LV][ARM] Add preferInloopReduction target hook. (details)
  3. [DSE] Precommit test case with loop carried dependence. (details)
  4. [DSE] Bail out on MemoryPhis when deleting stores at end of function. (details)
  5. [DSE] Adjust coroutines test after e082dee2b588. (details)
  6. [SelectionDAG][X86][ARM][AArch64] Add ISD opcode for __builtin_parity. Expand it to shifts and xors. (details)
  7. [MinGW] Use lib prefix for libraries (details)
  8. [MinGW][clang-shlib] Build by default on MinGW (details)
  9. [MinGW][libclang] Allow simultaneous shared and static lib (details)
  10. [InstCombine] Add extra use tests for abs canonicalization (NFC) (details)
  11. [gcov] Clean up by getting llvm.dbg.cu earlier (details)
  12. [gcov] emitProfileArcs: iterate over GCOVFunction's instead of Function's to avoid duplicated filtering (details)
  13. Revert "[gcov] emitProfileArcs: iterate over GCOVFunction's instead of Function's to avoid duplicated filtering" (details)
  14. Change range operator from deprecated '-' to '...' (details)
  15. Update TableGen test files to use the new '...' range punctuation. (details)
  16. [ARM] Add additional vecreduce float legalization test (NFC) (details)
  17. [gcov] Process .gcda immediately after the accompanying .gcno instead of doing all .gcda after all .gcno (details)
  18. [lld][WebAssembly] Error on import/export of mutable global without `mutable-globals` feature (details)
  19. [ARM] Add tests for fmin/max + inf folds (NFC) (details)
Commit 8ce75e2778daf0492421fb524986756ef7e84b2b by paul
TableGen: change a couple of member names to clarify their use.
The file was modifiedllvm/lib/TableGen/Record.cpp
The file was modifiedllvm/include/llvm/TableGen/Record.h
Commit 74760bb00fb9b78a2fe12242716bd6976b8c3566 by david.green
[LV][ARM] Add preferInloopReduction target hook.

This allows the backend to tell the vectorizer to produce inloop
reductions through a TTI hook.

For the moment on ARM under MVE this means allowing integer add
reductions of the correct size. In the future this can include integer
min/max too, under -Os.

Differential Revision: https://reviews.llvm.org/D75512
The file was modifiedllvm/lib/Analysis/TargetTransformInfo.cpp
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfo.h
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.h
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfoImpl.h
The file was modifiedllvm/test/Transforms/LoopVectorize/ARM/mve-reduction-types.ll
Commit 3de9e3e493baed93e1aa0e99b04a0b11f370a939 by flo
[DSE] Precommit test case with loop carried dependence.
The file was addedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-loop-carried-dependence.ll
Commit e082dee2b5885bba65e20b22b088bcaca5546984 by flo
[DSE] Bail out on MemoryPhis when deleting stores at end of function.

When deleting stores at the end of a function, we have to do PHI
translation, otherwise we might miss reads in different iterations of a
loop. See multiblock-loop-carried-dependence.ll for details.

This fixes a mis-compile and surprisingly also increases the number of
eliminated stores from 26047 to 26572 for MultiSource/SPEC2000/SPEC2006
on X86 with -O3 -flto. This is most likely because we save budget by not
exploring through MemoryPhis, which are less likely to result in valid
candidates for elimination.

The issue was reported post-commit for fb109c42d91c.
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-malloc-free.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-loop-carried-dependence.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-memintrinsics.ll
Commit d85ac6d577ac5d4a7812e6cd3b0171f5e356c805 by flo
[DSE] Adjust coroutines test after e082dee2b588.
The file was modifiedllvm/test/Transforms/Coroutines/ArgAddr.ll
Commit ad3d6f993d9f7ff3a54c5a716ccc918026fa0252 by craig.topper
[SelectionDAG][X86][ARM][AArch64] Add ISD opcode for __builtin_parity. Expand it to shifts and xors.

Clang emits (and (ctpop X), 1) for __builtin_parity. If ctpop
isn't natively supported by the target, this leads to poor codegen
due to the expansion of ctpop being more complex than what is needed
for parity.

This adds a DAG combine to convert the pattern to ISD::PARITY
before operation legalization. Type legalization is updated
to handled Expanding and Promoting this operation. If after type
legalization, CTPOP is supported for this type, LegalizeDAG will
turn it back into CTPOP+AND. Otherwise LegalizeDAG will emit a
series of shifts and xors followed by an AND with 1.

I've avoided vectors in this patch to avoid more legalization
complexity for this patch.

X86 previously had a custom DAG combiner for this. This is now
moved to Custom lowering for the new opcode. There is a minor
regression in vector-reduce-xor-bool.ll, but a follow up patch
can easily fix that.

Fixes PR47433

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D87209
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/lib/CodeGen/TargetLoweringBase.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
The file was addedllvm/test/CodeGen/ARM/parity.ll
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-xor-bool.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
The file was modifiedllvm/test/CodeGen/X86/parity.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
The file was modifiedllvm/include/llvm/CodeGen/ISDOpcodes.h
The file was addedllvm/test/CodeGen/AArch64/parity.ll
Commit cc76965b19085519278bff1052059e03769b71e8 by martin
[MinGW] Use lib prefix for libraries

In MinGW world, UNIX like lib prefix is preferred for the libraries.
This patch adjusts CMake files to do that.

Differential Revision: https://reviews.llvm.org/D87517
The file was modifiedllvm/tools/llvm-config/llvm-config.cpp
The file was modifiedlldb/source/API/CMakeLists.txt
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
The file was modifiedclang/tools/libclang/CMakeLists.txt
Commit bb613044b6800b8ccc238232677f905bda423819 by martin
[MinGW][clang-shlib] Build by default on MinGW

It builds without errors and makes possible to use
CLANG_LINK_CLANG_DYLIB=1.

Differential Revision: https://reviews.llvm.org/D87547
The file was modifiedclang/tools/CMakeLists.txt
Commit 7da941939902768af25ffa45149695a0a5f15951 by martin
[MinGW][libclang] Allow simultaneous shared and static lib

It builds fine for MinGW on Windows.

Differential Revision: https://reviews.llvm.org/D87539
The file was modifiedclang/tools/libclang/CMakeLists.txt
Commit c34a99fe589b870354c9a7863b79d882c74f7d50 by nikita.ppv
[InstCombine] Add extra use tests for abs canonicalization (NFC)
The file was modifiedllvm/test/Transforms/InstCombine/abs-1.ll
Commit c55c14837e148b817de989106560328219df342b by i
[gcov] Clean up by getting llvm.dbg.cu earlier
The file was modifiedllvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
Commit 412c9c0bf2a8ccbda2d925575891a51ef5df846e by i
[gcov] emitProfileArcs: iterate over GCOVFunction's instead of Function's to avoid duplicated filtering
The file was modifiedllvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
Commit 7d3825ed954aa1578790b96a8a544d034ea112f6 by i
Revert "[gcov] emitProfileArcs: iterate over GCOVFunction's instead of Function's to avoid duplicated filtering"

This reverts commit 412c9c0bf2a8ccbda2d925575891a51ef5df846e.
The file was modifiedllvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
Commit e8e3693ceaa1afe267f21d2ba8d9565ea8fe7c12 by paul
Change range operator from deprecated '-' to '...'
The file was modifiedllvm/test/TableGen/AllowDuplicateRegisterNames.td
The file was modifiedllvm/test/TableGen/BigEncoder.td
The file was modifiedllvm/test/TableGen/BitOffsetDecoder.td
The file was modifiedllvm/test/TableGen/BitsInit.td
Commit 93b4f8538267e620de4a36e7cf0abc0d4f8d7c10 by paul
Update TableGen test files to use the new '...' range punctuation.
The file was modifiedllvm/test/TableGen/BitsInit.td
The file was modifiedllvm/test/TableGen/UnsetBitInit.td
The file was modifiedllvm/test/TableGen/JSON.td
The file was modifiedllvm/test/TableGen/defset.td
The file was modifiedllvm/test/TableGen/if.td
The file was modifiedllvm/test/TableGen/ForeachLoop.td
The file was modifiedllvm/test/TableGen/dag-isel-regclass-emit-enum.td
The file was modifiedllvm/test/TableGen/trydecode-emission3.td
The file was modifiedllvm/test/TableGen/DAGDefaultOps.td
The file was modifiedllvm/test/TableGen/list-element-bitref.td
The file was modifiedllvm/test/TableGen/ListSlices.td
The file was modifiedllvm/test/TableGen/HwModeEncodeDecode.td
The file was modifiedllvm/test/TableGen/ifstmt.td
The file was modifiedllvm/test/TableGen/range-lists.td
The file was modifiedllvm/test/TableGen/foreach-variable-range.td
The file was modifiedllvm/test/TableGen/cond-let.td
The file was modifiedllvm/test/TableGen/simplify-patfrag.td
Commit bdd1eba37b64e64c2d93d3e79223b5933d631447 by nikita.ppv
[ARM] Add additional vecreduce float legalization test (NFC)
The file was modifiedllvm/test/CodeGen/ARM/vecreduce-fadd-legalization-soft-float.ll
Commit d6fadc49e3d7eb0977bca3ff92bf156bd059fcd4 by i
[gcov] Process .gcda immediately after the accompanying .gcno instead of doing all .gcda after all .gcno

i.e. change the work flow from

* .gcno for function A
* .gcno for function B
* .gcno for function C
* .gcda for function A
* .gcda for function B
* .gcda for function C

to

* .gcno for function A
* .gcda for function A
* .gcno for function B
* .gcda for function B
* .gcno for function C
* .gcda for function C

Currently there is duplicate logic in .gcno & .gcda processing: how functions
are filtered, which edges are instrumented, etc. This refactor enables simplification.

Since we always process .gcno, in -fprofile-arcs -fno-test-coverage mode,
__llvm_internal_gcov_emit_function_args.0 will have non-zero checksums.
The file was modifiedllvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
The file was modifiedclang/test/CodeGen/code-coverage.c
Commit 04febd30a8dab3ff4b6e6032f1a1a9f4725f8267 by sbc
[lld][WebAssembly] Error on import/export of mutable global without `mutable-globals` feature

Also add the +mutable-globals features in clang when
building with `-fPIC` since the linker will generate mutable
globals imports and exports in that case.

Differential Revision: https://reviews.llvm.org/D87537
The file was modifiedclang/test/Driver/wasm-toolchain.c
The file was modifiedlld/test/wasm/emit-relocs-fpic.s
The file was modifiedlld/test/wasm/pie.ll
The file was modifiedclang/lib/Driver/ToolChains/WebAssembly.cpp
The file was modifiedlld/test/wasm/Inputs/undefined-globals.s
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedlld/test/wasm/gc-imports.s
The file was addedlld/test/wasm/mutable-globals.s
The file was modifiedlld/test/wasm/shared.ll
Commit c2f8bc986fb39f6a72aafd5dd0d31ec29ad8ce9b by nikita.ppv
[ARM] Add tests for fmin/max + inf folds (NFC)
The file was modifiedllvm/test/CodeGen/ARM/fminmax-folds.ll