SuccessChanges

Summary

  1. Revert "[LoopNest][LoopFlatten] Change LoopFlattenPass to LoopNest pass" (details)
  2. Revert "[LoopNest][LoopFlatten] Change LoopFlattenPass to LoopNest pass" (details)
  3. [ConstantFolding] Fix -Wunused-variable warning (NFC) (details)
  4. [clang] [MinGW] Fix gcc version detection/picking (details)
  5. Revert "[scudo] Check if MADV_DONTNEED zeroes memory" (details)
  6. [NFC][scudo] Re-enable check in the test (details)
  7. [cmake][scudo] Add missing headers (details)
  8. [WebAssembly][CodeGen] IR support for WebAssembly local variables (details)
  9. [AMDGPU] Precommit test (details)
  10. [AMDGPU] Fix function calls with flat scratch (details)
  11. Revert "[LAA] Support pointer phis in loop by analyzing each incoming pointer." (details)
  12. [NFC][Transforms][Utils] remove useless variable in CloneBasicBlock (details)
  13. ARM: support mandatory tail calls for tailcc & swifttailcc (details)
  14. SwiftTailCC: teach verifier musttail rules applicable to this CC. (details)
Commit 7e06cf8f1ba2263b52f91f96aca01ff033d96cd9 by eopxd
Revert "[LoopNest][LoopFlatten] Change LoopFlattenPass to LoopNest pass"

This reverts commit ffc4d3e06855550a8bd2a691f6d05828d5bf4ddf.
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/include/llvm/Transforms/Scalar/LoopFlatten.h
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/lib/Transforms/Scalar/LoopFlatten.cpp
Commit e96d6f4821bf3fa11760da7950055571117ab25e by eopxd
Revert "[LoopNest][LoopFlatten] Change LoopFlattenPass to LoopNest pass"

This reverts commit 7952ddb21fb7e086d5a6f97767f235d2f6ae2176.

Differential Revision: https://reviews.llvm.org/D103302
The file was modifiedllvm/include/llvm/Transforms/Scalar/LoopFlatten.h
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/lib/Passes/PassRegistry.def
The file was modifiedllvm/lib/Transforms/Scalar/LoopFlatten.cpp
Commit f2264ebb087272d49e2216476a62f3208ba5a1ea by nullptr.cpp
[ConstantFolding] Fix -Wunused-variable warning (NFC)

GCC warning:
```
/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp: In function ‘llvm::Constant* llvm::ConstantFoldLoadFromConstPtr(llvm::Constant*, llvm::Type*, const llvm::DataLayout&)’:
/llvm-project/llvm/lib/Analysis/ConstantFolding.cpp:713:19: warning: unused variable ‘SimplifiedGEP’ [-Wunused-variable]
  713 |         if (auto *SimplifiedGEP = dyn_cast<GEPOperator>(Simplified)) {
      |                   ^~~~~~~~~~~~~
```
The file was modifiedllvm/lib/Analysis/ConstantFolding.cpp
Commit f59cd8a4a606643e7248cecc239e0d229feb3320 by martin
[clang] [MinGW] Fix gcc version detection/picking

Actually compare each version to the version of the last chosen one.

There's no guarantee that the added test case does showcase the
previous issue (it depends on the order that directory entries
are returned when iterating), but with the issue fixed it should behave
deterministically in any case.

Also improve the match patterns in the mingw-sysroot.cpp test a bit.

Differential Revision: https://reviews.llvm.org/D102873
The file was addedclang/test/Driver/Inputs/mingw_ubuntu_posix_tree/usr/lib/gcc/x86_64-w64-mingw32/10.2-posix/include/c++/backward/.keep
The file was modifiedclang/test/Driver/mingw-sysroot.cpp
The file was modifiedclang/test/Driver/mingw.cpp
The file was modifiedclang/lib/Driver/ToolChains/MinGW.cpp
The file was addedclang/test/Driver/Inputs/mingw_ubuntu_posix_tree/usr/lib/gcc/x86_64-w64-mingw32/10.2-posix/include-fixed/.keep
The file was addedclang/test/Driver/Inputs/mingw_ubuntu_posix_tree/usr/lib/gcc/x86_64-w64-mingw32/10.2-posix/include/c++/x86_64-w64-mingw32/.keep
Commit 4458e8c4b42f3ebd44f909ffc0836224b7141d2e by Vitaly Buka
Revert "[scudo] Check if MADV_DONTNEED zeroes memory"

This reverts commit d423509b8036c29bbf94dab192d12097555ce0f8.

We are going to use patched QEMU.
The file was modifiedcompiler-rt/lib/scudo/standalone/linux.cpp
Commit a6e5a4b464bebb60f4fdfc27700aa37bbfa3fc54 by Vitaly Buka
[NFC][scudo] Re-enable check in the test

It should pass with patched QEMU.
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/common_test.cpp
Commit bd04d78d649bec9b0e10c42d7dcf48af38c3b8f4 by Vitaly Buka
[cmake][scudo] Add missing headers
The file was modifiedcompiler-rt/lib/scudo/standalone/CMakeLists.txt
Commit 00ecf18979e3326b3afee8af3dc701c53ffdc93f by wingo
[WebAssembly][CodeGen] IR support for WebAssembly local variables

This patch adds TargetStackID::WasmLocal.  This stack holds locations of
values that are only addressable by name -- not via a pointer to memory.
For the WebAssembly target, these objects are lowered to WebAssembly
local variables, which are managed by the WebAssembly run-time and are
not addressable by linear memory.

