SuccessChanges

Summary

  1. Enable extra coverage counters on Windows (details)
  2. [AArch64][GlobalISel] Legalize ctpop s128 (details)
  3. [llvm-diff] Create libLLVMDiff library (details)
  4. [clang] Implement -falign-loops=N (N is a power of 2) for non-LTO (details)
  5. [libFuzzer] Add missing include on Darwin. (details)
  6. [Polly][test] Test difference between isl::stat:ok() and isl::stat::error(). (details)
  7. [Polly][test] Add tests for IslMaxOperationsGuard. (details)
  8. [gn build] manually port 4d293f215dfb (LLVMDiff lib) (details)
  9. [lldb] Remove a few unused .exports files (details)
  10. Clean up instcombine stpcpy test (details)
  11. [lldb] Stop referencing "host_lib" in cmake files (details)
  12. [msan] Don't track origns in signal handlers (details)
  13. [AArch64][GlobalISel] Overhaul G_EXTRACT legalization (details)
  14. [AMDGPU] add v2i32 and v2f32 insert_vector_elt tests. NFC. (details)
  15. [Thumb2] generate checks in ldr-str-imm12.ll. NFC. (details)
  16. [AArch64][GlobalISel] Widen G_BSWAP before clamping (details)
  17. [AIX] "aligned" attribute should not decrease type alignment returned by __alignof__ (details)
  18. [AArch64] Expand the SVE min/max reduction costs to NEON (details)
  19. [WebAssembly] Don't do SjLj transformation when there's only setjmp (details)
Commit 881faf41909b47376595e8d7bb9c9a109182d20b by mascasa
Enable extra coverage counters on Windows

- Enable extra coverage counters on Windows.
- Update extra_counters.test to run on Windows also.
- Update TableLookupTest.cpp to include the required pragma/declspec for the extra coverage counters.

Patch By: MichaelSquires

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D106676
The file was modifiedcompiler-rt/lib/fuzzer/CMakeLists.txt
The file was addedcompiler-rt/lib/fuzzer/FuzzerExtraCountersDarwin.cpp
The file was addedcompiler-rt/lib/fuzzer/FuzzerExtraCountersWindows.cpp
The file was modifiedcompiler-rt/test/fuzzer/TableLookupTest.cpp
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerExtraCounters.cpp
The file was modifiedcompiler-rt/test/fuzzer/extra-counters.test
Commit 98f38c151b5a8272c7e9a609f6c7c71623fb652b by jonathan_roelofs
[AArch64][GlobalISel] Legalize ctpop s128

This is re-landing the same patch again, but without the changes to
LegalizerHelper that regressed the Mips test:

test/CodeGen/Mips/GlobalISel/llvm-ir/ctpop.ll

Differential revision: https://reviews.llvm.org/D106494
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-ctpop.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/popcount.ll
Commit 4d293f215dfb6ab6af966175717e86468f708b1c by isanbard
[llvm-diff] Create libLLVMDiff library

Some tools may want to use the LLVM "diff" code. Move the code into a
library for easy use.

No functionality change intende.

Differential Revision: https://reviews.llvm.org/D107392
The file was addedllvm/tools/llvm-diff/lib/DiffConsumer.h
The file was removedllvm/tools/llvm-diff/DiffLog.cpp
The file was addedllvm/tools/llvm-diff/lib/DifferenceEngine.h
The file was addedllvm/tools/llvm-diff/lib/DiffLog.cpp
The file was removedllvm/tools/llvm-diff/DifferenceEngine.cpp
The file was addedllvm/tools/llvm-diff/lib/DiffLog.h
The file was addedllvm/tools/llvm-diff/lib/CMakeLists.txt
The file was removedllvm/tools/llvm-diff/DiffConsumer.h
The file was addedllvm/tools/llvm-diff/lib/DifferenceEngine.cpp
The file was addedllvm/tools/llvm-diff/lib/DiffConsumer.cpp
The file was removedllvm/tools/llvm-diff/DiffConsumer.cpp
The file was removedllvm/tools/llvm-diff/DifferenceEngine.h
The file was removedllvm/tools/llvm-diff/DiffLog.h
The file was modifiedllvm/tools/llvm-diff/llvm-diff.cpp
The file was modifiedllvm/tools/llvm-diff/CMakeLists.txt
Commit c38efb4899eac7b82daaf1320ad79f6271f9648a by i
[clang] Implement -falign-loops=N (N is a power of 2) for non-LTO

