SuccessChanges

Summary

  1. [libc++] Don't re-export new/delete from libc++abi when they are defined in libc++ (details)
  2. [flang] Fix WRITE after BACKSPACE (details)
  3. Reland No.3: Add new hidden option -print-changed which only reports changes to IR (details)
  4. [libc++] NFC: Add missing SHA to ABI Changelog (details)
  5. [DSE] Look through memory PHI arguments when removing noop stores in MSSA. (details)
  6. [InstCombine] auto-generate complete test checks; NFC (details)
  7. [AST] do not error on APFloat invalidOp in default mode (details)
  8. [libc++][ci] Add a job to run the vanilla configuration on Apple (details)
  9. [Format] Don't treat compound extension headers (foo.proto.h) as foo.cc main-file header. (details)
  10. [LLD][PowerPC] Add support for R_PPC64_GOT_TLSGD_PCREL34 used in TLS General Dynamic (details)
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 (diff)
The file was modifiedlibcxx/src/CMakeLists.txt (diff)
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/io-api.cpp (diff)
The file was modifiedflang/runtime/unit.cpp (diff)
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 modifiedllvm/lib/IR/LegacyPassManager.cpp (diff)
The file was addedllvm/test/Other/change-printer.ll
The file was modifiedllvm/lib/Passes/StandardInstrumentations.cpp (diff)
The file was modifiedllvm/include/llvm/Passes/StandardInstrumentations.h (diff)
Commit a0119e56751c16e3104d6bd760bb1c114a79bce7 by Louis Dionne
[libc++] NFC: Add missing SHA to ABI Changelog
The file was modifiedlibcxx/lib/abi/CHANGELOG.TXT (diff)
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 removedllvm/test/Transforms/DeadStoreElimination/MSSA/simple-todo.ll
The file was modifiedllvm/test/Transforms/DeadStoreElimination/MSSA/noop-stores.ll (diff)
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp (diff)
Commit 114e964dce9f18e8f3c25a3a4136e59ead9ae50c by spatel
[InstCombine] auto-generate complete test checks; NFC
The file was modifiedllvm/test/Transforms/InstCombine/bitreverse-known-bits.ll (diff)
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 (diff)
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/buildkite-pipeline.yml (diff)
The file was modifiedlibcxx/utils/ci/run-buildbot.sh (diff)
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/unittests/Format/SortIncludesTest.cpp (diff)
The file was modifiedclang/lib/Tooling/Inclusions/HeaderIncludes.cpp (diff)
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 (diff)
The file was modifiedlld/ELF/Relocations.cpp (diff)
The file was addedlld/test/ELF/ppc64-tls-pcrel-gd.s