[LifetimeSafety] Use ImmutableList for buildOriginFlowChain DFS nodes (#208890)
This commit mainly address the suggestion in
https://github.com/llvm/llvm-project/pull/204592#discussion_r3523582077
to use `ImmutableList` for the DFS nodes in `buildOriginFlowChain`, and
also updates the `llvm_unreachable` messages.
---------
Signed-off-by: Yuan Suo <suoyuan666 at s5n.xyz>
Co-authored-by: Utkarsh Saxena <usx at google.com>
[CodeGen] Remove dead declarations (#215013)
The corresponding function definitions were removed on Jan 12, 2022 in
commit 6a605b97a2006bd391f129a606483656b7c6fb28.
[CIR] Accept _Complex and all float formats in x86_64 callconv lowering
The CallConvLowering bridge accepted only float and double, so a function taking
a _Complex, or a float in any other format, failed the pass instead of being
classified. An all-float aggregate failed for a different reason: its SSE
eightbyte coerces to a vector, and the bridge had no way to represent one, so it
reported the coercion NYI rather than emitting a wrong signature.
Mapping every CIR floating-point type through FPTypeInterface covers all of them
at once. A _Complex maps to the library's complex type and a vector coercion
now converts back to a CIR vector.
Accepting a long double also makes a union holding one classifiable. That
exposes the ABI-compatibility flags, which the pass left at the library
defaults. They now come from the triple and the compatibility version, which is
what lets a long double union reach registers on Darwin instead of memory.
updateArgAttrs appended argument attributes instead of setting them, so a name
already present landed in the dictionary twice. CIRGen marks a _Complex long
[8 lines not shown]
[docs] Prefer colon fences to delineate blocks containing markup (#214921)
Myst has an extension,
[colon_fence](https://myst-parser.readthedocs.io/en/latest/syntax/optional.html#syntax-colon-fence),
that we enable in our docs. There are many Markdown-aware tools out
there that know to interpret triple backtick as a code block fence, so
they highlight them as pre-formatted text. Colon fences are an
unrecognized Myst extension, and if the Sphinx directive contains a
block of markdown formatted text, that's the desired behavior.
Therefore, at some point during the migration, I started using them.
However, I didn't document this guideline, and I didn't apply it
consistently to the early docs. This PR does that: documents the
guideline, and applies it to our docs.
After this change:
```
❯ rg '```\{(option|note|todo|admonition|warning)\}' | cut -d / -f 1 | sort | uniq -c
72 clang-tools-extra
```
[6 lines not shown]
[llvm][LoopVectorize] Avoid nondeterministic iteration (#214886)
The Transforms/LoopVectorize/AArch64/cmp_cost.ll test fails under
LLVM_RERERSE_ITERATION, because iterating over a SmallPtrSet is
nondeterministic. Addresses part of #214872.
[VPlan] Use i64 for constant lane indices in insertelement (NFC) (#214664)
Update code to generate insertelement instruction to use i64 as index
type, matching the canonical form instcombine produces.
This is in line with previous changes making sure LVs output is as
canonical as possible.
PR: https://github.com/llvm/llvm-project/pull/214664
[SLP]Fix unscheduled-deps assert for copyable operands in reassociated nodes
For a non-commutative user in a reassociated (flattened) node, the
copyable operand may be modeled on a flattened operand column rather
than at the instruction's operand number, so the direct lookup misses
it and the def-use dependency is counted but never released. Scan the
flattened operand columns at the user's lane for the copyable data.
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/215016
[Offload][OMPT][NFCI] Call ompt_libomp_connect instead of dlopen libomp (#214556)
connectLibrary() reached libomp's ompt_libomp_connect through
OmptLibraryConnectorTy, which dlopens "libomp.so" and resolves the
symbol at run time. That cannot do anything the linker has not already
done: libomptarget links libomp and imports seven __kmpc_* symbols from
it, so libomp.so is a DT_NEEDED entry, and libomp defines and exports
ompt_libomp_connect unconditionally -- as a stub in kmp_utility.cpp when
built without OMPT support. Declare it, call it, and delete Connector.h.
AI-assisted.
[SDPatternMatch] Add m_NU/SWAdd and m_NU/SWAddLike (#214876)
These are the SDPatternMatch counterpart of `m_NU/SWAdd` and
`m_NU/SWAddLike` in IR PatternMatch.
[libc] Read multiple interfaces per netlink message in if_nameindex (#213952)
This patch changes it to collect all interfaces in the buffer using
BlockStore<InterfaceEntry, 16>. I'm storing interface names as a fixed
char array (IF_NAMESIZE) in InterfaceEntry so that we're ready for the
next step when we reuse the recvfrom buffer across multiple messages.
Once all messages in the buffer are parsed, I allocate a single
contiguous buffer containing all struct if_nameindex entries and
strings.
To keep if_nameindex() readable, I've split the implementation into two
helper functions: parse_netlink_messages() and
build_if_nameindex_list().
[libc] Enable unistd.h on linux/arm and aarch64 (#214429)
This enables the unistd.h header and all functional entry points for
linux/arm. I've disabled a handful of functions which do not work
because of 32-vs-64 bit mismatches (in file offsets and times). In
theory these should work in full build mode, but we don't have bot
coverage for this config, so I'm not enabling them anywhere. This is
also why I'm not enabling full-build-only entry points which are enabled
on other architectures.
While comparing the unistd entry point lists across architectures, I
noticed
that linux/aarch64 was missing chown and getgid. I've added those as
well.
Assisted by Gemini.