SuccessChanges

Summary

  1. sysroot.py: add support for non-darwin platforms (details)
  2. [SROA] Amend failing test from D95826 (details)
  3. [RISCV] Use bits<7> instead of bits<11> for the EEW field size in the RISCVZvlsseg searchable table. NFCI (details)
  4. [WebAssembly] Do not use EHCatchret symbols with wasm EH (details)
  5. [flang] Ensure that intrinsic procedures are PURE &/or ELEMENTAL (details)
  6. [RISCV] Localize RISCVZvlssegTable to RISCVISelDAGToDAG.cpp, the only place it is used. (details)
  7. [NFC][clang] Bump up DIAG_SIZE_SEMA for downstream diagnostics (details)
  8. [gn build] make WindowsManifestMerger.cpp build fine with sysroot (details)
  9. [NFC][RegAlloc] InlineSpiller::Original is a Register (details)
  10. [WebAssemblly] Fix EHPadStack update in fixCallUnwindMismatches (details)
  11. fix comment typo to cycle bots (details)
  12. Basic block sections should enable not function sections implicitly. (details)
  13. [WPD][lld] Test handling of vtable definition from shared libraries (details)
  14. Bugfix for collecting features from very small DSOs. (details)
Commit 6073f87d7f160a9306209efd390409e7fe67e6db by thakis
sysroot.py: add support for non-darwin platforms

CMAKE_SYSROOT works fine here, and `sysroot.py make-fake`
borders on trivial here, but I suppose it's still nice
to have a consistent script to set these up across platforms.

And these are the platforms where we can do real sysroot management one
day.

Differential Revision: https://reviews.llvm.org/D96882
The file was modifiedllvm/utils/gn/build/BUILD.gn
The file was modifiedllvm/utils/sysroot.py
Commit 892d2822b62ebcaa7aa0b006b5ea4f26593c1618 by gh
[SROA] Amend failing test from D95826
The file was modifiedllvm/test/Transforms/SROA/tbaa-struct2.ll
Commit 799f7865c88e954eea4171d34e68721145836964 by craig.topper
[RISCV] Use bits<7> instead of bits<11> for the EEW field size in the RISCVZvlsseg searchable table. NFCI

We only support 8, 16, 32, and 64 for EEW. These only need 7 bits
to represent.
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
Commit 1f9e551a811a4520cc6a3387b53d3cd568531697 by dschuff
[WebAssembly] Do not use EHCatchret symbols with wasm EH

D94835 added support for WinEH to export public symbols pointing to
basic blocks which are catchret targets for use with Windows CET.
Wasm currently doesn't support public symbols to non-function code
addresses (they get treated like new functions in asm but then don't
lower to object files correctly).
It created them unconditionally for all catchret targets.

