SuccessChanges

Summary

  1. [SCEV] Prove implicaitons via AddRec start (details)
  2. [mlir][Linalg] Fix ASAN bug (details)
  3. [SVE][CodeGen] Lower scalable fp_extend & fp_round operations (details)
  4. [CFGuard] Add address-taken IAT tables and delay-load support (details)
  5. [InstCombine] collectBitParts - use APInt directly to check for out of range bit shifts. NFCI. (details)
  6. [lldb] Skip the flakey part of TestStopHookScripted on Linux (details)
  7. [libc++] Simplify how we re-export symbols from libc++abi (details)
  8. [lldb] Add missing import for LLDB test decorators to TestStopHookScripted (details)
  9. [NFC][ARM] LowOverheadLoop DEBUG statements (details)
  10. [LoopFlatten] Add a loop-flattening pass (details)
Commit 69acdfe075fa8eb18781f88f4d0cd1ea40fa6e48 by mkazantsev
[SCEV] Prove implicaitons via AddRec start

If we know that some predicate is true for AddRec and an invariant
(w.r.t. this AddRec's loop), this fact is, in particular, true on the first
iteration. We can try to prove the facts we need using the start value.

The motivating example is proving things like
```
  isImpliedCondOperands(>=, X, 0, {X,+,-1}, 0}
```

Differential Revision: https://reviews.llvm.org/D88208
Reviewed By: reames
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/unittests/Analysis/ScalarEvolutionTest.cpp
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
Commit a81b938b6dee0e1ed4dd44e7d59325d0aa4774cc by ntv
[mlir][Linalg] Fix ASAN bug

```
LinalgTilingOptions &setTileSizes(ValueRange ts)
```
makes it all too easy to create stack-use-after-return errors.

In particular, c694588fc52a8845174fee06ad0bcfa338e87816 introduced one such issue.

Instead just take a copy in the lambda and be done with it.
The file was modifiedmlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
Commit fcf70e1e3b1d57d5fde6b99d0188d1b1774429af by kerry.mclaughlin
[SVE][CodeGen] Lower scalable fp_extend & fp_round operations

This patch adds FP_EXTEND_MERGE_PASSTHRU & FP_ROUND_MERGE_PASSTHRU
ISD nodes, used to lower scalable vector fp_extend/fp_round operations.
fp_round has an additional argument, the 'trunc' flag, which is an integer of zero or one.

This also fixes a warning introduced by the new tests added to sve-split-fcvt.ll,
resulting from an implicit TypeSize -> uint64_t cast in SplitVecOp_FP_ROUND.

Reviewed By: sdesmalen, paulwalker-arm

Differential Revision: https://reviews.llvm.org/D88321
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was modifiedllvm/lib/Target/AArch64/SVEInstrFormats.td
The file was modifiedllvm/test/CodeGen/AArch64/sve-fcvt.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrFormats.td
The file was modifiedllvm/test/CodeGen/AArch64/sve-split-fcvt.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
Commit ef4e971e5e18ae796466623df8f26265ba6bdfb5 by David.Chisnall
[CFGuard] Add address-taken IAT tables and delay-load support

This patch adds support for creating Guard Address-Taken IAT Entry Tables (.giats$y sections) in object files, matching the behavior of MSVC. These contain lists of address-taken imported functions, which are used by the linker to create the final GIATS table.
Additionally, if any DLLs are delay-loaded, the linker must look through the .giats tables and add the respective load thunks of address-taken imports to the GFIDS table, as these are also valid call targets.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D87544
The file was modifiedllvm/tools/llvm-readobj/COFFDumper.cpp
The file was modifiedllvm/lib/MC/MCObjectFileInfo.cpp
The file was modifiedlld/COFF/Symbols.h
The file was addedlld/test/COFF/giats.s
The file was modifiedlld/COFF/Writer.cpp
The file was modifiedlld/COFF/InputFiles.cpp
The file was modifiedlld/COFF/DLL.cpp
The file was modifiedlld/COFF/ICF.cpp
The file was modifiedlld/COFF/InputFiles.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp
The file was addedllvm/test/CodeGen/WinCFGuard/cfguard-giats.ll
The file was modifiedllvm/include/llvm/MC/MCObjectFileInfo.h
Commit bc730b5e43ad4b7efeca977359271fa0eaa7ed45 by llvm-dev
[InstCombine] collectBitParts - use APInt directly to check for out of range bit shifts. NFCI.
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
Commit b272250221595b14c32db6721a0ae4e5f17ea4d2 by Raphael Isemann
[lldb] Skip the flakey part of TestStopHookScripted on Linux

This test seems to randomly fail on Linux machines. It's only one part of the
test failing randomly, so let's just skip it instead of reverting the whole
patch (again).
The file was modifiedlldb/test/API/commands/target/stop-hooks/TestStopHookScripted.py
Commit 4f13b999297140486b2faa1b5d8d7c768fb40dfb by Louis Dionne
[libc++] Simplify how we re-export symbols from libc++abi

Instead of managing two copies of the symbol lists, reuse the same list
in libc++abi and libc++.

Differential Revision: https://reviews.llvm.org/D88623
The file was removedlibcxx/lib/libc++abi-exceptions.exp
The file was modifiedlibcxx/lib/abi/CHANGELOG.TXT
The file was modifiedlibcxxabi/src/CMakeLists.txt
The file was modifiedlibcxx/lib/abi/x86_64-apple-darwin.v1.abilist
The file was removedlibcxx/lib/libc++abi-new-delete.exp
The file was modifiedlibcxx/src/CMakeLists.txt
The file was removedlibcxx/lib/libc++abi-exceptions.sjlj.exp
Commit cccb7cf1a52f38182f56d947bd609027726c778b by Raphael Isemann
[lldb] Add missing import for LLDB test decorators to TestStopHookScripted

This test wasn't using decorators before and was missing the import, so my
previous commit broke the test.
The file was modifiedlldb/test/API/commands/target/stop-hooks/TestStopHookScripted.py
Commit 7e02bc81c6dad90b0f98f74152f4b0991087d78d by sam.parker
[NFC][ARM] LowOverheadLoop DEBUG statements
The file was modifiedllvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
Commit d53b4bee0ccd408cfe6e592540858046244e74ce by sjoerd.meijer
[LoopFlatten] Add a loop-flattening pass

This is a simple pass that flattens nested loops.  The intention is to optimise
loop nests like this, which together access an array linearly:

  for (int i = 0; i < N; ++i)
    for (int j = 0; j < M; ++j)
      f(A[i*M+j]);

into one loop:

  for (int i = 0; i < (N*M); ++i)
    f(A[i]);

It can also flatten loops where the induction variables are not used in the
loop. This can help with codesize and runtime, especially on simple cpus
without advanced branch prediction.

This is only worth flattening if the induction variables are only used in an
expression like i*M+j. If they had any other uses, we would have to insert a
div/mod to reconstruct the original values, so this wouldn't be profitable.

This partially fixes PR40581 as this pass triggers on one of the two cases. I
will follow up on this to learn LoopFlatten a few more (small) tricks. Please
note that LoopFlatten is not yet enabled by default.

Patch by Oliver Stannard, with minor tweaks from Dave Green and myself.

Differential Revision: https://reviews.llvm.org/D42365
The file was addedllvm/test/Transforms/LoopFlatten/loop-flatten-negative.ll
The file was addedllvm/test/Transforms/LoopFlatten/pr40581.ll
The file was modifiedllvm/include/llvm/InitializePasses.h
The file was modifiedllvm/lib/Transforms/Scalar/Scalar.cpp
The file was modifiedllvm/include/llvm/Transforms/Scalar.h
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was addedllvm/include/llvm/Transforms/Scalar/LoopFlatten.h
The file was modifiedllvm/lib/Transforms/Scalar/CMakeLists.txt
The file was modifiedllvm/include/llvm/LinkAllPasses.h
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/lib/Transforms/IPO/PassManagerBuilder.cpp
The file was addedllvm/test/Transforms/LoopFlatten/loop-flatten.ll
The file was addedllvm/lib/Transforms/Scalar/LoopFlatten.cpp