GCC supports multiple forms of -falign-loops=.
-falign-loops= is currently ignored in Clang.

This patch implements the simplest but the most useful form where N is a
power of 2.

The underlying implementation uses a `llvm::TargetOptions` option for now.
Bitcode generation ignores this option.

Differential Revision: https://reviews.llvm.org/D106701
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/include/clang/Basic/LangOptions.def
The file was addedclang/test/CodeGen/align-loops.c
The file was modifiedclang/test/Driver/clang_f_opts.c
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
The file was addedclang/test/Driver/falign-loops.c
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def
The file was modifiedclang/include/clang/Basic/DiagnosticDriverKinds.td
Commit 7ca2b9aac782c223a9b3d59af9572a574e3a21d8 by mascasa
[libFuzzer] Add missing include on Darwin.
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerExtraCountersDarwin.cpp
Commit 50eaa82cdbc72588f0841658bbad9695855eba85 by llvm-project
[Polly][test] Test difference between isl::stat:ok() and isl::stat::error().

The foreach callback wrappers tests check the return values of isl::stat:ok() and isl::stat::error() separately. However, due to the the container they are iterating over containing just one element, they are actually not testing the difference between them.

This patch changes to set to be iterated over to contain 2 element to make returning sl::stat:ok (continue iterating the next element) and isl::stat::error (break after current element) have different effects other than the return value of the foreach itself.

Reviewed By: patacca

Differential Revision: https://reviews.llvm.org/D107395
The file was modifiedpolly/unittests/Isl/IslTest.cpp
Commit 0f50ffb3365eefaf114f3d1de6e8acee4fe8f169 by llvm-project
[Polly][test] Add tests for IslMaxOperationsGuard.

Add unittests for IslMaxOperationsGuard and the behaviour of the isl-noexception.h wrapper under exceeded max_operations.

Reviewed By: patacca

Differential Revision: https://reviews.llvm.org/D107401
The file was modifiedpolly/unittests/Isl/IslTest.cpp
Commit ddb26e2e003bd21de5a021bea67cf70c9c5b6e4b by thakis
[gn build] manually port 4d293f215dfb (LLVMDiff lib)
The file was modifiedllvm/utils/gn/secondary/llvm/tools/llvm-diff/BUILD.gn
The file was addedllvm/utils/gn/secondary/llvm/tools/llvm-diff/lib/BUILD.gn
Commit 11565320fd55117f04b9cc812e28a30962283c3e by thakis
[lldb] Remove a few unused .exports files

They used to be referenced from the .xcodeproj files, but those are long gone.

No behavior change.

Differential Revision: https://reviews.llvm.org/D107444
The file was removedlldb/source/API/liblldb.xcode.exports
The file was removedlldb/tools/lldb-server/lldb-server.exports
The file was removedlldb/tools/argdumper/argdumper.exports
Commit 7dd29ad4ae49b2716483f50af5661abc98f484e0 by nathan
Clean up instcombine stpcpy test

Deduplicate some code and add an additional test to verify that the
sprintf->stpcpy optimization still works on android21 (which properly
supports it).

This follows up 58481663692b55.

Differential Revision: https://reviews.llvm.org/D107526
The file was modifiedllvm/test/Transforms/InstCombine/sprintf-1.ll
Commit e71fdc1acf054271031200f87a6bfc276d8a1ebd by thakis
[lldb] Stop referencing "host_lib" in cmake files

It hasn't had an effect since https://reviews.llvm.org/rG7b968969db.

No behavior change.

Differential Revision: https://reviews.llvm.org/D107446
The file was modifiedlldb/tools/lldb-vscode/CMakeLists.txt
The file was modifiedlldb/tools/lldb-test/CMakeLists.txt
Commit c2a3fb303f1fffeb0856863cc5eff1529e1db5e7 by Vitaly Buka
[msan] Don't track origns in signal handlers

Origin::CreateHeapOrigin is not async-signal-safe and can deadlock.

