[GISel][NewPM] Note we always modify MIR in IRTranslator
It turns out IRTranslatorImpl::runOnMachineFunction always returns
false, so we would fail to invalidate some analyses (like
GISelCSEAnalysis) that we should have.
Test coverage will be in a future commit that also ports the Legalizer,
which asserts that we correctly preserve/invalidate GISelCSEAnalysis.
Reviewers: vikramRH, arsenm
Pull Request: https://github.com/llvm/llvm-project/pull/217045
[SLP] Support vectorizing ptrtoaddr (#216902)
Currently, SLP Vectorizer handles ptrtoint but not ptrtoaddr (as
observed in an ASan test:
https://github.com/llvm/llvm-project/pull/216827#issuecomment-5322231318).
ptrtoaddr “is different from ptrtoint in that it only operates on the
index bits of the pointer and ignores all other bits, and does not
capture the provenance of the pointer"
(https://llvm.org/docs/LangRef.html#i-ptrtoaddr), which is immaterial to
its vectorizability.
This patch handles ptrtoaddr in a similar way to ptrtoint.
[orc-rt] Add StringOutputStream for <sstream>-free messages (#217022)
Add orc_rt::StringOutputStream to StringExtras.h: a minimal, output-only
stream that appends formatted values to a std::string via operator<<,
for building diagnostic/error strings without <sstream>.
<sstream> pulls in the iostreams + locale machinery, which is not in the
freestanding subset and is undesirable in the executor (which runs
on-target, including bare-metal). It is also locale-sensitive and built
around exceptions. StringOutputStream formats integers and pointers with
std::to_chars, so it has no locale dependence, allocates only to grow
the result string, and needs neither <sstream> nor <iostream>.
Integers and pointers are formatted with std::to_chars, so there is no
locale dependence and allocation only to grow the result string.
- Overloads for char, bool, const char*, std::string_view, const void*
(hex), and any built-in integer (decimal via to_chars).
- A free hex() helper prints an integer as "0x"-prefixed lowercase hex
[7 lines not shown]
[BOLT] Page out .dwo files
Split-DWARF inputs at big binaries scale ship 100+ GiB of .dwo
files. BOLT opened a fair number of them during readDebugInfo, putting
a lot of pressure on the OS memory management: mmap'd reads always
populate the page cache; with every .dwo mapped at once those pages
accumulated, refaulted, and registered as memory pressure that got the
process oomd-killed.
Now, .dwo page-cache pages are reclaimed as soon as BOLT is done with
each file: madvise(MADV_PAGEOUT) on the live mapping, then
posix_fadvise(POSIX_FADV_DONTNEED) once it is unmapped. Controlled by
-drop-dwo-page-cache, OFF by default, as it is unlikely upstream
will be processing gigantic sets of dwo files.
[BOLT] Create and release .dwo DWARF contexts incrementally
BOLT opened a DWARFContext for every .dwo during
readDebugInfo and kept them all alive until teardown. On large
split-DWARF targets that is tens of GiB held resident through
emission, the point of peak RSS.
Make the DWOCUs map a lazily-populated cache instead:
* Use the newly added DWARFUnit::clearDWO()/hasDWO() to directly
manage DWARFUnit's DIE caching mechanism.
* BinaryContext::getDWOCU() opens a context on demand (keyed off a
stable DWOId -> skeleton CU map).
* Release contexts as soon as they are done with: all of them at the
end of readDebugInfo, and per-bucket at the DWARF rewrite merge
point.
* Remove DWOCUs map, which became redundant and whose purpose can
now be served by the new id-to-skeleton map, and then fetching
the split CU from the skeleton via getNonSkeletonUnitDIE().
[5 lines not shown]
[DebugInfo] Add DWARFUnit::clearDWO()
Add DWARFUnit::clearDWO() so a skeleton unit can drop the DWO context
it owns without being destroyed itself. Also add DWARFUnit::hasDWO()
to answer if that skeleton CU is currently caching a DWO context, so
users can easily look it up.
For example, BOLT opened a DWARFContext for every .dwo during
readDebugInfo and kept them all alive until teardown. On large
split-DWARF targets that is tens of GiB held
resident. clearDWO()/hasDWO() expose to users DWARFUnit's caching
capacity, allowing them to spontaneously drop the cache/look it
up/re-load it for memory management.
nss: update to 3.127.
Changes in NSS 3.127
- Bug 2060720 - Round ECH ClientHelloInner padding up to a multiple of 32.
- Bug 2063071 - make selfserv listen on IPv6 wildcard on dual-stack hosts.
- Bug 2059176 - EC_DerivePublicKey() failure is not propagated in sftk_mkPrivKey().
- Bug 2052210 - Generate additional test message for Thunderbird (HTML with remote image).
- Bug 1869493 - Heap-buffer overflow in AES Keywrap.
- Bug 2054609 - remove cipher suite order exception from bug 946147.
- Bug 2061107 - restore pkcs12.h for source compatibility.
- Bug 2056291 - remove support for pre-v1.0 PKCS#12.
- Bug 2054719 - fix content type tag for CMS AuthEnvelopedData plaintext.
- Bug 2060118 - remove DH_GenParam support.
- Bug 2053831 - clang format.
- Bug 2054714 - avoid leaking stale ECH outer extensions across HRR.
- Bug 2053831 - Drop CKF_VERIFY flag from CKM_HKDF_DATA derivation in ECH GREASE.
- Bug 2053831 - Adjust PK11_Derive and TLS 1.3 derivation templates for CKM_HKDF_DATA and CKO_DATA compliance.
- Bug 2053831 - Use CKF_HKDF_SALT_DATA in tls13_HkdfExtract for CKO_DATA keys per PKCS#11 v3.2.
[7 lines not shown]
[NFC][MemProf] Replace memprofraw with YAML in memprof.ll test (#216878)
Replace `.memprofraw` with a `.yaml` file using `split-file`. This
allows us to delete `update_memprof_inputs.sh` and the binary blobs
that it generates.