[clangd] Add missing direct includes for bit.h. NFC (#202840)
This currently compile only because llvm/ADT/Hashing.h transitively
pulls in llvm/Support/SwapByteOrder.h (which includes llvm/ADT/bit.h).
[CIR] Support zero-result ops in clangir TableGen lowering (#202273)
### summary
This is follow-up to https://github.com/llvm/llvm-project/pull/199599
A CIR op can set the llvmOp field to have cir-tblgen auto-generate its
CIR→LLVM lowering instead of using a hand-written pattern.However, the
generated body forwards the result type via op.getType(), which only
compiles for single-result ops. As a result, ops with zero results could
not use this feature.
To fix this, teach CIRLoweringEmitter to emit an empty mlir::TypeRange{}
for zero-result ops. Then switch cir.lifetime.start and cir.lifetime.end
to use llvmOp (dropping their hand-written lowering). The lifetime.cir
test covers the generated path.
[SCEV] Speed up forgetLoop by avoiding def-use walk for loop-header PHIs (#201572)
Every cached SCEV varies with Loop `L` transitively contains an
`AddRec`, and every `AddRec` for the loop is recorded in `LoopUsers[L]`.
`forgetMemoizedResults` already closes this set transitively through
`SCEVUsers` and `ExprValueMap`.
Therefore `forgetLoop` does not need to walk the def-use chain starting
from header PHIs, it only needs to initialize `ToForget` with
`LoopUsers[L]` and explicitly remove each header PHI's entries from
`ValueExprMap` and `ConstantEvolutionLoopExitValue`, push its cached
SCEVs into `ToForget`.
As a side effect, cached SCEVs that reside in the loop body but do not
depend on any `AddRec` for the loop (e.g. a `SCEVUnknown` for an icmp)
are no longer invalidated.
[NFC][clang-sycl-linker] Standardize error messages to LLVM coding style (#202767)
Follow LLVM coding standards for error messages: use lowercase first
letter and no trailing period. This matches the style used throughout
LLVM tools (llvm-objcopy, lld, etc.) and aligns with the official
guidance in llvm/docs/CodingStandards.rst.
Updated corresponding test assertions in basic.ll and triple.ll.
[SSAF] Let function parameters inherit linkage from their parent functions (#201946)
SSAF treats parameters as entities and may not always associate them
back to their parent functions. Therefore, it needs to identify
parameters of functions with external linkage across different TUs.
Treating them as having no linkage (as in C++) causes the same parameter
in different TUs to be assigned different EntityIDs. As a result, the
behavior of the parameter across multiple TUs cannot be correlated.
rdar://178844032
---------
Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
[RISCV] Adopt SpacemitX60's scheduling model for `-mtune=generic` (#167008)
Per our discussions in RISC-V roundtable during LLVM Dev Meeting 2025,
there has been a consensus to create a base / generic scheduling model
for the most common performance tuning usages. As the first step, we
agree to use SpacemitX60's scheduling model for that purpose for the
time being, with an expectation to create a standalone generic model
that could evolve independently in the future.
This patch sets `-mtune=generic` to use SpacemitX60's scheduling model,
and documents the rationale behind it, including the roadmap ahead as we
discussed.
[lld][MachO] Handle compact unwind entries with no matching symbol (#180009)
Context: This change is to support [MachO basic block hot-cold
splitting](https://discourse.llvm.org/t/rfc-support-fsplit-machine-functions-on-macho-arm64/89739)
- though it's presented below outside of this context.
Compact unwind entries can reference function addresses that have no
corresponding symbol in the object's symbol table (e.g. functions with
temporary local labels). Previously, this would trigger an assertion
failure in assert-enabled builds, or silently drop the unwind entry in
release builds, resulting in missing unwind info at runtime.
Fix this by synthesizing a local `Defined` symbol when no symbol exists
at the target address of a compact unwind entry, so that unwind info is
correctly emitted.
[Assisted-by](https://t.ly/Dkjjk): Cursor IDE + claude-opus-4.6-high +
gpt-5.2-xhigh
[clang-offload-bundler] Convert `std::vector` to `llvm::SmallVector` in `OffloadBundlerConfig` (#192259)
Replace `std::vector<std::string>` with `llvm::SmallVector<std::string,
4>`
for TargetNames, InputFileNames, and OutputFileNames to avoid heap
allocation for small number of elements.
[HLSL] Add InterlockedAdd HLSL functions (#195742)
This PR adds the `InterlockedAdd` function to HLSL.
For now, only integer references are accepted: resources passed as a
parameter, and this function as a member method to certain resources,
will be addressed in a separate PR.
Addresses https://github.com/llvm/llvm-project/issues/99122
Assisted by: Github Copilot
[test][Support] Disable CFI-icall for DynamicLibrary Overload test (#202446) (#202684) (#202794)
The test performs manual symbol lookup and calls, which triggers
Control Flow Integrity indirect call checks.
Reland of #202446 and #202684 reverted with #202550 #202446.
Here we are going to use LLVM_NO_SANITIZE and check `__clang__`.
[lldb] Drop prefix & offset arguments in ParseTrieEntries (#202805)
I addressed Dave's review feedback locally but forgot to push the fix to
the PR branch. This removes the prefix and offset arguments from the
public API.
[lldb][docs] Drop stale Python 2 note from caveats page (NFC) (#202754)
Remove the Python 2 section from the caveats page. Python 2 has been
end-of-life since 2020 and is no longer shipped with current macOS, so
the xcrun guidance for it and the deprecation note are no longer useful.
As promised in #201256.
[flang][OpenMP] Remove CheckSymbolName{,s}, NFC
These functions checked if each OmpObject had a symbol, and emitted
a diagnostic if not. Name not having a symbol is an internal compiler
error (at least now), and will be detected separately.
Remove these functions since they don't serve any purpose anymore.
Fix several migration artifacts
- Lines starting with `%` are markdown line comments. This comes up
often when LLVM IR value names end up starting a new line in prose.
- Fix indentation in a few cases
- Use > prefix for intended block quote sections.
- Fix the VP section heading, the two-line "" heading underline wasn't
caught in the initial migration.
[DirectX] Move getNonDXILAttributeMask to DirectXIRPasses (#202781)
DXILDebugInfo.cpp uses it and is part of DirectXIRPasses, but
DXILPrepare.cpp defined it and is part of DirectXCodeGen. DirectXCodeGen
has a dependency on DirectXIRPasses, so we cannot also add a dependency
from DirectXIRPasses back on DirectXCodeGen, and we need to move the
definition of getNonDXILAttributeMask() instead.
Fixes: #201336
Handle objc_msgSend being a re-export symbol from libobjc.A.dylib. (#202776)
In some cases, objc_msgSend and the objc_msgSendSuper can be re-exported
symbols in libobjc.A.dylib. Handle that case here. There were a number
of failures in the ObjC stepping tests before this was handled, so we
didn't need more tests.
If there isn't a re-exported symbol, we'll fall back to a code symbol.
---------
Co-authored-by: Jonas Devlieghere <jonas at devlieghere.com>