SuccessChanges

Summary

  1. [clang] Fix reading long doubles with va_arg on x86_64 mingw (details)
  2. [X32] Add Triple::isX32(), use it. (details)
  3. [ELF] getRelocatedSection: remove the check for ET_REL object file (details)
  4. [lld/mac] Add reexports after reexporter to inputFiles (details)
  5. [mlir-lsp-server] Add support for hover on region operations (details)
  6. [mlir-lsp-server] Add support for hover on symbol references (details)
  7. [mlir-lsp-server] Fix bug in symbol use/def tracking (details)
  8. Revert "[AArch64] handle -Wa,-march=" (details)
  9. [Test] Add a JumpThreading test exposing a bug in BasicAA. (details)
  10. [BasicAA] Handle PHIs without incoming values gracefully (details)
  11. [SCEV] Properly guard reasoning about infinite loops being UB on mustprogress (details)
Commit 6de45b9e6a2c4b69ca82916a4cc1b4b8636d79b3 by martin
[clang] Fix reading long doubles with va_arg on x86_64 mingw

On x86_64 mingw, long doubles are always passed indirectly as
arguments (see an existing case in WinX86_64ABIInfo::classify);
generalize the existing code for reading varargs - any non-aggregate
type that is larger than 64 bits (which would be both long double
in mingw, and __int128) are passed indirectly too.

This makes reading varargs consistent with how they're passed,
fixing interop with both gcc and clang callers, for long double
and __int128.

Differential Revision: https://reviews.llvm.org/D103452
The file was modifiedclang/test/CodeGenCXX/ext-int.cpp
The file was modifiedclang/test/CodeGen/mingw-long-double.c
The file was modifiedclang/lib/CodeGen/TargetInfo.cpp
The file was modifiedclang/test/CodeGen/win64-i128.c
Commit 75521bd9d8d1e39b1a765a14d95c49291d2adde5 by harald
[X32] Add Triple::isX32(), use it.

So far, support for x86_64-linux-gnux32 has been handled by explicit
comparisons of Triple.getEnvironment() to GNUX32. This worked as long as
x86_64-linux-gnux32 was the only X32 environment to worry about, but we
now have x86_64-linux-muslx32 as well. To support this, this change adds
an isX32() function and uses it. It replaces all checks for GNUX32 or
MuslX32 by isX32(), except for the following:

- Triple::isGNUEnvironment() and Triple::isMusl() are supposed to treat
  GNUX32 and MuslX32 differently.
- computeTargetTriple() needs to be able to transform triples to add or
  remove X32 from the environment and needs to map GNU to GNUX32, and
  Musl to MuslX32.
- getMultiarchTriple() completely lacks any Musl support and retains the
  explicit check for GNUX32 as it can only return x86_64-linux-gnux32.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D103777
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
The file was modifiedllvm/lib/Target/X86/X86AsmPrinter.cpp
The file was modifiedllvm/lib/Target/X86/X86TargetMachine.cpp
The file was modifiedllvm/lib/Target/X86/X86Subtarget.h
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
The file was modifiedllvm/test/CodeGen/X86/x32-lea-1.ll
The file was modifiedllvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
The file was modifiedclang/lib/Driver/ToolChains/Linux.cpp
The file was modifiedclang/lib/Basic/Targets/X86.h
The file was modifiedclang/lib/Driver/Driver.cpp
The file was modifiedllvm/lib/Target/X86/X86RegisterInfo.cpp
The file was modifiedllvm/include/llvm/ADT/Triple.h
The file was modifiedclang/test/Driver/linux-cross.cpp
Commit 8ec73e96b72d04787ed606cfbb62a7a2a05b3711 by i
[ELF] getRelocatedSection: remove the check for ET_REL object file

getRelocatedSection interface should not check that the object file is
relocatable, as executable files may have relocations preserved with
`--emit-relocs` linker flag. The relocations are useful in context of post-link
binary analysis for function reference identification. For example, BOLT relies
on relocations to perform function reordering.

Reviewed By: MaskRay, jhenderson

Differential Revision: https://reviews.llvm.org/D102296
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFContext.cpp
The file was modifiedllvm/lib/Object/XCOFFObjectFile.cpp
The file was modifiedllvm/unittests/Object/ELFObjectFileTest.cpp
The file was modifiedllvm/include/llvm/Object/ObjectFile.h
The file was modifiedllvm/include/llvm/Object/ELFObjectFile.h
Commit 17c43c404535fe427d2cddb665154ae601d505bd by thakis
[lld/mac] Add reexports after reexporter to inputFiles

