SuccessChanges

Summary

  1. [AArch64] Remove a duplicate call to setHasWinCFI. NFCI. (details)
  2. [AArch64] Don't merge sp decrement into later stores when using WinCFI (details)
  3. [clangd] Split DecisionForest Evaluate() into one func per tree. (details)
  4. Reland  rG4fcd1a8e6528:[llvm-exegesis] Add option to check the hardware support for a given feature before benchmarking. (details)
  5. [mlir][Linalg] NFC : Move fusion on tensors to separate file. (details)
  6. [runtimes] Remove TOOLCHAIN_TOOLS specialization (details)
  7. [NFC] Let (MC)Register APIs check isStackSlot (details)
  8. [flang] Add checks for misuse of formatted I/O APIs in unformatted I/O statement (details)
  9. Allow to specify macro names for android-comparison-in-temp-failure-retry (details)
  10. [flang] Fix INQUIRE of access and formatting possibilities (details)
  11. [libc++] Don't re-export new/delete from libc++abi when they are defined in libc++ (details)
  12. [flang] Fix WRITE after BACKSPACE (details)
  13. Reland No.3: Add new hidden option -print-changed which only reports changes to IR (details)
  14. [libc++] NFC: Add missing SHA to ABI Changelog (details)
  15. [DSE] Look through memory PHI arguments when removing noop stores in MSSA. (details)
  16. [InstCombine] auto-generate complete test checks; NFC (details)
  17. [AST] do not error on APFloat invalidOp in default mode (details)
  18. [libc++][ci] Add a job to run the vanilla configuration on Apple (details)
  19. [Format] Don't treat compound extension headers (foo.proto.h) as foo.cc main-file header. (details)
  20. [LLD][PowerPC] Add support for R_PPC64_GOT_TLSGD_PCREL34 used in TLS General Dynamic (details)
Commit 51e74e21aae8b4e885e23d3f15922a58bc173c34 by martin
[AArch64] Remove a duplicate call to setHasWinCFI. NFCI.

The function already has a cleanup scope that calls the same whenever
the function is exited. When reading the code, seeing that this return
codepath has an explicit call while other return paths lack it is
confusing.

In the hypothetical case of a function having a prologue that
set the HasWinCFI flag in the MF, but the epilogue containing no
WinCFI instructions, the HasWinCFI flag in the MF would end up reset back
to false.

Differential Revision: https://reviews.llvm.org/D88636
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.cpp
Commit f4b9dfd9bc414a316d997a314b05ac7f9258a722 by martin
[AArch64] Don't merge sp decrement into later stores when using WinCFI

This matches the corresponding existing case in
AArch64LoadStoreOpt::findMatchingUpdateInsnForward.

Both cases could also be modified to check
MBBI->getFlag(FrameSetup/FrameDestroy) instead of forbidding any
optimization involving SP, but the effect is probably pretty much
the same.

Differential Revision: https://reviews.llvm.org/D88541
The file was modifiedllvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp
The file was modifiedllvm/test/CodeGen/AArch64/arm64-windows-calls.ll
Commit 45698ac0052ae5b1c5beb739636396a5b7263966 by usx
[clangd] Split DecisionForest Evaluate() into one func per tree.

This allows us MSAN to instrument this function. Previous version is not
instrumentable due to it shear volume.

Differential Revision: https://reviews.llvm.org/D88536
The file was modifiedclang-tools-extra/clangd/quality/CompletionModelCodegen.py
Commit cb3fd715f324ff0f58dfeb7d08a88a05477cb0d5 by vyng
Reland  rG4fcd1a8e6528:[llvm-exegesis] Add option to check the hardware support for a given feature before benchmarking.

This is mostly for the benefit of the LBR latency mode.
Right now, it performs no checking. If this is run on non-supported hardware, it will produce all zeroes for latency.

      Differential Revision: https://reviews.llvm.org/D85254

New change: Updated lit.local.cfg to use pass the right argument to llvm-exegesis to actually request the LBR mode.

