[RISCV] Make clang's -mcpu=help and -mtune=help accurate for RISC-V. (#243697)
Clang has multiple -mtune only CPU names like -mtune=sifive-7-series.
These should not be printed by -mcpu=help. There also RV32 and RV64 only
CPUs.
Previously we used the -mcpu=help from LLVM's MC layer to print the
names, but it doesn't have this granularity of information.
This patch special cases RISC-V in the clang driver to get the lists
from RISCVTargetParser. A new -print-supported-tune-cpus option is added
to request the tune CPU list. -mtune=help aliases this option.
The behavior for other targets is unchanged. Though X86 has similar issues
and should probably use X86TargetParser.
Assisted-by: Claude
RuntimeLibcalls: Add attributes to __kmpc_alloc_shared and __kmpc_free_shared
Match the attributes OpenMPIRBuilder gives these declarations.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[ARM] Split vector store of constantpool loads (#242865)
Given a store(buildvector(constants)) it can be more efficient to
materialize the constants and store individually with stm / strd, to
avoid the extra constant pool load. The SLP vectorize will generate such
a pattern and instead of adjusting the cost, this adds a combine to
scalar to address all examples where this can be generated. Loop
invariant loads can be excluded, and whilst the cost model isn't perfect
but can be improved in the future if needed.
[NFC][Attributor] Move fptrunc_round Attributor tests to their own file. (#244492)
Also renamed the tests since I plan to refine the KnownFPClass based on
the rounding mode.
[clang] Speed up diagnostic state file lookup
Store File records behind stable pointers in a DenseMap instead of a
std::map. Keep dumps and serialized mappings ordered by FileID,
and create deserialized entries lazily.
CTMark (-march=rva23u64 -O3), three interleaved pairs: 0.361% lower
median total compile time and 0.467% lower workload geomean.
Assisted-by: TRAE CLI (GPT-6)
Reviewers: zmodem, Sirraide, vgvassilev, tbaederr, kazutakahirata
Reviewed By: zmodem
Pull Request: https://github.com/llvm/llvm-project/pull/241234
[Attributor] Don't derive interface attributes from non-exact definitions (#243310)
The arguments and the return value of a function that might be replaced
by another definition, e.g. a `linkonce_odr` function, are never
updated. But some AAs still took known information from its body in
`initialize`, which was kept and propagated to the callers: the uses of
the arguments (`followUsesInMBEC`), assumptions (`getAttrsFromAssumes`),
and the returned values (`AANonNull::isImpliedByIR`). Add
`Attributor::canUseBodyFor` and skip the body for the interface of such
functions, as FunctionAttrs does.
Depends on #243247.
Assisted-by: Claude Opus 5.5
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>