Changes

Summary

  1. [NewPM] Add missing LTO ArgPromotion pass (details)
  2. [lldb] Allow to register frame recognizers applied beyond the first instruction (details)
  3. test-release.sh: remove an unused reference to the old svn repo (details)
  4. [mlir][spirv] Use type dyn_cast when scanning spv.GlobalVariable (details)
  5. [Support] Remove redundant calls to str() and c_str() (NFC) (details)
  6. [X86] Remove X86LowerAMXType::getRowFromCol from X86LowerAMXType.cpp (details)
  7. [SCEV] Assert unique pointer base (NFC) (details)
  8. [SCEVExpander] Assert single pointer op in add (NFC) (details)
  9. [SCEVExpander] Remove unnecessary mul/udiv check (NFC) (details)
  10. [ELF] Remove unused processRelocAux argument. NFC (details)
  11. [SCEVExpander] Reuse removePointerBase() for canonical addrecs (details)
  12. [ELF] Move handleTlsRelocations. NFC (details)
  13. [ELF] Untangle TLS IE and regular GOT from addGotEntry for non-mips. NFC (details)
  14. [ELF] Simplify addGotEntry. NFC (details)
  15. [clang-format] Add PackConstructorInitializers backward compat test (details)
  16. [InstCombine] Remove invariant group intrinsincs when comparing against null (details)
  17. [X86] Support __SSC_MARK(const int id) (details)
  18. [mlir][Analysis] Add batched version of FlatAffineConstraints::addId (details)
  19. Revert "[X86] Support __SSC_MARK(const int id)" (details)
  20. [X86] Support __SSC_MARK(const int id) (details)
  21. [AIX] "aligned" attribute does not decrease alignment (details)
  22. [mlir][SCF] Canonicalize dim(x) where x is an iter_arg (details)
  23. Revert "[X86] Support __SSC_MARK(const int id)" (details)
  24. [X86] Support __SSC_MARK(const int id) (details)
  25. [libc][NFC] Add a check to catch mismatch in internal and public mutex types. (details)
  26. [PowerPC] Set branch/call instructions as no hasSideEffects (details)
  27. [libc] Ensure the result of the clone syscall is not on stack in thrd_create. (details)
Commit b28c3b9d9f4292d7779a0e2661d308f1230c6ecd by nikita.ppv
[NewPM] Add missing LTO ArgPromotion pass

This is a followup to D96780 to add one more pass missing from the
NewPM LTO pipeline. The missing ArgPromotion run is inserted at
the same position as in the LegacyPM, resolving the already
present FIXME:
https://github.com/llvm/llvm-project/blob/16086d47c0d0cd08ffae8e69a69c88653e654d01/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp#L1096-L1098

The compile-time impact is minimal with ~0.1% geomean regression
on CTMark.

Differential Revision: https://reviews.llvm.org/D108866
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/test/Other/new-pm-lto-defaults.ll
Commit 54c496dad6f28f1ab663f1b30401fe460709d50d by medismail.bennani
[lldb] Allow to register frame recognizers applied beyond the first instruction

It is currently possible to register a frame recognizer, but it will be applied if and only if the frame's PC points to the very first instruction of the specified function, which limits usability of this feature.

The implementation already supports changing this behaviour by passing an additional flag, but it's not possible to set it via the command interface. Fix that.

Reviewed By: jingham

Differential Revision: https://reviews.llvm.org/D108510
The file was modifiedlldb/source/Commands/Options.td
The file was modifiedlldb/test/API/commands/frame/recognizer/TestFrameRecognizer.py
The file was modifiedlldb/source/Commands/CommandObjectFrame.cpp
Commit c58c0993c9f336a108f1ff65df8d8241bc4ba6d2 by sylvestre
test-release.sh: remove an unused reference to the old svn repo
The file was modifiedllvm/utils/release/test-release.sh
Commit a5621e26dbc90be3d5af164978f6fcc398f0a1d1 by antiagainst
[mlir][spirv] Use type dyn_cast when scanning spv.GlobalVariable

This avoids crashes when there are spv.GlobalVariable without
pointer type.
The file was modifiedmlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp
Commit 96d329455501dd9f7b38c6f4c5d54c7e13247dd1 by kazu
[Support] Remove redundant calls to str() and c_str() (NFC)

Identified with readability-redundant-string-cstr.
The file was modifiedllvm/lib/Support/FileUtilities.cpp
Commit 55ba1de7c516b7ef736a127e8fe38229da5aae1d by vince.a.bridgers
[X86] Remove X86LowerAMXType::getRowFromCol from X86LowerAMXType.cpp

Remove method X86LowerAMXType::getRowFromCol since it's not used, and
it's causing a warning.

Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D108862
The file was modifiedllvm/lib/Target/X86/X86LowerAMXType.cpp
Commit e6a5dd60ffa3073c0ab69f9b1836cf2e743bcf0c by nikita.ppv
[SCEV] Assert unique pointer base (NFC)