When a library "host"'s reexports change their installName with
`$ld$os10.11$install_name$host`, we used to write a load command for "host" but
write the version numbers of the reexport instead of "host". This fixes that.

I first thought that the rule is to take the version numbers from the library
that originally had that install name (implemented in D103819), but that's not
what ld64 seems to be doing: It takes the version number from the first dylib
with that install name it loads, and it loads the reexporting library before
the reexports. We already did most of that, we just added reexports before the
reexporter. After this change, we add the reexporter before the reexports.

Addresses https://bugs.llvm.org/show_bug.cgi?id=49800#c11 part 1.

(ld64 seems to add reexports after processing _all_ files on the command line,
while we add them right after the reexporter. For the common case of reexport +
$ld$ symbol changing back to the exporter name, this doesn't make a difference,
but you can construct a case where it does. I expect this to not make a
difference in practice though.)

Differential Revision: https://reviews.llvm.org/D103821
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/test/MachO/special-symbol-ld-install-name.s
The file was modifiedlld/MachO/InputFiles.cpp
The file was modifiedlld/test/MachO/tapi-link.s
The file was modifiedlld/test/MachO/implicit-dylibs.s
Commit f492c35965036d67833dae3c21498dcd1c1ed1fe by riddleriver
[mlir-lsp-server] Add support for hover on region operations

This revision adds support for hover on region operations, by temporarily removing the regions during printing. This revision also tweaks the hover format for operations to include symbol information, now that FuncOp can be shown in the hover.

Differential Revision: https://reviews.llvm.org/D103727
The file was modifiedmlir/lib/IR/SymbolTable.cpp
The file was modifiedmlir/test/mlir-lsp-server/hover.test
The file was modifiedmlir/include/mlir/IR/SymbolTable.h
The file was modifiedmlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp
Commit 4c3adea7a4ab7c63010a953547152d4ad861f9de by riddleriver
[mlir-lsp-server] Add support for hover on symbol references

For now the hover simply shows the same information as hovering on the operation
name. If necessary this can be tweaked to something symbol specific later.

Differential Revision: https://reviews.llvm.org/D103728
The file was modifiedmlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp
The file was modifiedmlir/test/mlir-lsp-server/hover.test
Commit 2db4701cafd42d20f32c6c9a5dbd15484523fcda by riddleriver
[mlir-lsp-server] Fix bug in symbol use/def tracking

We were accidentally only using the first found reference, instead of all of them. This revision fixes this by properly tracking all references to a symbol.

Differential Revision: https://reviews.llvm.org/D103730
The file was modifiedmlir/test/mlir-lsp-server/references.test
The file was modifiedmlir/lib/Parser/AsmParserState.cpp
Commit 9145a3d4ab7eb05d9fb113b5392e8961df629b88 by caij2003
Revert "[AArch64] handle -Wa,-march="

This reverts commit fd11a26d368c5a909fb88548fef2cee7a6c2c931.
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/lib/Driver/ToolChains/Arch/AArch64.cpp
The file was removedclang/test/Driver/aarch64-target-as-march.s
The file was modifiedclang/lib/Driver/ToolChains/Arch/AArch64.h
Commit e72f16b7e66256dba5496a32546417d438bb035c by dsuchkov
[Test] Add a JumpThreading test exposing a bug in BasicAA.
The file was addedllvm/test/Transforms/JumpThreading/aa-crash-phi-no-args.ll
Commit d32cc150feb72f315a5bbd34f92e7beca21a50da by dsuchkov
[BasicAA] Handle PHIs without incoming values gracefully

Fix a bug introduced by f6f6f6375d1a4bced8a6e79a78726ab32b8dd879.
Now for empty PHIs, instead of crashing on assert(hasVal()) in
Optional's internals, we'll return NoAlias, as we did before that patch.

Differential Revision: https://reviews.llvm.org/D103831
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/test/Transforms/JumpThreading/aa-crash-phi-no-args.ll
Commit 3c6e419198f3916b76f88d2bef8aa04dd2114574 by listmail
[SCEV] Properly guard reasoning about infinite loops being UB on mustprogress

Noticed via code inspection. We changed the semantics of the IR when we added mustprogress, and we appear to have not updated this location.

Differential Revision: https://reviews.llvm.org/D103834
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/test/Analysis/ScalarEvolution/trip-count-unknown-stride.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/pr38697.ll