SuccessChanges

Summary

  1. [LICM] Don't require AST in LoopPromoter (NFC) (details)
  2. [mlir][Python] Add missing capsule->module and Context.create_module. (details)
  3. Reland [CFGuard] Add address-taken IAT tables and delay-load support (details)
  4. [mlir-cuda-runner] Unbreak the build (details)
  5. Support: Add operator== for MemoryBufferRef and split out MemoryBufferRef.h (details)
  6. Support: Allow use of MemoryBufferRef with line_iterator (details)
  7. [AIX] Support two itanium alignment LIT testcases for AIX using regex (details)
  8. [gn build] Port f0875971249 (details)
  9. [AMDGPU] Add MC layer support for v_fmac_legacy_f32 (details)
  10. [mlir][Linalg] Lower padding attribute for pooling ops (details)
  11. [MLIR] Add a foldTrait() mechanism to allow traits to define folding and test it with an Involution trait (details)
  12. Basic: Simplify SourceManager::getBuffer overload, NFC (details)
  13. Remove unused SideEffectInterfaces header (details)
  14. PR47805: Use a single object for a function parameter in the caller and (details)
  15. Revert "PR47805: Use a single object for a function parameter in the caller and" (details)
Commit 3b31f05372f4ef881d0d11a2b8d339cd61b188df by nikita.ppv
[LICM] Don't require AST in LoopPromoter (NFC)

While promotion currently always has an AST available, it is only
relevant for invalidation purposes in LoopPromoter, so we do not
need to have it as a hard dependency.
The file was modifiedllvm/lib/Transforms/Scalar/LICM.cpp
Commit ad958f648e46680966375a93a3f2f1f5ee870671 by stellaraccident
[mlir][Python] Add missing capsule->module and Context.create_module.

* Extends Context/Operation interning to cover Module as well.
* Implements Module.context, Attribute.context, Type.context, and Location.context back-references (facilitated testing and also on the TODO list).
* Adds method to create an empty Module.
* Discovered missing in npcomp.

