[clang-tidy] Support comments in WarningsAsErrors (#171816)
Closes #171792
---------
Co-authored-by: Victor Chernyakin <chernyakin.victor.j at outlook.com>
[libc++][filesystem] Applied `[[nodiscard]]` (#171085)
`[[nodiscard]]` should be applied to functions where discarding the
return value is most likely a correctness issue.
- https://libcxx.llvm.org/CodingGuidelines.html
[TableGen] Improve generated comments for RegClassByHwMode tables
Adding a comment for which RegClassByHwMode the entry refers to is
helpful when staring at this generated table.
Pull Request: https://github.com/llvm/llvm-project/pull/171716
[libc++][optional] Applied `[[nodiscard]]` (#170045)
`[[nodiscard]]` should be applied to functions where discarding the
return value is most likely a correctness issue.
- https://libcxx.llvm.org/CodingGuidelines.html
- https://wg21.link/optional
---------
Co-authored-by: William Tran-Viet <wtranviet at proton.me>
[NFC][PowerPC] Optimize vector compares for not equal to non zero vectors (#171635)
Lockdown instructions for vector compares `not equal to non-zero (Ex:
vec[i]!=7)`. Current implementation can be made better by removing the
negation and using the identity ``` 0XFFFF + 1 = 0 and 0 + 1 = 0 ```
Co-authored-by: himadhith <himadhith.v at ibm.com>
[TSan] Zero-initialize Trace.local_head
Trace.local_head is currently uninitialized when Trace is created. It is
first initialized when the first event is added to the trace, via the
first call to TraceSwitchPartImpl.
However, ThreadContext::OnFinished uses local_head, assuming that it is
initialized. If it has not been initialized, we have undefined behavior,
likely crashing if the contents are garbage. The allocator (Alloc)
reuses previously allocations, so the contents of the uninitialized
memory are arbitrary.
In a C/C++ TSAN binary it is likely very difficult for a thread to start
and exit without a single event inbetween. For Go programs, code running
in the Go runtime itself is not TSan-instrumented, so goroutines that
exclusively run runtime code (such as GC workers) can quite reasonably
have no TSan events.
The addition of such a goroutine to the Go test.c is sufficient to
[20 lines not shown]
[MLIR][Python] Fix AffineIfOp insertion point (#171957)
This bug was introduced by #108323, where the loc and ip were not
properly set. It may lead to errors when the operations are not linearly
asserted to the IR.
[libc++][format] Applied `[[nodiscard]]` to more classes (#170808)
`[[nodiscard]]` should be applied to functions where discarding the
return value is most likely a correctness issue.
- https://libcxx.llvm.org/CodingGuidelines.html
Some classes in `<format>` were already annotated. This patch completes
the remaining.
[RISCV] Add an OperandType to VMaskOp. NFC (#171926)
Use that instead of register class to detect the mask operand in
lowerRISCVVMachineInstrToMCInst.
There are other instructions like vmerge and vadc that have a VMV0
operand that isn't optional and do not reach this code. Having a
dedicated marker for the optional mask is more precise.
[RISCV] Use VMV0 instead of VMaskOp in masked vector pseudoinstructions. NFC (#171924)
VMaskOp primarily exists for parsing/printing in the MC layer where the
mask is optional. The vector pseudos are split into mask and unmasked
versions. The mask is always rquired for the mask version.
[IR] Optimzie `PHINode::removeIncomingValue()` by swapping with the last of incoming value.
Add an optional argument `KeepIncomingOrder` defaults true, when `KeepIncomingOrder` is true,
the new implementation simply moves the last incoming value and block into the position of the element being removed.
This improve compile-time for PHI nodes with many predecessors.
[AMDGPU] DS loop wait relaxation -- more test cases and improvements to handle them (4/4)
Add handling for same-iteration use/overwrite of DS load results:
- Track DS load destinations and detect when results are used or
overwritten within the same iteration
- Compute FloorWaitCount for WMMAs that only use flushed loads
Add bailout for tensor_load_to_lds and LDS DMA writes after barrier
Add negative test based on profitability criteria
Assisted-by: Cursor / claude-4.5-opus-high