[Bazel] Update mpfr to 4.2.2.bcr.4 (#242184)
Updates the BCR mpfr dependency from 4.2.2.bcr.3 to 4.2.2.bcr.4 to
restore float128 detection when building MPFR from source
(bazelbuild/bazel-central-registry#11691).
Fixes #240663
See https://github.com/bazelbuild/bazel-central-registry/issues/11691
[COFF] Parallelize PDB Section Contrib. NFC
PDB's createSectionContrib was computed serially.
This contains a CRC over data which can be expensive
for large binaries.
[CIR] Wire unreachable, return, and switch to MemoryEffectsOpInterface
These operations should be naturally Pure. However, cir.return and
cir.unreachable can inside cir.scope and cir.if. Making it create side
effect if it jump out of scope.
As a result, we check its parent. If it is a function, we make it
pure. Otherwise, we define read an write.
Notice that it is a ground work rather than enable some optimization
now. Currently, Core MLIR doesn't eliminiate now. However, Enzyme MLIR
did a much more optimization and require this feature. I think it
makes sense to have this in upstream now.
Assisted-by: Claude # Test
[clang-tidy][docs] Rewrite modernize check docs to Markdown [2/4] (#232214)
Tracking issue: #201242
See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This is the second part of rewriting check documentations in modernize
module from reST to MyST Markdown.
AI Usage: This was prepared with rnk's fork of rst2myst and
GPT5.6-assisted (both Codex and AmpCode) cleanup.
I manually verified that the documentation renders as expected.
Preview site:
https://broken.life/llvm-staging/modernize-markdown-port/index.html
[clang-tidy][docs] Rename modernize check docs to Markdown [2/4] (#232213)
Tracking issue: #201242
See the [migration guide] for more information.
[migration guide]:
https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines
This is the second part of the mechanical rename of the check
documentations in modernize module.
The rewrite is provided by the next PR in this stack.
[NFC][Clang][CodeGen] Take const& in deleted copy assignment operators (#241713)
436f391d1d56 (#154671) deleted the copy assignment operators of
`ApplyInlineDebugLocation` and `SanitizerDebugLocation` with a non-const
parameter. That still leaves the classes non-copyable, but it breaks
`std::optional<SanitizerDebugLocation>`: libstdc++ fails to default the
copy assignment of its storage.
Use `const &`, matching the deleted copy constructors.
Needed by #241646.
Assisted-by: Gemini
[ORC] Add SPS serialization for JITDylibLookupFlags (#242152)
JITDylibLookupFlags moves from Core.h into a new
Shared/JITDylibLookupFlags.h (still in the llvm::orc namespace),
alongside a new SPSJITDylibLookupFlags tag that serializes it as a bool:
true for MatchAllSymbols, false for MatchExportedSymbolsOnly. This
matches the ORC runtime's encoding, and will be used by an upcoming
call-controller handler that receives lookup flags from the executor.
The enum has to move because headers in Shared/ can't include Core.h.
Core.h includes the new header, so existing users are unaffected. The
enum's doc comment is also fixed to name its actual enumerators.
[ubsan] Improve scoped enum diagnostic printer (#216460)
Noticed that ubsan diagnostic which print out enum underlying value,
default to `<unknown>` for scoped enum.
**Why**
The original code path in `EmitCheckTypeDescriptor` checks against
whether the type is integer via `isIntegerType(),
isSignedIntegerType()`. Per language, enum class types are never
considered integer types so that always fails and then the UBSan runtime
default prints `<unknown>` instead of the real value.
**Fix**
Simply extract the enum's underlying integer type up front and use that
for the int checks instead of the enum type itself.
**before**
`error: load of value <unknown>, which is not a valid value for type
'enum EBool'`
[12 lines not shown]
[GlobalISel] Address cache hint test review feedback
Remove redundant intrinsic declarations and add a separate SelectionDAG test documenting the currently dropped X86 target-intrinsic cache hint.
clang: Don't set redundant intrinsic callsite attributes
Clang has a bad habit of spamming unnecessary callsite attributes that
are redundant with the function declaration. Fix one common source on
emitted intrinsics.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[BOLT] Preserve .cfi_signal_frame when rewriting .eh_frame (#242044)
BOLT dropped the "S" CIE augmentation emitted by .cfi_signal_frame, so
every rewritten FDE was placed under a plain "zR" CIE. Unwinders that
detect signal trampolines from CFI (lldb after #237016) then fail
to recognize them in BOLTed binaries.
Record the signal frame flag from the input CIE and re-emit it with
emitCFISignalFrame().
Assisted-by: Claude Opus 5.5
Test Plan: added bolt/test/X86/cfi-signal-frame.s
[LoongArch][NFC] Move XOR combine into performXORCombine
Extract the inline ISD::XOR handling in PerformDAGCombine into a
dedicated performXORCombine helper, matching how the other opcodes
(AND, OR, SETCC, ...) are structured. No functional change.
Also fix a clang-format issue in emitPseudoVMSKCOND.
Assisted-By: LLM
Revert "[DwarfDebug] Add applyDwarfVersion() so the targets like NVPTX can recompute the version-derived state" (#242150)
Reverts llvm/llvm-project#234510 as this PR introduce build breakage on
pre/post submit builders.