[clang-tidy] Fix readability-trailing-comma false positive on #endif (#219634)
The `readability-trailing-comma` check looks at the token immediately
before an enum's closing brace to decide whether a trailing comma is
present. When the last enumerators are wrapped in `#ifdef` / `#else` /
`#endif`, that token is the directive identifier `endif`, so the check
reports a missing comma and `-fix` inserts `,` after `#endif`. That is
outside the enumerator list and corrupts the source even when every
enumerator already has a trailing comma.
Skip the diagnostic when the token before `}` is a preprocessor
directive (`#` or a token preceded by `#`). An enumerator whose name
happens to be `endif` is still diagnosed, because it is not preceded by
`#`.
Fixes #218957
[SLP]Fix fmul/fadd fusion costs and retry FMA seeds after all blocks
Fix the cost for the scalar of fmul+fadd pairs: fused fmul lanes add
the full fmul cost, fadd lanes with gathered fmuls were costed as
fmuladd, and the FMulAdd combine missed fmuls in the second operand,
c - a*b and constant lanes. Cost fused fmul lanes at (fmuladd - fadd),
such fadd lanes at (fmuladd - fmul), form the combine for either
operand, and treat a multi-use reduction root as fused. Extract nodes
take no credit for extracts the target folds into their users.
Reviewers: RKSimon, bababuck, MrSidims
Pull Request: https://github.com/llvm/llvm-project/pull/226117
Reapply "[clang][bytecode] Stop relying on `CheckEvaluationResult()` … (#226879)
…(… (#226637)
This reverts commit e0316c1b4762263caa49e3c41ddde752a2b6b775.
This time we also check `Pointee.isInitialized()` in
`PtrView::isInitialized()` to catch cases where we call `invokeDtor()`
on a Block.
dns/knot3: Don't abuse DOCS for MANPAGES
The %%DOCS%% substitution was both installing the manpages
and the documentation, so fix that by using MANPAGES instead.
While here:
- Remove option descriptions for IDN and DOCS since
they are already defined in Mk/bsd.options.desc.mk.
- Pet portclippy.
PR: 298789
Approved by: osa, vvd (Mentors, implicit)
Co-authored-by: Vladimir Druzenko <vvd at FreeBSD.org>
[OpenMP] Update modifier set properties on some clauses (#226508)
The modifier sets on DEPEND, NUM_TEAMS and REDUCTION in 6.1 only have
the exclusive property.
[AMDGPU][NewInsertWaitcnt] Add Event Tracker
See #226335
Introduction
Adds the basic infrastructure needed to track in-flight records for each `InstCounterType`.
This is not a full replacement of `SIInsertWaitcnts::WaitcntBrackets` and it does not
aim to be one.
One goal with the new implementation is to avoid having a single "tracker" class
that does everything. Instead, the `EventTracker` aims to do one thing and do it right:
preserve the history of a counter (instructions + events issued) and the value of the counter.
Any specific queries, such as "what STORE_CNT do I need to use this RU" is something that belongs
to helper methods in the client of the class or a utils file.
Class Design
This class is designed to use a single "source of truth" for all information, which is a compact
[33 lines not shown]
[DWARF] Support Roc Language (#225631)
The Roc language has been assigned language codes for DWARF v5 and v6.
See [DWARF Issue 260821.1](https://dwarfstd.org/issues/260828.1.html).
[VPlan] Distribute execution frequencies with BlockFrequencyInfo's code. (#226841)
Instead of hand-rolling frequency propagating, manually construct BFI
and use BFI::distributeMass.
Adds a final step where frequencies are rounded up to at least one, to
distinguish between unreachable and almost never executed blocks. This
matches BFI behavior.
Note that we need to still track whether frequencies are from edges with
unknown profile info.
PR: https://github.com/llvm/llvm-project/pull/226841
net/zsync: Update 0.6.6 => 0.8.0
Upstream moved to GitHub and rewrote zsync in Go.
It's recommended to check the details from changelog.
While here:
- Create a pkg-message to include this information.
- Add TESTING_UNSAFE, since it requires Apache webserver
running and have recursive directory problems.
Changelog:
https://github.com/cph6/zsync/blob/v0.8.0/NEWS
PR: 298908
Approved by: osa, vvd (Mentors, implicit)
[MLIR][NVVM] Add SM version requirements to mbarrier Ops (#224105)
The mbarrier Ops had no `NVVMRequiresSM` trait, so a `gpu.module`
targeting an older chip (e.g. `sm_75`) accepted them, and the error only
showed up later. This adds the trait to all 13 of them, same as #192257
and `mbarrier.check_layout` in #217252.
| floor | Ops |
|---|---|
| `sm_80` | `init`, `inval`, `arrive`, `arrive_drop`,
`arrive.nocomplete`, `arrive_drop.nocomplete`, `test.wait` |
| `sm_90` | `expect_tx`, `complete_tx`, `arrive.expect_tx`,
`arrive_drop.expect_tx`, `try_wait`, `try_wait.parity` |
The floors come from the Target ISA Notes in the [PTX ISA
8.5](https://docs.nvidia.com/cuda/pdf/ptx_isa_8.5.pdf) (section
9.7.12.15), and they match the backend: every Op that lowers to an
intrinsic fails to compile one arch below its floor and compiles at it.
`arrive_drop` at sm_80 relies on #222916.
[17 lines not shown]
[AMDGPU][NewInsertWaitcnt] Add Event Tracker
See #226335
Introduction
Adds the basic infrastructure needed to track in-flight records for each `InstCounterType`.
This is not a full replacement of `SIInsertWaitcnts::WaitcntBrackets` and it does not
aim to be one.
One goal with the new implementation is to avoid having a single "tracker" class
that does everything. Instead, the `EventTracker` aims to do one thing and do it right:
preserve the history of a counter (instructions + events issued) and the value of the counter.
Any specific queries, such as "what STORE_CNT do I need to use this RU" is something that belongs
to helper methods in the client of the class or a utils file.
Class Design
This class is designed to use a single "source of truth" for all information, which is a compact
[33 lines not shown]
[Offloading] Add support for compressed OffloadBinary types
Summary:
Offload binaries are used to store many heterogenous architectures into
a singel offloading blob. These lists can get very large so this PR adds
the option to compress them with the LLVM provided compression
libraries.
The implementation is quite simple, we simply compress all the buffers
after the header into a single compressed blob, then re-construct the
header. Extracting is the reverse.
The biggest change is that the offload binary now **owns** the memory,
whereas before we simply took a reference to it. This is necessary
because the decompression must create new memory compared to what the
user provided. This adds an extra copy internally, but it also
simplifies the V2 additions.
This does not wire up any clang/HIP support, just providing the
functionality.
[Support] Infer compression format from zlib and zstd headers
Summary:
Identify compressed streams from their bitstream headers so callers can
decompress without naming the format. Recognize every valid RFC 1950
zlib header and the zstd frame magic, and reuse that for
getReasonIfUnsupported and decompress. Collapse the AST reader onto the
new helpers.