Add expressions can contain at most one pointer operand nowadays,
assert that in getPointerBase() and removePointerBase().
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 3f162e8e6da14726c7666f5c935c503fcb784a41 by nikita.ppv
[SCEVExpander] Assert single pointer op in add (NFC)

There can only be one pointer operand in an add expression, and
we have sorted operands to guarantee that it is the first. As
such, the pointer check for other operands is dead code.
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
Commit 0886fd5b3a374525c382145deee7049ec1d0fe91 by nikita.ppv
[SCEVExpander] Remove unnecessary mul/udiv check (NFC)

Pointer-typed SCEV expressions can no longer be mul or udiv, so
we do not need to specially handle them here.
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
Commit 204b2902d5f3cfbefdc58d81048d0688cb7be972 by i
[ELF] Remove unused processRelocAux argument. NFC
The file was modifiedlld/ELF/Relocations.cpp
Commit 9f7873784dcce4177a759fc657b267d2f189bcf0 by nikita.ppv
[SCEVExpander] Reuse removePointerBase() for canonical addrecs

ExposePointerBase() in SCEVExpander implements basically the same
functionality as removePointerBase() in SCEV, so reuse it.

The SCEVExpander code assumes that the pointer operand on adds is
the last one -- I'm not sure that always holds. As such this might
not be strictly NFC.
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
Commit 18611606978a241aac15d31e7dc38c6f070953b7 by i
[ELF] Move handleTlsRelocations. NFC

Prepare for addGotEntry simplification.
The file was modifiedlld/ELF/Relocations.cpp
Commit d3fdc312b21a0ac7f4ea851759460b65c8d85b0a by i
[ELF] Untangle TLS IE and regular GOT from addGotEntry for non-mips. NFC
The file was modifiedlld/ELF/Relocations.cpp
Commit 3726039561421a3e71a436f41ee95634095598de by i
[ELF] Simplify addGotEntry. NFC
The file was modifiedlld/ELF/Relocations.cpp
Commit 4b1fde8a2b681dad2ce0c082a5d6422caa06b0bc by owenca
[clang-format] Add PackConstructorInitializers backward compat test

Add backward compatibility tests for mapping the deprecated
ConstructorInitializerAllOnOneLineOrOnePerLine and
AllowAllConstructorInitializersOnNextLine to
PackConstructorInitializers.

Differential Revision: https://reviews.llvm.org/D108882
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/Format.cpp
Commit 099e4bcd5d069a744cf6df114f4e412755c4e59f by aeubanks
[InstCombine] Remove invariant group intrinsincs when comparing against null

We cannot leak any equivalency information by comparing against null
since null never has virtual metadata associated with it (when null is
not a valid dereferenceable pointer).

Instcombine seems to make sure that a null will be on the RHS, so we
don't have to check both operands.

This fixes a missed optimization in llvm-test-suite's MultiSource lambda
benchmark under -fstrict-vtable-pointers.

Reviewed By: Prazek

Differential Revision: https://reviews.llvm.org/D108734
The file was modifiedllvm/test/Transforms/InstCombine/invariant.group.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
Commit 83e82ff767530158fd5590ffea617f50a07534b5 by xiang1.zhang
[X86] Support __SSC_MARK(const int id)

Differential Revision: https://reviews.llvm.org/D108682
The file was addedclang/test/CodeGen/X86/x86-ssc-mark.c
The file was modifiedclang/lib/Headers/x86gprintrin.h
Commit eedc997b7d4ce9fe4495b0751babb577bbe2de8a by springerm
[mlir][Analysis] Add batched version of FlatAffineConstraints::addId

* Add batched version of all `addId` variants, so that multiple IDs can be added at a time.
* Rename `addId` and variants to `insertId` and `appendId`. Most external users call `appendId`. Splitting `addId` into two functions also makes it possible to provide batched version for both. (Otherwise, the overloads are ambigious when calling `addId`.)

Differential Revision: https://reviews.llvm.org/D108532
The file was modifiedmlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
The file was modifiedmlir/include/mlir/Analysis/AffineStructures.h
The file was modifiedmlir/lib/Analysis/AffineAnalysis.cpp
The file was modifiedmlir/lib/Analysis/AffineStructures.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
Commit fd88fac6ca3967e85906dfd059f512c0cee3fdaf by xiang1.zhang
Revert "[X86] Support __SSC_MARK(const int id)"

This reverts commit 83e82ff767530158fd5590ffea617f50a07534b5.
The file was modifiedclang/lib/Headers/x86gprintrin.h
The file was removedclang/test/CodeGen/X86/x86-ssc-mark.c
Commit 78fbde57794e50f5629979f5d69592caf64067e3 by xiang1.zhang
[X86] Support __SSC_MARK(const int id)

