[lldb] Consume the located result by rvalue reference (NFC) (#217667)
FinishSearch consumes the Expected it is handed, either taking the error
out of it or moving what the search found into the binary spec, and its
caller already hands over ownership with an explicit move. Taking it by
value move constructs 1.5 kB for nothing, where the signature can say
the same thing and copy nothing.
Reported by Coverity (CID 1685297).
Assisted-by: Claude
clang: Emit legacy amdgcn triple in HIP fatbin bundle entries (#217640)
Unfortunate the HIP runtime is hardcoding the amdgcn-amd-amdhsa--
prefix in the bundle ID checks, so force these to the legacy name
regardless of the active triple. Hopefully clr will stop hardcoding these so
we can drop this at some point.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[clang][dataflow] Handle when `this` refers to a different location (#146900)
When `this` is under a CXXDefaultInitExpr it could refer to the location
of an InitListExpr object instead of the `this` of a member function.
E.g.:
```
struct S {
int x;
int y = this->x;
};
struct R {
int foo() {
// `this` for `a` refers to an R, but `this`
// for `x` refers to an S.
return S{this->a}.y;
}
int a;
};
```
[2 lines not shown]
clang: Emit "target-abi" module flag for ARM
Previously only RISCV emitted the "target-abi" module flag.
We probably should just generally emit this for non-empty ABI names
but that's a broader behavior change. I'm also confused because the
clang side defines a non-empty value for many targets with no apparent
use in llvm.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[GISel] Hold IRTranslatorImpl rather than recreating (#217440)
`IRTranslatorImpl` holds some state/data structures that are expensive
to fully recreate for each MF, so put it into a unique_ptr so we can use
a common implementation. Forward declare `IRTranslatorImpl` and define
constructors/operators in the source file so we can avoid needing to put
the definition of `IRTranslatorImpl` inside of `IRTranslator.h`. This
seems to resolve the performance regression observed in #216915.
https://llvm-compile-time-tracker.com/compare.php?from=9932f190f42e1a12c3cafea23938241abf6337ca&to=394a782c063f55377188044296c5911db45c9a38&stat=instructions:u
LLM assisted.
clang: Use the context printing policy in TemplateDiff (#217651)
TemplateDiff made a new PrintingPolicy instead of using ASTContext's.
Sema::getPrintingPolicy() tweaks ASTContext's, and sema template diffing
didn't pick up those changes.
Sema::getPrintingPolicy() does two things:
1. Something for bool vs _Bool for C (where template diffing doesn't
apply)
2. Set EntireContentsOfLargeArray to false
Before this patch, the latter had no effect in diff mode, meaning we the
same type printed differently in a diagnostic depending on if used
template diffing. Now they're consistent.
(This made no difference before https://reviews.llvm.org/D115031, which
probably just forgot to update this call site.)
[clang][test] Fix misspelled FileCheck prefix in static-init-3.cpp (#217628)
`clang/test/CodeGenCXX/static-init-3.cpp` uses `FileCheck %s` (prefix
`CHECK`) but the second instance line was `// CHECJ:`. That prefix is
undefined, so the check never ran.
Fixes one of the misspelled prefixes listed in #94108.
Assisted-by: Grok (xAI)
Revert "[flang][FIRToSCF] Recompute a typed induction variable in closed form (#217051)" (#217654)
This reverts commit de79344abe04cab8fe538cdd0f975f78d941cd24.
This caused regressions in some internal tests, so reverting for now.
[libsycl] Fix debug build error caused by RTTI option mismatch (#210997)
Fixes an undefined reference to typeinfo for `llvm::ErrorInfoBase`
during a debug build of libsycl.
[MLIR][SparseTensor] Reject unsupported symbolic demapping (#217476)
Symbolic maps cannot be lowered without runtime symbol operands. Decline
the demapping rewrites before they create invalid reinterpretations, and
report a legalization failure instead of asserting.
Assisted-by: Codex
[MLIR][SparseTensor] Enable strict property assembly format (#217292)
Enable strict property assembly format mode for the SparseTensor
dialect. Spell level, dimension, sort, and iteration-order properties
directly in declarative assembly formats while dropping unneeded
property dictionaries from formats that already cover their inherent
attributes.
Refresh SparseTensor dialect and integration tests so those properties
use direct syntax while ordinary attributes remain in attr-dict.
Assisted-by: Codex
[OMPIRBuilder] Prevent dangling InsertPt in IRBuilder. (#148887)
There are places in `PostOutlineCB` callbacks where the instruction is
deleted while `InsertPt` in the `IRBuilder` pointed to it causing a
dangling `InsertPt`. This PR fixes that by ensuring that the `InsertPt`
is always valid.
This fixes the sanitizer fail that was seen in
https://github.com/llvm/llvm-project/pull/148284.
ARM: Read the ABI from the "target-abi" module flag (#217600)
This module flag is already used by RISCV, but ARM ignored it and
still exclusively relied on the -target-abi global option.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
Add PISA codegen pipeline and lowering passes
Add the IR- and MIR-level passes that make up the PISA code generation
pipeline and wire them into PISAPassConfig in PISATargetMachine:
- Intrinsic handling: PISAEmitIntrinsics, PISAExpandIntrinsics,
PISAReplaceIntrinsics
- Call/ABI lowering: PISALegalizeCalls, PISAKernelByValArgsLowering
- IR preparation: PISAPropagateNullPointers, PISALayout, PISAConstProp
- Legalization/verification: PISALegalizePredicates, PISAVerifyTypes,
PISAVerifier
- Post-selection: PISAScopeSelector, PISACacheHintSelector,
PISALegalizeSubregAccess, PISAOptimizeSubregAccess,
PISAOptimizeRedundantCopies, PISAMarkConvergentNoMerge,
PISAInsertLifetimeStart
PISAPassConfig now overrides the GlobalISel and pre/post-regalloc hooks
to run these passes, disables the machine passes that assume physical
registers, and runs the load/store vectorizer and atomic expansion in
[4 lines not shown]
[SimplifyCFG] Cost speculated selects with their real scalar condition
validateAndCostRequiredSelects() priced the selects that speculativelyExecuteBB()
would create using CmpInst::makeCmpResultType(PN->getType()) as the condition
type. For a vector phi, that asks the target for the cost of a per-lane vector
select, but the select actually created uses the branch condition, which is
always a scalar i1.
This only changes behaviour where a target's cost model distinguishes the two
condition types. Of the targets checked, only AArch64 does.
[lldb] Add MSVC STL/libstdc++ formatter for std::filesystem::path (#217246)
Summarize `std::filesystem::path` from the stored path string. MSVC
keeps it in `_Text`; libstdc++ uses `_M_pathname` (type name
`std::filesystem::__cxx11::path`). Matching uses a regex that covers
both.
Tests: layout simulator plus a generic libstdc++/MSVC STL test.
Part of #24834
Assisted-by: Grok 4.6
Assisted-by: codex-5.6-high
---------
Co-authored-by: Bjorn Schobben <bjorn.schobben at aimsport.com>