Differential Revision: https://reviews.llvm.org/D89294
The file was modifiedmlir/test/Bindings/Python/ir_types.py
The file was modifiedmlir/lib/Bindings/Python/IRModules.h
The file was modifiedmlir/test/Bindings/Python/ir_module.py
The file was modifiedmlir/test/Bindings/Python/ir_attributes.py
The file was modifiedmlir/test/Bindings/Python/ir_operation.py
The file was modifiedmlir/test/Bindings/Python/ir_location.py
The file was modifiedmlir/lib/Bindings/Python/IRModules.cpp
The file was modifiedmlir/include/mlir-c/Bindings/Python/Interop.h
Commit cfd8481da1adba1952e0f6ecd00440986e49a946 by aeubanks
Reland [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 modifiedlld/COFF/InputFiles.cpp
The file was modifiedlld/COFF/Symbols.h
The file was modifiedlld/COFF/Writer.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp
The file was modifiedlld/COFF/ICF.cpp
The file was modifiedlld/COFF/InputFiles.h
The file was addedllvm/test/CodeGen/WinCFGuard/cfguard-giats.ll
The file was modifiedlld/COFF/DLL.cpp
The file was addedlld/test/COFF/giats.s
The file was modifiedllvm/lib/MC/MCObjectFileInfo.cpp
The file was modifiedllvm/tools/llvm-readobj/COFFDumper.cpp
The file was modifiedllvm/include/llvm/MC/MCObjectFileInfo.h
Commit 97e48aadbd79184d1b3207c4f846c83e155be8dd by benny.kra
[mlir-cuda-runner] Unbreak the build

CMake Error at llvm/cmake/modules/AddLLVM.cmake:870 (add_dependencies):
  The dependency target "Core" of target "mlir-cuda-runner" does not exist.
Call Stack (most recent call first):
  llvm/cmake/modules/AddLLVM.cmake:1169 (add_llvm_executable)
  mlir/tools/mlir-cuda-runner/CMakeLists.txt:69 (add_llvm_tool)

CMake Error at llvm/cmake/modules/AddLLVM.cmake:870 (add_dependencies):
  The dependency target "LINK_COMPONENTS" of target "mlir-cuda-runner" does
  not exist.
Call Stack (most recent call first):
  llvm/cmake/modules/AddLLVM.cmake:1169 (add_llvm_executable)
  mlir/tools/mlir-cuda-runner/CMakeLists.txt:69 (add_llvm_tool)

CMake Error at llvm/cmake/modules/AddLLVM.cmake:870 (add_dependencies):
  The dependency target "Support" of target "mlir-cuda-runner" does not
  exist.
Call Stack (most recent call first):
  llvm/cmake/modules/AddLLVM.cmake:1169 (add_llvm_executable)
  mlir/tools/mlir-cuda-runner/CMakeLists.txt:69 (add_llvm_tool)
The file was modifiedmlir/tools/mlir-cuda-runner/CMakeLists.txt
Commit f0875971249b59b5a4c07cedc9633f0359cf6b73 by Duncan P. N. Exon Smith
Support: Add operator== for MemoryBufferRef and split out MemoryBufferRef.h

As preparation for changing `LineIterator` to work with `MemoryBufferRef`:

- Add an `operator==` that uses buffer pointer identity to ensure two buffers
  are equivalent.
- Split out `MemoryBufferRef.h`, to avoid polluting `LineIterator.h` includers
  with everything from `MemoryBuffer.h`. This also means moving the
  `MemoryBuffer` constructor to a source file.

Differential Revision: https://reviews.llvm.org/D89279
The file was addedllvm/lib/Support/MemoryBufferRef.cpp
The file was modifiedllvm/unittests/Support/CMakeLists.txt
The file was modifiedllvm/include/llvm/Support/MemoryBuffer.h
The file was addedllvm/unittests/Support/MemoryBufferRefTest.cpp
The file was addedllvm/include/llvm/Support/MemoryBufferRef.h
The file was modifiedllvm/lib/Support/CMakeLists.txt
The file was modifiedllvm/unittests/Support/MemoryBufferTest.cpp
Commit f2b7d9f7faa2788e362a91761a1624fb6b020851 by Duncan P. N. Exon Smith
Support: Allow use of MemoryBufferRef with line_iterator

Split out from https://reviews.llvm.org/D66782, use `Optional<MemoryBufferRef>`
in `line_iterator` so you don't need access to a `MemoryBuffer*`.  Follow up
patches in `clang/` will leverage this.

Differential Revision: https://reviews.llvm.org/D89280
The file was modifiedllvm/lib/Support/LineIterator.cpp
The file was modifiedllvm/unittests/Support/LineIteratorTest.cpp
The file was modifiedllvm/include/llvm/Support/LineIterator.h
Commit 4c10d6508f546ee986df0994663984cb15354c08 by Xiangling.Liao
[AIX] Support two itanium alignment LIT testcases for AIX using regex

AIX has different layout dumping format from other itanium ABIs.
And for these two cases, use regex to match AIX format.

Differential Revision: https://reviews.llvm.org/D89064
The file was modifiedclang/test/Layout/itanium-pack-and-align.cpp
The file was modifiedclang/test/Layout/itanium-union-bitfield.cpp
Commit 76c7a6d6cd152dcddae977fefe5fe0420da467af by llvmgnsyncbot
[gn build] Port f0875971249
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
Commit edc37baca6d6e4f28b7f4136e3263d3f1c3199f1 by jay.foad
[AMDGPU] Add MC layer support for v_fmac_legacy_f32

This instruction was introduced in GFX10.3, reusing the opcode of
v_mac_legacy_f32 from GFX10.1.

Differential Revision: https://reviews.llvm.org/D89247
The file was modifiedllvm/test/MC/Disassembler/AMDGPU/gfx1030_dasm_new.txt
The file was modifiedllvm/test/MC/AMDGPU/gfx1030_new.s
The file was modifiedllvm/lib/Target/AMDGPU/VOP2Instructions.td
The file was modifiedllvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
The file was addedllvm/test/MC/AMDGPU/gfx1030_unsupported.s
The file was modifiedllvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
The file was modifiedllvm/test/MC/AMDGPU/gfx1011_err.s
Commit 44865e9169f625b78b7198c0f3f11d9330b01f06 by ravishankarm
[mlir][Linalg] Lower padding attribute for pooling ops

Update linalg-to-loops lowering for pooling operations to perform
padding of the input when specified by the corresponding attribute.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D88911
The file was modifiedmlir/test/Dialect/Linalg/loops.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Loops.cpp
Commit c0b3abd19a3eaaaeeb9e6df47b3dfed4b767e974 by joker.eph
[MLIR] Add a foldTrait() mechanism to allow traits to define folding and test it with an Involution trait

This is the same diff as https://reviews.llvm.org/D88809/ except side effect
free check is removed for involution and a FIXME is added until the dependency
is resolved for shared builds. The old diff has more details on possible fixes.

Reviewed By: rriddle, andyly

Differential Revision: https://reviews.llvm.org/D89333
The file was modifiedmlir/docs/Traits.md
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/lib/IR/Operation.cpp
The file was addedmlir/test/mlir-tblgen/trait.mlir
The file was modifiedmlir/include/mlir/IR/OpDefinition.h
The file was addedmlir/test/lib/Dialect/Test/TestTraits.cpp
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/test/lib/Dialect/Test/TestOps.td
The file was modifiedmlir/test/lib/Dialect/Test/CMakeLists.txt
Commit e7fe3c6dfede8d5781bd000741c3dea7088307a4 by Duncan P. N. Exon Smith
Basic: Simplify SourceManager::getBuffer overload, NFC

Avoid duplicating code unnecessarily. No functionality change.
The file was modifiedclang/include/clang/Basic/SourceManager.h
Commit b49787df9a535f03761c340dca7ec3ec1155133d by gcmn
Remove unused SideEffectInterfaces header

This change removes an unnecessary header introduced in
https://github.com/llvm/llvm-project/commit/c0b3abd19a3e.

Differential Revision: https://reviews.llvm.org/D89347
The file was modifiedmlir/lib/IR/Operation.cpp
Commit 8d03a972ce8e92815ffe3d5d86aa027605ed92e2 by richard
PR47805: Use a single object for a function parameter in the caller and
callee in constant evaluation.

We previously made a deep copy of function parameters of class type when
passing them, resulting in the destructor for the parameter applying to
the original argument value, ignoring any modifications made in the
function body. This also meant that the 'this' pointer of the function
parameter could be observed changing between the caller and the callee.

This change completely reimplements how we model function parameters
during constant evaluation. We now model them roughly as if they were
variables living in the caller, albeit with an artificially reduced
scope that covers only the duration of the function call, instead of
modeling them as temporaries in the caller that we partially "reparent"
into the callee at the point of the call. This brings some minor
diagnostic improvements, as well as significantly reduced stack usage
during constant evaluation.
The file was modifiedclang/test/SemaCXX/c99-variable-length-array.cpp
The file was modifiedclang/test/OpenMP/critical_messages.cpp
The file was modifiedclang/test/SemaCUDA/constexpr-variables.cu
The file was modifiedclang/test/SemaCXX/warn-vla.cpp
The file was modifiedclang/test/SemaCXX/vla-construct.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp
The file was modifiedclang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp
The file was modifiedclang/test/Sema/c89.c
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp
The file was modifiedclang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp
The file was modifiedclang/test/SemaTemplate/typo-dependent-name.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_safelen_messages.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp
The file was modifiedclang/test/SemaCXX/constant-expression-cxx11.cpp
The file was modifiedclang/test/SemaCXX/cxx2a-consteval.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp
The file was modifiedclang/test/Sema/builtin-expect-with-probability-avr.cpp
The file was modifiedclang/test/SemaCXX/constant-expression-cxx2a.cpp
The file was modifiedclang/test/SemaCXX/integer-overflow.cpp
The file was modifiedclang/test/Sema/builtin-expect-with-probability.cpp
The file was modifiedclang/test/CXX/except/except.spec/p1.cpp
The file was modifiedclang/test/SemaCXX/c99-variable-length-array-cxx11.cpp
The file was modifiedclang/lib/AST/ExprConstant.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp
The file was modifiedclang/test/CXX/expr/expr.const/p2-0x.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_simdlen_messages.cpp
Commit ab870f3030fc288cd101905d730ef3425da5ac16 by richard
Revert "PR47805: Use a single object for a function parameter in the caller and"

The buildbots are displeased.

This reverts commit 8d03a972ce8e92815ffe3d5d86aa027605ed92e2.
The file was modifiedclang/test/CXX/except/except.spec/p1.cpp
The file was modifiedclang/test/Sema/builtin-expect-with-probability-avr.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp
The file was modifiedclang/test/Sema/c89.c
The file was modifiedclang/test/OpenMP/critical_messages.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp
The file was modifiedclang/test/SemaTemplate/typo-dependent-name.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_safelen_messages.cpp
The file was modifiedclang/lib/AST/ExprConstant.cpp
The file was modifiedclang/test/SemaCUDA/constexpr-variables.cu
The file was modifiedclang/test/SemaCXX/c99-variable-length-array.cpp
The file was modifiedclang/test/SemaCXX/warn-vla.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp
The file was modifiedclang/test/Sema/builtin-expect-with-probability.cpp
The file was modifiedclang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp
The file was modifiedclang/test/OpenMP/distribute_simd_simdlen_messages.cpp
The file was modifiedclang/test/SemaCXX/constant-expression-cxx11.cpp
The file was modifiedclang/test/SemaCXX/constant-expression-cxx2a.cpp
The file was modifiedclang/test/SemaCXX/vla-construct.cpp
The file was modifiedclang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp
The file was modifiedclang/test/SemaCXX/c99-variable-length-array-cxx11.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp
The file was modifiedclang/test/SemaCXX/cxx1z-class-template-argument-deduction.cpp
The file was modifiedclang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp
The file was modifiedclang/test/SemaCXX/integer-overflow.cpp
The file was modifiedclang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp
The file was modifiedclang/test/CXX/expr/expr.const/p2-0x.cpp
The file was modifiedclang/test/SemaCXX/cxx2a-consteval.cpp