Differential Revision: https://reviews.llvm.org/D107431
The file was addedcompiler-rt/test/msan/poison_in_signal.cpp
The file was modifiedcompiler-rt/lib/msan/msan_poisoning.cpp
Commit 51bd4e874fa51412e7399fe7f863169b4f4829bc by Jessica Paquette
[AArch64][GlobalISel] Overhaul G_EXTRACT legalization

This simplifies our existing G_EXTRACT rules and adds some test coverage. Mostly
changing this because it should make it easier to improve legalization for
instructions which use G_EXTRACT as part of the legalization process.

This also adds support for legalizing some weird types. Similar to other recent
legalizer changes, this changes the order of widening/clamping.

There was some dead code in our existing rules (e.g. the p0 case would never get
hit), so this knocks those out and makes the types we want to handle explicit.

This also removes some checks which, nowadays, are handled by the
MachineVerifier.

Differential Revision: https://reviews.llvm.org/D107505
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-combines.mir
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-extracts.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-inserts.mir
Commit 42b9c2a17a0b63cccf3ac197a82f91b28e53e643 by Stanislav.Mekhanoshin
[AMDGPU] add v2i32 and v2f32 insert_vector_elt tests. NFC.
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.ll
Commit c46cb72fea73467dbd72050a9e250080d5757e89 by Stanislav.Mekhanoshin
[Thumb2] generate checks in ldr-str-imm12.ll. NFC.

That seems this test does not check what was stated in the
comment anymore. Just switch to generated checks.

Differential Revision: https://reviews.llvm.org/D107590
The file was modifiedllvm/test/CodeGen/Thumb2/ldr-str-imm12.ll
Commit 36498374d471272ab094b622dbc55874d8713a8f by Jessica Paquette
[AArch64][GlobalISel] Widen G_BSWAP before clamping

This allows us to avoid odd type breakdowns + allows us to legalize types like
s88 in the first place.

Add some testcases for known legal types + testcases for s4 and s88.

Differential Revision: https://reviews.llvm.org/D107607
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-bswap.mir
Commit a91916500d67155ca17bfdf3294541f871f90a45 by wanyu9511
[AIX] "aligned" attribute should not decrease type alignment returned by __alignof__

`__alignof__(x)` always returns `ABIAlign` if the "x" is marked `__attribute__((aligned()))`. However, the "aligned" attribute should only increase the alignment of a struct, or struct member, unless it's used together with the "packed" attribute, or used as a part of a typedef, in which case, the "aligned" attribute can both increase and decrease alignment.

Reviewed By: sfertile

Differential Revision: https://reviews.llvm.org/D107598
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was addedclang/test/Layout/aix-alignof-align-and-pack-attr.cpp
Commit 649cf4514dd32e0e7944f6f8d82a1b72c87a2870 by david.green
[AArch64] Expand the SVE min/max reduction costs to NEON

This takes the existing SVE costing for the various min/max reduction
intrinsics and expands it to NEON, where I believe it applies equally
well.

In the process it changes the lowering to use min/max cost, as opposed
to summing up the cost of ICmp+Select.

Differential Revision: https://reviews.llvm.org/D106239
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
The file was modifiedllvm/test/Analysis/CostModel/AArch64/reduce-minmax.ll
The file was modifiedllvm/test/Analysis/CostModel/AArch64/vector-reduce.ll
Commit 41ba39dfcd0a765f238561ce1b52f843c825ff9a by aheejin
[WebAssembly] Don't do SjLj transformation when there's only setjmp

When there is a `setjmp` call in a function, we transform every callsite
of `setjmp` to record its information by calling `saveSetjmp` function,
and we also transform every callsite of a function that can longjmp to
to check if a longjmp occurred and if so jump to the corresponding
post-setjmp BB. Currently we are doing this for every function that
contains a call to `setjmp`, but if there is no other function call
within that function that can longjmp, this transformation of `setjmp`
callsite and all the preparation of `setjmpTable` in the entry of the
function are not necessary.

This checks if a setjmp-calling function has any other calls that can
longjmp, and if not, skips the function for the SjLj transformation.

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D107530
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-sjlj-alias.ll
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll