Progress:
Changes

Summary

  1. [gn build] Build with Fission on non-mac non-win when using lld (details)
  2. [libc] Fix invalid include for SqrtLongDouble.h (details)
  3. [ARM] Replace if's with a switch, NFC (details)
  4. [ARM] Separate ARM autoupgrade code into a separate function (details)
  5. [LLDB] XFAIL on Arm/Linux minidebuginfo-set-and-hit-breakpoint.test (details)
  6. [IR][AutoUpgrade] Merge x86 mask load intrinsic upgrades. NFC. (details)
  7. [funcattrs] Fix a bug in recently introduced writeonly argument inference (details)
  8. [DAG] PromoteIntRes_FunnelShift - rename shift Amount variable to Amt to prevent line overflow. NFC. (details)
  9. [AMDGPU] Kill def when folding immediate in two-addr pass (details)
  10. [AMDGPU] Fixed incomplete definitions in twoaddr-fma.mir. NFC. (details)
  11. [HWASan] Try 'google' prefixed apex directories in symbolizer. (details)
  12. [CFG] Handle calls with funclet bundle (details)
  13. [libunwind] Fix unwind_leaffunction test (details)
  14. [msan] Don't block SIGSYS in ScopedBlockSignals (details)
Commit 1217b4b46fce698cfbc869ec0f43b074f3f5f874 by thakis
[gn build] Build with Fission on non-mac non-win when using lld

In release+sym builds (-O2 -g), reduces time to link `clang`
from 2.3s to 1.3s (-42%).

In debug builds (-g), reduces time to link `clang`
from 5.4s to 4.5s (-17.4%).

See the phab review for full `ministat` numbers.

In the CMake build this is opt-in via LLVM_USE_SPLIT_DWARF.
Since the GN build is targeted at developers, enabling it by default
seems like a better default setting here. (If it turns out to cause
problems, we can add an opt-out.)

Time to load the binary into gdb and to set a breakpoint is unchanged.
Time from `run` to hitting a breakpoint in `main` feel a bit faster
(~4s -> ~2s), but I dind't do a careful statistical anlysis for this.

Differential Revision: https://reviews.llvm.org/D115040
The file was modifiedllvm/utils/gn/build/BUILD.gn
Commit b902b314ffa7ee3a13e2b1cfcfe28a946904b2ce by gchatelet
[libc] Fix invalid include for SqrtLongDouble.h
The file was modifiedlibc/src/__support/FPUtil/x86_64/SqrtLongDouble.h
Commit 11f67f5a2c286e33fece6c56cd5333549307549a by david.green
[ARM] Replace if's with a switch, NFC

I'm not having a lot of luck with the microosft compiler recently. Maybe
this will help it with its errors:
llvm\lib\IR\AutoUpgrade.cpp(3726): fatal error C1061: compiler limit: blocks nested too deeply

If not, it's a good code cleanup anyway.
The file was modifiedllvm/lib/IR/AutoUpgrade.cpp
Commit 08035000cd08ad7269466f35716aad113e823c4b by david.green
[ARM] Separate ARM autoupgrade code into a separate function

Try to appease the microsoft compiler which is apparently running out of
if statements. Separate the new ARM code into a separate function to
keep it simpler.
The file was modifiedllvm/lib/IR/AutoUpgrade.cpp
Commit 80792368bb87eeb9e2042e37337e0f5b1e5abc4b by omair.javaid
[LLDB] XFAIL on Arm/Linux minidebuginfo-set-and-hit-breakpoint.test

minidebuginfo-set-and-hit-breakpoint.test is failing on Arm/Linux most
probably due to an ill formed binary after removal of certain sections
from executable. I am marking it as XFAIL for further investigation.
The file was modifiedlldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test
Commit 74cc0fa1db74d678436020a64a8ca0e9e99954d1 by llvm-dev
[IR][AutoUpgrade] Merge x86 mask load intrinsic upgrades. NFC.

Helps appease MSVC which is complaining about "fatal error C1061: compiler limit: blocks nested too deeply" - we already do the same thing for avx512.mask.store intrinsics.

This is only a stopgap solution until another else-if case needs adding - we really need to refactor this chain of ifs properly.
The file was modifiedllvm/lib/IR/AutoUpgrade.cpp
Commit 7b54de5feffedfc08e5a02d6c9e27c54e3b7f119 by listmail
[funcattrs] Fix a bug in recently introduced writeonly argument inference

