Changes

Summary

  1. [Attributor][FIX] Copy all members in the assignment operator (details)
  2. [OpenMP] Try to simplify all loads in device code (details)
  3. [ORC] Require ExecutorProcessControl when constructing an ExecutionSession. (details)
  4. [gn build] Port 2487db1f2862 (details)
  5. [clang][driver] NFC: Move InputInfo.h from lib to include (details)
  6. [clang][driver] NFC: Expose InputInfo in Job instead of plain filenames (details)
  7. [Debug-Info][llvm-dwarfdump] Don't try to dump location (details)
  8. [docs] Update release notes with all LLVM-C API changes (details)
  9. [LoopFlatten] Use SCEV and Loop APIs to identify increment and trip count (details)
  10. [ARM] Implement isLoad/StoreFromStackSlot for MVE stack stores accesses (details)
  11. [RISCV] Add tests showing missed vector saturating add/sub combines (details)
  12. [AArch64][SME] Add zero instruction (details)
  13. [clang][tooling] Accept Clang invocations with multiple jobs (details)
Commit c55e18824d2e0711682c67b98653c38f8b0ac463 by johannes
[Attributor][FIX] Copy all members in the assignment operator

Also improve debug output slightly.
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
The file was modifiedllvm/test/Transforms/Attributor/nodelete.ll
The file was modifiedllvm/test/Transforms/Attributor/value-simplify-pointer-info.ll
The file was modifiedllvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
The file was modifiedllvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll
The file was modifiedllvm/test/Transforms/Attributor/value-simplify.ll
The file was modifiedllvm/test/Transforms/Attributor/ArgumentPromotion/X86/attributes.ll
The file was modifiedllvm/test/Transforms/Attributor/internal-noalias.ll
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll
The file was modifiedllvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll
The file was modifiedllvm/test/Transforms/Attributor/ArgumentPromotion/profile.ll
The file was modifiedllvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll
The file was modifiedllvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
Commit 70b75f62fc617f1fa7e4859571a99137297146c6 by johannes
[OpenMP] Try to simplify all loads in device code

Eliminating loads/stores in the device code is worth the extra effort,
especially for the new device runtime.

At the same time we do not compute AAExecutionDomain for non-device code
anymore, there is no point.

Differential Revision: https://reviews.llvm.org/D106845
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
The file was modifiedllvm/lib/Transforms/IPO/OpenMPOpt.cpp
Commit 2487db1f286222e2501c2fa8e8244eda13f6afc3 by Lang Hames
[ORC] Require ExecutorProcessControl when constructing an ExecutionSession.

Wrapper function call and dispatch handler helpers are moved to
ExecutionSession, and existing EPC-based tools are re-written to take an
ExecutionSession argument instead.

Requiring an ExecutorProcessControl instance simplifies existing EPC based
utilities (which only need to take an ES now), and should encourage more
utilities to use the EPC interface. It also simplifies process termination,
since the session can automatically call ExecutorProcessControl::disconnect
(previously this had to be done manually, and carefully ordered with the
rest of JIT tear-down to work correctly).
The file was modifiedllvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/EPCDebugObjectRegistrar.cpp
The file was modifiedllvm/tools/lli/lli.cpp
The file was addedllvm/unittests/ExecutionEngine/Orc/ExecutionSessionWrapperFunctionCallsTest.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/LLJIT.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/Core.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h
The file was modifiedllvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
The file was modifiedllvm/unittests/ExecutionEngine/Orc/CMakeLists.txt
The file was modifiedllvm/examples/SpeculativeJIT/SpeculativeJIT.cpp
The file was modifiedllvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.h
The file was modifiedllvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
The file was modifiedllvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h
The file was modifiedllvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
The file was removedllvm/unittests/ExecutionEngine/Orc/ExecutorProcessControlTest.cpp
The file was modifiedllvm/tools/llvm-jitlink/llvm-jitlink.cpp
The file was modifiedllvm/tools/llvm-jitlink/llvm-jitlink.h
The file was modifiedllvm/unittests/ExecutionEngine/Orc/ObjectLinkingLayerTest.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
The file was modifiedllvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Core.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithTargetProcessControl/LLJITWithTargetProcessControl.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
The file was modifiedllvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/EPCEHFrameRegistrar.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/EPCEHFrameRegistrar.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/OrcRPCExecutorProcessControl.h
Commit 66640aa5aeaf2d46040f6ae2d8ff5a4a35ecb8dc by llvmgnsyncbot
[gn build] Port 2487db1f2862
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/Orc/BUILD.gn
Commit 60426f33b1d417763ca1954fba5293c959c9623d by Jan Svoboda
[clang][driver] NFC: Move InputInfo.h from lib to include