Differential Revision: https://reviews.llvm.org/D88670
The file was modifiedllvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp
The file was modifiedllvm/test/tools/llvm-exegesis/X86/lbr/lit.local.cfg
The file was modifiedllvm/tools/llvm-exegesis/lib/X86/X86Counter.h
The file was modifiedllvm/tools/llvm-exegesis/lib/X86/Target.cpp
The file was modifiedllvm/tools/llvm-exegesis/llvm-exegesis.cpp
The file was modifiedllvm/tools/llvm-exegesis/lib/Target.h
Commit c6ea095b9756dff035aed27e7b5b44bf42d22462 by ravishankarm
[mlir][Linalg] NFC : Move fusion on tensors to separate file.

Differential Revision: https://reviews.llvm.org/D88633
The file was addedmlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
Commit dcb5b6dfbfb5dafb66797e8dba2f04eb76a153b7 by smeenai
[runtimes] Remove TOOLCHAIN_TOOLS specialization

https://reviews.llvm.org/D88310 fixed the AIX issue in LLVMExternalProjectUtils,
so we shouldn't need the workaround in the runtimes build anymore. I'm
reverting it because it prevents the target-specific tool selection in
LLVMExternalProjectUtils from taking effect, which we rely on for our
runtimes builds.

Reviewed By: daltenty

Differential Revision: https://reviews.llvm.org/D88627
The file was modifiedllvm/runtimes/CMakeLists.txt
Commit 17640c5aac649c154959ca1075953f0d252a4a5b by mtrofin
[NFC] Let (MC)Register APIs check isStackSlot

The user is expected to make the isStackSlot check before calling isPhysicalRegister
or isVirtualRegister. The APIs assert otherwise. We can improve the usability
of these APIs by carrying out the check in the 2 APIs: they become a
complete "source of truth" and remove an extra responsibility from the
user.

Differential Revision: https://reviews.llvm.org/D88598
The file was modifiedllvm/include/llvm/CodeGen/Register.h
The file was modifiedllvm/include/llvm/MC/MCRegister.h
Commit cdfb95ad580fbf366a9bffc5082df22e9d2b5fa3 by pklausler
[flang] Add checks for misuse of formatted I/O APIs in unformatted I/O statement

Add checking to I/O statement APIs to catch cases where the formatted
I/O data item transfer routines like OutputInteger64 are being
incorrectly used for unformatted I/O, which should use the
unformatted block or descriptor-based data item interfaces.

Differential revision: https://reviews.llvm.org/D88672
The file was modifiedflang/runtime/io-api.h
The file was modifiedflang/runtime/type-code.cpp
The file was modifiedflang/runtime/io-stmt.h
The file was modifiedflang/runtime/unit.cpp
The file was modifiedflang/runtime/io-api.cpp
Commit 9d40fb808fd0fbd33eb3b50c20d7f402de5db91e by George Burgess IV
Allow to specify macro names for android-comparison-in-temp-failure-retry

Some projects do not use the TEMP_FAILURE_RETRY macro but define their
own one, as not to depend on glibc / Bionic details. By allowing the
user to override the list of macros, these projects can also benefit
from this check.

Differential Revision: https://reviews.llvm.org/D83144
The file was addedclang-tools-extra/test/clang-tidy/checkers/android-comparison-in-temp-failure-retry-custom-macro.c
The file was modifiedclang-tools-extra/clang-tidy/android/ComparisonInTempFailureRetryCheck.h
The file was modifiedclang-tools-extra/docs/clang-tidy/checks/android-comparison-in-temp-failure-retry.rst
The file was modifiedclang-tools-extra/clang-tidy/android/ComparisonInTempFailureRetryCheck.cpp
Commit df6de2222c66c5a1c62da0b10c35de432ddc270a by pklausler
[flang] Fix INQUIRE of access and formatting possibilities