For the WebAssembly target IR indicates that an AllocaInst should be put
on TargetStackID::WasmLocal by putting it in the non-integral address
space WASM_ADDRESS_SPACE_WASM_VAR, with value 1.  SROA will mostly lift
these allocations to SSA locals, but any alloca that reaches instruction
selection (usually in non-optimized builds) will be assigned the new
TargetStackID there.  Loads and stores to those values are transformed
to new WebAssemblyISD::LOCAL_GET / WebAssemblyISD::LOCAL_SET nodes,
which then lower to the type-specific LOCAL_GET_I32 etc instructions via
tablegen patterns.

Differential Revision: https://reviews.llvm.org/D101140
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
The file was addedllvm/test/CodeGen/WebAssembly/ir-locals.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h
The file was addedllvm/test/CodeGen/WebAssembly/ir-locals-stackid.ll
The file was modifiedllvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.h
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
The file was modifiedllvm/include/llvm/CodeGen/MIRYamlMapping.h
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyISD.def
The file was modifiedllvm/lib/Target/WebAssembly/Utils/WebAssemblyUtilities.cpp
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
The file was modifiedllvm/include/llvm/CodeGen/TargetFrameLowering.h
Commit 6133b60a27fe0b89a96d5e10f28b2d9fd68d668f by sebastian.neubauer
[AMDGPU] Precommit test

Add scratch run to gfx-callable-argument-types.ll.
The file was modifiedllvm/test/CodeGen/AMDGPU/gfx-callable-argument-types.ll
Commit 690f5b7a0128a210093e9b217932743ad35b5c5a by sebastian.neubauer
[AMDGPU] Fix function calls with flat scratch

When flat scratch is used, the stack pointer needs to be added when
writing arguments to the stack.
For buffer instructions, this is done in SelectMUBUFScratchOffen
and SelectMUBUFScratchOffset.

Move that to call argument lowering, like it is done in GlobalISel.

Differential Revision: https://reviews.llvm.org/D103166
The file was modifiedllvm/test/CodeGen/AMDGPU/callee-special-input-vgprs-packed.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/gfx-callable-argument-types.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/callee-special-input-vgprs.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/non-entry-alloca.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
Commit ec1f6f7e3f92d806d0f7e4d687173a150102ec5d by flo
Revert "[LAA] Support pointer phis in loop by analyzing each incoming pointer."

This reverts commit 1ed7f8ede564c3b11da4fdca30c36ccbff422576.

This change can cause loop-distribute to crash in some cases. Revert
until I have more time to wrap up a fix.

See  PR50296, PR5028 and D102266.
The file was modifiedllvm/test/Analysis/LoopAccessAnalysis/pointer-phis.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/vectorize-pointer-phis.ll
The file was modifiedllvm/lib/Analysis/LoopAccessAnalysis.cpp
Commit 66ff1cbd71d21620bd303371ec989000d9e882b0 by dongaxis
[NFC][Transforms][Utils] remove useless variable in CloneBasicBlock
The file was modifiedllvm/lib/Transforms/Utils/CloneFunction.cpp
Commit d88f96dff3f192fc0c1bf57f7810b95a709b3591 by Tim Northover
ARM: support mandatory tail calls for tailcc & swifttailcc

This adds support for callee-pop conventions to the ARM backend so that it can
ensure a call marked "tail" is actually a tail call.
The file was modifiedllvm/lib/Target/ARM/ARMFastISel.cpp
The file was modifiedllvm/test/CodeGen/ARM/v8m-tail-call.ll
The file was modifiedllvm/test/CodeGen/ARM/peephole-callee-save-regalloc.mir
The file was addedllvm/test/CodeGen/ARM/fastcc-tailcall.ll
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was addedllvm/test/CodeGen/ARM/tailcc-call.ll
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.h
The file was modifiedllvm/lib/Target/ARM/ARMSubtarget.cpp
The file was addedllvm/test/CodeGen/ARM/swifttailcc-call.ll
The file was modifiedllvm/test/CodeGen/ARM/dbg-tcreturn.ll
The file was modifiedllvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
The file was modifiedllvm/lib/Target/ARM/ARMFrameLowering.cpp
The file was modifiedllvm/lib/Target/ARM/ARMCallingConv.td
The file was modifiedllvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp
The file was modifiedllvm/lib/Target/ARM/ARMInstrInfo.td
The file was modifiedllvm/lib/Target/ARM/ARMMachineFunctionInfo.h
The file was addedllvm/test/CodeGen/ARM/swifttailcc-fastisel.ll
Commit 9ff2eb1ea596a52ad2b5cfab826548c3af0a1e6e by Tim Northover
SwiftTailCC: teach verifier musttail rules applicable to this CC.

SwiftTailCC has a different set of requirements than the C calling convention
for a tail call. The exact argument sequence doesn't have to match, but fewer
ABI-affecting attributes are allowed.

Also make sure the musttail diagnostic triggers if a musttail call isn't
actually a tail call.
The file was addedllvm/test/CodeGen/ARM/tailcc-notail.ll
The file was modifiedllvm/docs/LangRef.rst
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was addedllvm/test/Verifier/swifttailcc-musttail-valid.ll
The file was addedllvm/test/Verifier/swifttailcc-musttail.ll
The file was modifiedllvm/lib/IR/Verifier.cpp
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
The file was addedllvm/test/CodeGen/AArch64/tailcc-notail.ll
The file was modifiedllvm/test/CodeGen/AArch64/swifttail-call.ll
The file was modifiedllvm/test/CodeGen/X86/tailcall-swifttailcc.ll
The file was addedllvm/test/CodeGen/X86/tailcc-notail.ll
The file was addedllvm/test/Verifier/tailcc-musttail.ll