This change disables those symbols unless the exceptionHandlingType
is WinEH (since they aren't used with ExceptionHandling::Wasm)

Differential Revision: https://reviews.llvm.org/D96824
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/test/CodeGen/WebAssembly/exception.ll
Commit 452d7ebc093a5f1434d2c616beb4a9fac6dc9783 by pklausler
[flang] Ensure that intrinsic procedures are PURE &/or ELEMENTAL

The intrinsic procedure table properly classify the various
intrinsics, but the PURE and ELEMENTAL attributes that these
classifications imply don't always make it to the utility
predicates that test symbols for them, leading to spurious
error messages in some contexts.  So set those attribute flags
as appropriate in name resolution, using a new function to
isolate the tests.

An alternate solution, in which the predicates would query
the intrinsic procedure table for these attributes on demand,
was something I also tried, so that this information could
come directly from an authoritative source; but it would have
required references to the intrinsic table to be passed along
on too many seemingly unrelated APIs and ended up looking messy.

Several symbol table tests needed to have their expected outputs
augmented with the PURE and ELEMENTAL flags.  Some bogus messages
that were flagged as such in test/Semantics/doconcurrent01.f90 were
removed, since they are now correctly not emitted.

Differential Revision: https://reviews.llvm.org/D96878
The file was modifiedflang/test/Semantics/omp-symbol08.f90
The file was modifiedflang/lib/Semantics/resolve-names.cpp
The file was modifiedflang/test/Semantics/call11.f90
The file was modifiedflang/test/Semantics/symbol13.f90
The file was modifiedflang/test/Semantics/symbol19.f90
The file was modifiedflang/test/Semantics/procinterface01.f90
The file was modifiedflang/test/Semantics/symbol18.f90
The file was modifiedflang/test/Semantics/symbol14.f90
The file was modifiedflang/test/Semantics/symbol15.f90
The file was modifiedflang/test/Semantics/doconcurrent01.f90
The file was modifiedflang/test/Semantics/symbol17.f90
Commit 3bdd02735bca2a5c31779e2cc24e27b83d0f24e1 by craig.topper
[RISCV] Localize RISCVZvlssegTable to RISCVISelDAGToDAG.cpp, the only place it is used.
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
Commit e320cf23f0939307bca54f06039b71fcc2bffa85 by zixu_wang
[NFC][clang] Bump up DIAG_SIZE_SEMA for downstream diagnostics

Bump DIAG_SIZE_SEMA up by 500 to accommodate extra downstream diagnostics

Differential Revision: https://reviews.llvm.org/D96888
The file was modifiedclang/include/clang/Basic/DiagnosticIDs.h
Commit 0dd2ffb3921cc23970f113131435fb650d2f2d41 by thakis
[gn build] make WindowsManifestMerger.cpp build fine with sysroot

This already works in the cmake build.

Differential Revision: https://reviews.llvm.org/D96889
The file was modifiedllvm/utils/gn/build/libs/xml/BUILD.gn
The file was addedllvm/utils/gn/build/sysroot.gni
The file was modifiedllvm/utils/gn/build/BUILD.gn
Commit 3a030c2f2fe3de62c5eba4f916ce51e5d1214a42 by mtrofin
[NFC][RegAlloc] InlineSpiller::Original is a Register
The file was modifiedllvm/lib/CodeGen/InlineSpiller.cpp
Commit da01a9db8bb4d0ba362e1956ef7fa9bdd5e3b464 by aheejin
[WebAssemblly] Fix EHPadStack update in fixCallUnwindMismatches

Updating `EHPadStack` with respect to `TRY` and `CATCH` instructions
have to be done after checking all other conditions, not before. Because
we did this before checking other conditions, when we encounter `TRY`
and we want to record the current mismatching range, we already have
popped up the entry from `EHPadStack`, which we need to access to record
the range.

The `baz` call in the added test needs try-delegate because the previous
TRY marker placement for `quux` was placed before `baz`, because `baz`'s
return value was stackified in RegStackify. If this wasn't stackified
this try-delegate is not strictly necessary, but at the moment it is not
easy to identify cases like this. I plan to transfer `nounwind`
attributes from the LLVM IR to prevent cases like this. The call in the
test does not have `unwind` attribute in order to test this bug, but in
many cases of this pattern the previous call has `nounwind` attribute.

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D96711
The file was modifiedllvm/test/CodeGen/WebAssembly/cfg-stackify-eh.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp
Commit 279c5dc2f36fe8ffe27a8679cc5ce07c7f4806f9 by thakis
fix comment typo to cycle bots
The file was modifiedlld/ELF/Symbols.cpp
Commit e74191633036905388245818f54553813c880f83 by tmsriram
Basic block sections should enable not function sections implicitly.

Basic block sections enables function sections implicitly, this is not needed
and is inefficient with "=list" option.

We had basic block sections enable function sections implicitly in clang. This
is particularly inefficient with "=list" option as it places functions that do
not have any basic block sections in separate sections. This causes unnecessary
object file overhead for large applications.

This patch disables this implicit behavior. It only creates function sections
for those functions that require basic block sections.

This patch is the second of two patches and this patch removes the implicit
enabling of function sections with basic block sections in clang.

Differential Revision: https://reviews.llvm.org/D93876
The file was modifiedclang/test/CodeGen/basic-block-sections.c
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit 3c4c205060c9398da705eb71b63ddd8a04999de9 by tejohnson
[WPD][lld] Test handling of vtable definition from shared libraries

Adds a lld test for a case that the handling added for dynamically
exported symbols in 1487747e990ce9f8851f3d92c3006a74134d7518 already
fixes. Because isExportDynamic returns true when the symbol is
SharedKind with default visibility, it will treat as dynamically
exported and block devirtualization when the definition of a vtable
comes from a shared library. This is desireable as it is dangerous to
devirtualize in that case, since there could be hidden overrides in the
shared library. Typically that happens when the shared library header
contains available externally definitions, which applications can
override. An example is std::error_category, which is overridden in LLVM
and causing failures after a self build with WPD enabled, because
libstdc++ contains hidden overrides of the virtual base class methods.

The regular LTO case in the new test already worked, but there are
2 fixes in this patch needed for the index-only case and the hybrid
LTO case. For the index-only case, WPD should not simply ignore
available externally vtables. A follow on fix will be made to clang to
emit type metadata for those vtables, which the new test is modeling.
For the hybrid case, we need to ensure when the module is split that any
llvm.*used globals are cloned to the regular LTO split module so
available externally vtable definitions are not prematurely deleted.

Another follow on fix will add the equivalent gold test, which requires
a small fix to the plugin to treat symbols in dynamic libraries the same
way lld already is.

Differential Revision: https://reviews.llvm.org/D96721
The file was modifiedllvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
The file was addedlld/test/ELF/lto/Inputs/devirt_vcall_vis_shared_def.ll
The file was addedlld/test/ELF/lto/devirt_vcall_vis_shared_def.ll
The file was modifiedllvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
Commit 10993bf072d93cc0868b5594f8e22fb876139b41 by mvanotti
Bugfix for collecting features from very small DSOs.

During unit tests, it was observed that crafting an artificially small DSO could cause OOB memory to be accessed. This change fixes that (but again, the affected DSOs are unlikely to ever occur outside unit tests).

Reviewed By: morehouse, charco

Differential Revision: https://reviews.llvm.org/D94507
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerTracePC.h