Don't give false positives from INQUIRE about possible
access mode changes on connected units.  DIRECT and SEQUENTIAL
cannot be intermixed, apart from allowing DIRECT on a SEQUENTIAL
file with fixed-size records and positioning.  Nor can
FORMATTED and UNFORMATTED be interchanged.  On unconnected
files, the best that we can do is "UNKNOWN".

Differential revision: https://reviews.llvm.org/D88673
The file was modifiedflang/runtime/io-stmt.cpp
Commit 8654a0f8bbf3e28eb210c75c8c70c739de637226 by Louis Dionne
[libc++] Don't re-export new/delete from libc++abi when they are defined in libc++

This is a temporary workaround until the new/delete situation is made
better (i.e. we don't include new/delete in both libc++ and libc++abi
by default).
The file was modifiedlibcxxabi/src/CMakeLists.txt
The file was modifiedlibcxx/src/CMakeLists.txt
Commit e29c9d77f128e7ef9b2b5f8f09fb06b01a9dad3a by pklausler
[flang] Fix WRITE after BACKSPACE

A WRITE to an unformatted sequential variable-length unit after
a BACKSPACE needs to forget its previous knowledge of the length
of the record that's about to be overwritten, and a BACKSPACE
after an ENDFILE or at the start of the file needs to be a no-op.

Differential revision: https://reviews.llvm.org/D88675
The file was modifiedflang/runtime/unit.cpp
The file was modifiedflang/runtime/io-api.cpp
Commit 71124a9dbdcc76cd5efec8c148001a3f808bd769 by anhtuyen
Reland No.3: Add new hidden option -print-changed which only reports changes to IR

A new hidden option -print-changed is added along with code to support
printing the IR as it passes through the opt pipeline in the new pass
manager. Only those passes that change the IR are reported, with others
only having the banner reported, indicating that they did not change the
IR, were filtered out or ignored. Filtering of output via the
-filter-print-funcs is supported and a new supporting hidden option
-filter-passes is added. The latter takes a comma separated list of pass
names and filters the output to only show those passes in the list that
change the IR. The output can also be modified via the -print-module-scope
function.

The code introduces an abstract template base class that generalizes the
comparison of IRs that takes an IR representation as template parameter.
Derived classes provide overrides that provide an event based API
for generalized reporting of IRs as they are changed in the opt pipeline
through the new pass manager.

The first of several instantiations is provided that prints the IR
in a form similar to that produced by -print-after-all with the above
mentioned filtering capabilities. This version, and the others to
follow will be introduced at the upcoming developer's conference.

Reviewed By: aeubanks (Arthur Eubanks), yrouban (Yevgeny Rouban), ychen (Yuanfang Chen), MaskRay (Fangrui Song)

Differential Revision: https://reviews.llvm.org/D86360
The file was addedllvm/test/Other/change-printer.ll
The file was modifiedllvm/include/llvm/Passes/StandardInstrumentations.h
The file was modifiedllvm/lib/IR/LegacyPassManager.cpp
The file was modifiedllvm/lib/Passes/StandardInstrumentations.cpp
Commit a0119e56751c16e3104d6bd760bb1c114a79bce7 by Louis Dionne
[libc++] NFC: Add missing SHA to ABI Changelog
The file was modifiedlibcxx/lib/abi/CHANGELOG.TXT
Commit 6c25816d7b68e794a04ba0d7659178ab17252637 by zoecarver
[DSE] Look through memory PHI arguments when removing noop stores in MSSA.

Summary:
Adds support for "following" memory through MSSA PHI arguments. This will help catch more noop stores that exist between blocks.

Originally part of D79391.

Reviewers: fhahn, jfb, asbirlea

Differential Revision: https://reviews.llvm.org/D82588
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/noop-stores.ll
The file was removedllvm/test/Transforms/DeadStoreElimination/MSSA/simple-todo.ll
Commit 114e964dce9f18e8f3c25a3a4136e59ead9ae50c by spatel
[InstCombine] auto-generate complete test checks; NFC
The file was modifiedllvm/test/Transforms/InstCombine/bitreverse-known-bits.ll
Commit 686eb0d8ded9159b090c3ef7b33a422e1f05166e by spatel
[AST] do not error on APFloat invalidOp in default mode

