libunwind: Implement the unw_strerror function for better nongnu libunwind compatibility (#160887)
As it was explained to me in
https://discourse.llvm.org/t/libunwinds-raison-detre/88283/2 the LLVM
version of libunwind is mostly compatible with nongnu one. This change
improves the compatibility a bit further.
DAG: Move expandMultipleResultFPLibCall to TargetLowering (NFC) (#166988)
This kind of helper is higher level and not general enough to go
directly in SelectionDAG. Most similar utilities are in TargetLowering.
ValueMapper: Delete unused initializers of replaced appending globals.
A full LTO link time performance and memory regression was introduced
by #137081 in cases where the modules contain large quantities of llvm.used
globals. This was unnoticed because it was not expected that this would
be a typical case, but this is exactly what coverage collection does,
and when this feature is enabled together with full LTO we end up with
quadratic memory consumption (from the unused constants) and quadratic
complexity in the function Verifier::visitGlobalValue (which visits all
the unused constants in the use list of each global value). This is a
targeted fix that avoids reintroducing the quadratic complexity from
before #137081, by having ValueMapper delete the old initializer of an
appending global if it is unused, instead of visiting every global in
the context after every link.
The repro-cfi-64 reproducer from #167037 before and after this change:
```
Elapsed time Max RSS (KB)
[11 lines not shown]