Moving `InputInfo.h` from `lib/Driver/` into `include/Driver` to be able to expose it in an API consumed from outside of `clangDriver`.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D106787
The file was modifiedclang/lib/Driver/ToolChains/Ananas.cpp
The file was modifiedclang/lib/Driver/ToolChains/AVR.cpp
The file was modifiedclang/lib/Driver/ToolChains/Cuda.cpp
The file was modifiedclang/lib/Driver/ToolChains/MSP430.cpp
The file was modifiedclang/lib/Driver/ToolChains/BareMetal.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/lib/Driver/ToolChains/Hexagon.cpp
The file was modifiedclang/lib/Driver/ToolChains/RISCVToolchain.cpp
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.h
The file was modifiedclang/lib/Driver/Job.cpp
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp
The file was modifiedclang/lib/Driver/Driver.cpp
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
The file was modifiedclang/lib/Driver/ToolChain.cpp
The file was modifiedclang/lib/Driver/ToolChains/Minix.cpp
The file was modifiedclang/lib/Driver/ToolChains/CloudABI.cpp
The file was modifiedclang/lib/Driver/ToolChains/NaCl.cpp
The file was modifiedclang/lib/Driver/ToolChains/AMDGPU.cpp
The file was modifiedclang/lib/Driver/ToolChains/MinGW.cpp
The file was modifiedclang/lib/Driver/ToolChains/AVR.h
The file was modifiedclang/lib/Driver/ToolChains/MSP430.h
The file was modifiedclang/lib/Driver/Tool.cpp
The file was removedclang/lib/Driver/InputInfo.h
The file was modifiedclang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
The file was addedclang/include/clang/Driver/InputInfo.h
Commit b76c7c6faf06bb02b7b7b6bba3f6eb8a33edcdca by Jan Svoboda
[clang][driver] NFC: Expose InputInfo in Job instead of plain filenames

This patch exposes `InputInfo` in `Job` instead of plain filenames. This is useful in a follow-up patch that uses this to recognize `-cc1` commands interesting for Clang tooling.

Depends on D106787.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D106788
The file was modifiedclang/lib/Driver/Job.cpp
The file was modifiedclang/include/clang/Driver/Job.h
The file was modifiedclang/unittests/Driver/ToolChainTest.cpp
Commit 14f6cfcf3cab34ec26474dc464a6a35589f582f7 by esme.yi
[Debug-Info][llvm-dwarfdump] Don't try to dump location
list for attributes that don't have the loclist class.

Summary: The overflow error occurs when we try to dump
location list for those attributes that do not have the
loclist class, like DW_AT_count and DW_AT_byte_size.
After re-reviewed the entire list, I sorted those
attributes into two parts, one for dumping location list
and one for dumping the location expression.

Reviewed By: probinson

Differential Revision: https://reviews.llvm.org/D105613
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFAttribute.h
The file was addedllvm/test/tools/llvm-dwarfdump/X86/formclass3.s
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDie.cpp
The file was modifiedllvm/lib/DWARFLinker/DWARFLinker.cpp
Commit 3c7fd8df3b843b007edac9afe8a3369797724f0f by Lang Hames
[docs] Update release notes with all LLVM-C API changes

Patch by Mats Larsen. Thanks Mats!

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D106764
The file was modifiedllvm/docs/ReleaseNotes.rst
Commit 491ac2802805f65c0960ae6685f9599048517a97 by rosie.sumpter
[LoopFlatten] Use SCEV and Loop APIs to identify increment and trip count

Replace pattern-matching with existing SCEV and Loop APIs as a more
robust way of identifying the loop increment and trip count. Also
rename 'Limit' as 'TripCount' to be consistent with terminology.

Differential Revision: https://reviews.llvm.org/D106580
The file was modifiedllvm/lib/Transforms/Scalar/LoopFlatten.cpp
The file was modifiedllvm/test/Transforms/LoopFlatten/loop-flatten-negative.ll
Commit 54c91c0c74ba997d3c0ce86eca2a96bec4699f0e by david.green
[ARM] Implement isLoad/StoreFromStackSlot for MVE stack stores accesses