If FP exceptions are ignored, we should not error out of compilation
just because APFloat indicated an exception.
This is required as a preliminary step for D88238
which changes APFloat behavior for signaling NaN convert() to set
the opInvalidOp exception status.

Currently, there is no way to trigger this error because convert()
never sets opInvalidOp. FP binops that set opInvalidOp also create
a NaN, so the path to checkFloatingPointResult() is blocked by a
different diagnostic:

  // [expr.pre]p4:
  //   If during the evaluation of an expression, the result is not
  //   mathematically defined [...], the behavior is undefined.
  // FIXME: C++ rules require us to not conform to IEEE 754 here.
  if (LHS.isNaN()) {
    Info.CCEDiag(E, diag::note_constexpr_float_arithmetic) << LHS.isNaN();
    return Info.noteUndefinedBehavior();
  }
  return checkFloatingPointResult(Info, E, St);

Differential Revision: https://reviews.llvm.org/D88664
The file was modifiedclang/lib/AST/ExprConstant.cpp
Commit ba9b15072c5aa6c6d89bcb8b4f7af9d546867292 by Louis Dionne
[libc++][ci] Add a job to run the vanilla configuration on Apple

Previously, we'd only have jobs testing the Apple cache on Apple platforms,
but libc++ should also work out-of-the-box.
The file was modifiedlibcxx/utils/ci/run-buildbot.sh
The file was modifiedlibcxx/utils/ci/buildkite-pipeline.yml
Commit c1b209cc61290f1ce1243470b825e0994645cb7d by hokein.wu
[Format] Don't treat compound extension headers (foo.proto.h) as foo.cc main-file header.

We receive internal bugs about this false positives after D86597.

Differential Revision: https://reviews.llvm.org/D88640.
The file was modifiedclang/lib/Tooling/Inclusions/HeaderIncludes.cpp
The file was modifiedclang/unittests/Format/SortIncludesTest.cpp
Commit 79122868f9a3909cfd94d51e9bfe960917a1be05 by stefanp
[LLD][PowerPC] Add support for R_PPC64_GOT_TLSGD_PCREL34 used in TLS General Dynamic

Add Thread Local Storage support for the 34 bit relocation R_PPC64_GOT_TLSGD_PCREL34 used in General Dynamic.

The compiler will produce code that looks like:
```
pla r3, x@got@tlsgd@pcrel            R_PPC64_GOT_TLSGD_PCREL34
bl __tls_get_addr@notoc(x@tlsgd)     R_PPC64_TLSGD
                                     R_PPC64_REL24_NOTOC
```
LLD should be able to correctly compute the relocation for  R_PPC64_GOT_TLSGD_PCREL34 as well as do the following two relaxations where possible:
General Dynamic to Local Exec:
```
paddi r3, r13, x@tprel
nop
```
and General Dynamic to Initial Exec:
```
pld r3, x@got@tprel@pcrel
add r3, r3, r13
```
Note:
This patch adds support for the PC Relative (no TOC) version of General Dynamic on top of the existing support for the TOC version of General Dynamic.
The ABI does not provide any way to tell by looking only at the relocation `R_PPC64_TLSGD` when it is being used in a TOC instruction sequence or and when it is being used in a no TOC sequence. The TOC sequence should always be 4 byte aligned. This patch adds one to the offset of the relocation when it is being used in a no TOC sequence. In this way LLD can tell by looking at the alignment of the offset of `R_PPC64_TLSGD` whether or not it is being used as part of a TOC or no TOC sequence.

Reviewed By: NeHuang, sfertile, MaskRay

Differential Revision: https://reviews.llvm.org/D87318
The file was modifiedlld/ELF/Arch/PPC64.cpp
The file was modifiedlld/ELF/Relocations.cpp
The file was addedlld/test/ELF/ppc64-tls-pcrel-gd.s