[NvlinkWrapper] opt-remarks-filter -> opt-remarks-passes
`renderRemarksOptions` in Clang's `CommonArgs.cpp` translates
`-foptimization-record-passes` to `--plugin-opt=opt-remarks-passes`.
`lld` expects that, but `clang-nvlink-wrapper` currently expects
`--plugin-opt=opt-remarks-filter` instead, producing errors like:
```
clang-nvlink-wrapper: Unknown command line argument opt-remarks-passes=inline
```
In `NVLinkOpts.td` for `clang-nvlink-wrapper`, this patch adds
`--plugin-opt=opt-remarks-passes` and makes
`--plugin-opt=opt-remarks-filter` an alias. If there are no users of
the latter, we can consider removing it.
Assisted-by: LLM
[CIR] Implement 'dsoLocal and 'protected visibility' (#240985)
This patch implements the setDSOLocal and protectedVisibility missing
features. These are both required to get the 'dso_local' to show up
correctly on RTTI members and to get their visibility correct.
Previously, we approximated it based on the MLIR public/private-ness,
but this doesn't take into account the visibility attribute, nor RTTI
correctly.
This patch adds that, and adds testing for all of the places this
changes. However, note that LLVM-IR will not print dso_local if it is
'implied' so it wasn't as obvious that it was not correctly marked in
CIR (but LLVM-IR effectively 'got it right').
Additionally, mlir default-sets declarations as 'private', so we were
missing a few cases where the linkage wasn't being set properly. This
patch ALSO updates those. This again is something that doesn't really
end up in the LLVM-IR, just in the MLIR types however, so it isn't
really visible, just another 'correctness' fix.
[AMDGPU] Reduce resource align when shrinking buffer loads
Since the `align` on buffer intrinsics includes the offset argument,
the demand, `simplifyAMDGCNMemoryIntrinsicDemanded` needs to account
for the value added to that offset, which might reduce the alignment
of the load.
AI disclosure: Claude wrote the code, I looked at it and wrote the
commit message.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[AMDGPU] Pre-commit tests for buffer load shrinking with align (#240944)
Buffer load demanded elements analysis isn't shrinking the `align`
annotated on the intrinsic correctly.
AI disclosure: Claude wrote these, I wrote this message
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Attributor: Fix light-preserved-analyses.ll with GCC-built opt (#241016)
The printed RequireAnalysisPass type name depends on the host
compiler. GCC omits the defaulted AnalysisManager template argument,
so the check line failed on GCC-built bots. Match it with a regex like
the other pass manager tests.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[RISCV][P-ext] Make v2i32 insert_vector_elt with constant indices legal for RV32.
We can select to an insert_subreg.
The default lowering created a store+load to stack that got folded,
but left behind the stack slot allocation.
Assisted-by: Claude
RISCV: Fix ensureDominates crashes on operands without a vreg def
ensureDominates used an unchecked getVRegDef on every register
operand. This crashed on physical register uses or undef vregs. Also
fix dropping an incoming undef flag which would fail the verifier.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[AARCH64][COST]Cost non-pow2 i1 vector bitcast to int
No bitmask lowering for non-pow2 i1 vectors; lanes are extracted and
packed one by one. Price extracts plus N-1 combines instead of a
single cross-bank move.
Required to avoid regressions in non-power-of-2 SLP support
Assisted-by: Cursor
Reviewers: paulwalker-arm, huntergr-arm, sdesmalen-arm, davemgreen
Pull Request: https://github.com/llvm/llvm-project/pull/238357
RuntimeLibcalls: Add missing attributes to memory and allocator libcalls
Add the attributes inferLibFuncAttributes would give these functions.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Move malloc, calloc and free attributes to TableGen
This requires new attribute plumbing for attributes that have an
argument value.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>