This fixes a bug in 740057d.  There's two ways to describe the issue:
* One caller hasn't yet proven nocapture on the argument.  Given that, the inference routine is responsible for bailing out on a potential capture.
* Even if we know the argument is nocapture, the access inference needs to traverse the exact set of users the capture tracking would (or exit conservatively).  Even if capture tracking can prove a store is non-capturing (e.g. to a local alloc which doesn't escape), we still need to track the copy of the pointer to see if it's later reloaded and accessed again.

Note that all the test changes except the newly added ones appear to be false negatives.  That is, cases where we could prove writeonly, but the current code isn't strong enough.  That's why I didn't spot this originally.
The file was modifiedllvm/lib/Transforms/IPO/FunctionAttrs.cpp
The file was modifiedllvm/test/Feature/OperandBundles/pr26510.ll
The file was modifiedllvm/test/Transforms/FunctionAttrs/readattrs.ll
The file was modifiedllvm/test/Transforms/FunctionAttrs/nocapture.ll
The file was modifiedllvm/test/Transforms/FunctionAttrs/2009-01-02-LocalStores.ll
The file was modifiedllvm/test/Transforms/FunctionAttrs/writeonly.ll
The file was modifiedllvm/test/Transforms/Coroutines/coro-async.ll
The file was modifiedclang/test/CodeGen/ms-mixed-ptr-sizes.c
Commit ebf527191873e0c68f98601cc9c45efd5abf67b4 by llvm-dev
[DAG] PromoteIntRes_FunnelShift - rename shift Amount variable to Amt to prevent line overflow. NFC.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
Commit 3b17cb1506e5d79cfb2b7c0b903395c3f0a1a310 by Stanislav.Mekhanoshin
[AMDGPU] Kill def when folding immediate in two-addr pass

Two-address pass works right before RA and if an immediate
was folded into an instruction there is nothing to remove
the dead def. We end up with something like:

v_mov_b32_e32 v14, 0xc1700000
v_mov_b32_e32 v14, 0x41200000
v_fmaak_f32 v51, s67, v19, 0xc1700000
v_fmaak_f32 v38, v51, v19, 0x4120000

The patch kills the dead move instruction right in the folding.

Differential Revision: https://reviews.llvm.org/D114999
The file was modifiedllvm/test/CodeGen/AMDGPU/twoaddr-fma.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/mul24-pass-ordering.ll
Commit e1d630681522186c82cce8bac0d3fbb647d0e9a0 by Stanislav.Mekhanoshin
[AMDGPU] Fixed incomplete definitions in twoaddr-fma.mir. NFC.
The file was modifiedllvm/test/CodeGen/AMDGPU/twoaddr-fma.mir
Commit 572a0721a022e992648bf55c80b5defb53aa892f by 31459023+hctim
[HWASan] Try 'google' prefixed apex directories in symbolizer.

Google-signed apexes appear on Android build servers' symbol files as
being under /apex/com.google.android.<foo>/. In reality, the apexes are
always installed as /apex/com.android.<foo>/ (note the lack of
'google'). In order for local symbolization under hwasan_symbolize to
work correctly, we also try the 'google' directory.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D114919
The file was modifiedcompiler-rt/lib/hwasan/scripts/hwasan_symbolize
Commit 181c4ba467c4affbea89b4b2ea8a712da3e54900 by rnk
[CFG] Handle calls with funclet bundle

When Control Flow Guard Check is inserted, funclet bundle was not checked. Therefore, it didn't generate code correctly when a target function has "funclet" bundle.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D114914
The file was modifiedllvm/lib/Transforms/CFGuard/CFGuard.cpp
The file was modifiedllvm/test/CodeGen/X86/cfguard-checks.ll
Commit f178a05f220403f2a9d73c7640bfcc7dc2d7be72 by leonardchan
[libunwind] Fix unwind_leaffunction test

It's possible for this test not to pass if the libc used does not provide
unwind info for raise. We can replace it with __builtin_cast, which can lead
to a SIGTRAP on x86_64 and a SIGILL on aarch64.

Using this alternative, a nop is needed before the __builtin_cast. This is
because libunwind incorrectly decrements pc, which can cause pc to jump into
the previous function and use the incorrect FDE.

Differential Revision: https://reviews.llvm.org/D114818
The file was modifiedlibunwind/test/unwind_leaffunction.pass.cpp
Commit c361ab061253eedfc7ed905cdbc055de09239543 by hans
[msan] Don't block SIGSYS in ScopedBlockSignals

Seccomp-BPF-sandboxed processes rely on being able to process SIGSYS
signals.

Differential revision: https://reviews.llvm.org/D115057
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_linux.cpp