This implements the isLoadFromStackSlot and isStoreToStackSlot for MVE
MVE_VSTRWU32 and MVE_VLDRWU32 functions. They behave the same as many
other loads/stores, expecting a FI in Op1 and zero offset in Op2. At the
same time this alters VLDR_P0_off and VSTR_P0_off to use the same code
too, as they too should be returning VPR in Op0, take a FI in Op1 and
zero offset in Op2.

Differential Revision: https://reviews.llvm.org/D106797
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/mve-gather-increment.ll
Commit 80e0266577b0536bb6cae0d5be0aa3b572b50ef7 by fraser
[RISCV] Add tests showing missed vector saturating add/sub combines

These will be optimized by upcoming patches. The tests are primarily not
being optimized due to the lack of support for saturating vector
arithmetic in the RISC-V backend.

On top of that, however, a large percentage of the scalable-vector tests
are also lacking support in the DAGCombiner: either in
`ISD::matchBinaryPredicate` or due to checks specifically for
`BUILD_VECTOR` and not `SPLAT_VECTOR`.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D106649
The file was addedllvm/test/CodeGen/RISCV/rvv/combine-sats.ll
Commit 2e27c4e1f187446c84220f75e492f16807d21b12 by cullen.rhodes
[AArch64][SME] Add zero instruction

This patch adds the zero instruction for zeroing a list of 64-bit
element ZA tiles. The instruction takes a list of up to eight tiles
ZA0.D-ZA7.D, which must be in order, e.g.

  zero {za0.d,za1.d,za2.d,za3.d,za4.d,za5.d,za6.d,za7.d}
  zero {za1.d,za3.d,za5.d,za7.d}

The assembler also accepts 32-bit, 16-bit and 8-bit element tiles which
are mapped to corresponding 64-bit element tiles in accordance with the
architecturally defined mapping between different element size tiles,
e.g.

  * Zeroing ZA0.B, or the entire array name ZA, is equivalent to zeroing
    all eight 64-bit element tiles ZA0.D to ZA7.D.
  * Zeroing ZA0.S is equivalent to zeroing ZA0.D and ZA4.D.

The preferred disassembly of this instruction uses the shortest list of
tile names that represent the encoded immediate mask, e.g.

  * An immediate which encodes 64-bit element tiles ZA0.D, ZA1.D, ZA4.D and
    ZA5.D is disassembled as {ZA0.S, ZA1.S}.
  * An immediate which encodes 64-bit element tiles ZA0.D, ZA2.D, ZA4.D and
    ZA6.D is disassembled as {ZA0.H}.
  * An all-ones immediate is disassembled as {ZA}.
  * An all-zeros immediate is disassembled as an empty list {}.

This patch adds the MatrixTileList asm operand and related parsing to support
this.

Depends on D105570.

The reference can be found here:
https://developer.arm.com/documentation/ddi0602/2021-06

Reviewed By: david-arm

Differential Revision: https://reviews.llvm.org/D105575
The file was addedllvm/test/MC/AArch64/SME/zero-diagnostics.s
The file was addedllvm/test/MC/AArch64/SME/zero.s
The file was modifiedllvm/lib/Target/AArch64/AArch64RegisterInfo.td
The file was modifiedllvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
The file was modifiedllvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.h
The file was modifiedllvm/lib/Target/AArch64/SMEInstrFormats.td
The file was modifiedllvm/lib/Target/AArch64/AArch64SMEInstrInfo.td
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
Commit 11ee699b3c812ebe56ce5d3b14ab7ef16c1e8495 by Jan Svoboda
[clang][tooling] Accept Clang invocations with multiple jobs

When `-fno-integrated-as` is passed to the Clang driver (or set by default by a specific toolchain), it will construct an assembler job in addition to the cc1 job. Similarly, the `-fembed-bitcode` driver  flag will create additional cc1 job that reads LLVM IR file.

The Clang tooling library only cares about the job that reads a source file. Instead of relying on the fact that the client injected `-fsyntax-only` to the driver invocation to get a single `-cc1` invocation that reads the source file, this patch filters out such jobs from `Compilation` automatically and ignores the rest.

This fixes a test failure in `ClangScanDeps/headerwithname.cpp` and `ClangScanDeps/headerwithnamefollowedbyinclude.cpp` on AIX reported here: https://reviews.llvm.org/D103461#2841918 and `clang-scan-deps` failures with `-fembed-bitcode`.

Depends on D106788.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D105695
The file was modifiedclang/include/clang/Tooling/Tooling.h
The file was modifiedclang/unittests/Tooling/ToolingTest.cpp
The file was removedclang/test/Tooling/clang-check-offload.cpp
The file was modifiedclang/lib/Tooling/Tooling.cpp