Differential Revision: https://reviews.llvm.org/D108682
The file was addedclang/test/CodeGen/X86/x86-ssc-mark.c
The file was modifiedclang/lib/Headers/x86gprintrin.h
Commit 71b170ccf36ee02e6a4c472bc1d3e89bbaf0e2b4 by wanyu9511
[AIX] "aligned" attribute does not decrease alignment

The "aligned" attribute can 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.

That said, we expect:
1. "aligned" attribute alone: does not interfere with the alignment upgrade instrumented by the AIX "power" alignment rule,
2. "aligned" attribute + typedef: overrides any computed alignment,
3. "aligned" attribute + "packed" attribute: overrides any computed alignment.
The old implementation achieved 2 and 3, but didn't get 1 right, in that any field marked attribute "aligned" would not go through the alignment upgrade.

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D107394
The file was addedclang/test/Layout/aix-type-align-and-pack-attr.cpp
The file was modifiedclang/lib/AST/RecordLayoutBuilder.cpp
The file was removedclang/test/Layout/aix-alignof-align-and-pack-attr.cpp
The file was modifiedclang/test/Layout/aix-power-alignment-typedef.cpp
Commit d18ffd61d4f2500dc4ae267f4705102abb2cf02f by springerm
[mlir][SCF] Canonicalize dim(x) where x is an iter_arg

* Add `DimOfIterArgFolder`.
* Move existing cross-dialect canonicalization patterns to `LoopCanonicalization.cpp`.
* Rename `SCFAffineOpCanonicalization` pass to `SCFForLoopCanonicalization`.
* Expand documentaton of scf.for: The type of loop-carried variables may not change with iterations. (Not even the dynamic type.)

Differential Revision: https://reviews.llvm.org/D108806
The file was modifiedmlir/include/mlir/Dialect/SCF/Passes.td
The file was addedmlir/test/Dialect/SCF/for-loop-canonicalization.mlir
The file was modifiedmlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
The file was modifiedmlir/include/mlir/Dialect/SCF/Transforms.h
The file was modifiedmlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/CodegenStrategy.cpp
The file was removedmlir/test/Dialect/SCF/canonicalize-affine-op.mlir
The file was modifiedmlir/test/lib/Dialect/Linalg/TestConvVectorization.cpp
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
The file was modifiedmlir/include/mlir/Dialect/SCF/SCFOps.td
The file was modifiedmlir/include/mlir/Dialect/SCF/Passes.h
The file was modifiedmlir/lib/Dialect/SCF/Transforms/PassDetail.h
The file was modifiedmlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
The file was addedmlir/lib/Dialect/SCF/Transforms/LoopCanonicalization.cpp
Commit 4c29dc18cf23d3a644158b567b8c3d471358e2bd by xiang1.zhang
Revert "[X86] Support __SSC_MARK(const int id)"

This reverts commit 78fbde57794e50f5629979f5d69592caf64067e3.
The file was removedclang/test/CodeGen/X86/x86-ssc-mark.c
The file was modifiedclang/lib/Headers/x86gprintrin.h
Commit 80f7ce89938874fb6b40ca5bafa1f5c4eca4746d by xiang1.zhang
[X86] Support __SSC_MARK(const int id)

Differential Revision: https://reviews.llvm.org/D108682
The file was addedclang/test/CodeGen/X86/x86-ssc-mark.c
The file was modifiedclang/lib/Headers/x86gprintrin.h
Commit f7e572b4f4a0339162f8bc168edfd9fa523c9c1e by sivachandra
[libc][NFC] Add a check to catch mismatch in internal and public mutex types.
The file was modifiedlibc/src/threads/linux/Mutex.h
Commit 3bdd850d0ce74bfcde91d0b34dbde8b9331fccb4 by qiucofan
[PowerPC] Set branch/call instructions as no hasSideEffects

PowerPC can model these instructions, so we don't need this flag set.

Reviewed By: shchenz, jsji

Differential Revision: https://reviews.llvm.org/D71983
The file was addedllvm/test/CodeGen/PowerPC/sink-side-effect.ll
The file was modifiedllvm/test/CodeGen/PowerPC/sink-down-more-instructions-1.mir
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.td
The file was modifiedllvm/lib/Target/PowerPC/PPCInstr64Bit.td
Commit 3383ec5fdd04be095678e0bd8bd1ce341f4f9294 by sivachandra
[libc] Ensure the result of the clone syscall is not on stack in thrd_create.

Also, added a call to munmap on error in thrd_create.
The file was modifiedlibc/src/threads/linux/thrd_create.cpp
The file was modifiedlibc/src/threads/linux/CMakeLists.txt