[MLIR][AMDGPU] Implement reifyDimOfResult for FatRawBufferCastOp (#171839)
Since `FatRawBufferCastOp` preserves the shape of its source operand,
the result dimensions can be reified by querying the source's
dimensions.
---------
Signed-off-by: Yu-Zhewen <zhewenyu at amd.com>
[NVPTX] Fixup and refactor brx.idx support (#171933)
Guard "brx.idx" generation to appropriate PTX ISA and SM version.
In addition, do some minor refactoring moving the expansion into ISel as
doing this during operation legalization is more complex and offers no
benefits.
fixes https://github.com/llvm/llvm-project/issues/171709
[clang-doc] Add class template to HTML (#171937)
Emit class template declaration info so that it appears above a record's name in the Mustache template.
[mlir][PDL] Add CallableOpInterface to pdl.pattern and inlining support to pdl
This commit enables inlining of calls within PDL patterns by:
1. Adding CallableOpInterface to PatternOp, and implementing the required
interface methods (getCallableRegion, getArgumentTypes, getResultTypes)
and the ArgAndResultAttrsOpInterface stubs to make pdl.pattern a
valid callable.
2. Adding the dialect inliner interface that marks all operations as legal
to inline.
This is particularly useful for nonmaterializable patterns that may
contain func.call operations to external functions defining pattern
matching or rewrite logic. After inlining, these patterns can be
transformed into standard materializable PDL patterns.
NOTE: The pattern op needs to be marked callable as the inliner doesn't
allow inlining if there's no callable ancestor.
[33 lines not shown]
[AArch64][GlobalISel] Fix vector lrint/llrint fallbacks (#170814)
Add .lower() to vector lrint/llrint to enable lowering instead of
falling back to SelectionDAG.
[clang-doc] Add JSON output to existing template tests (#171936)
clang-doc has some useful, preexisting tests for templates, so we'll
reuse them to cover more cases.
Fixes non-functional changes found static analyzer (#171197)
As per @arsenm 's instructions, I've separated the non-functional
changes from https://github.com/llvm/llvm-project/pull/169958.
Afterwards I'll tackle the functional ones one by one. I hope I did
everything right this time.
Full descriptions in the article:
https://pvs-studio.com/en/blog/posts/cpp/1318/
3. Array overrun is possible.
The PVS-Studio warning: V557 Array overrun is possible. The value of
'regIdx' index could reach 31. VEAsmParser.cpp 696
10. Excessive check.
The PVS-Studio warning: V547 Expression 'IsLeaf' is always false.
PPCInstrInfo.cpp 419
11. Doubling the same check.
The PVS-Studio warning: V581 The conditional expressions of the 'if'
statements situated alongside each other are identical. Check lines:
5820, 5823. PPCInstrInfo.cpp 5823
[11 lines not shown]
[CIR][NFC] Fix the mms-bitfields test file (#172060)
Fix the args in the mms-bitfields test file to be aligned with the same
test in classical codegen (clang/test/CodeGen/mms-bitfields.c). After
#71148 is merged
[LoopPeel] Check for onlyAccessesInaccessibleMemory instead of llvm.assume in peelToTurnInvariantLoadsDereferenceable. (#171910)
onlyAccessesInaccessibleMemory can't alias with a load. This allows us
to ignore more intrinsics than llvm.assume.
Follow up from #171547
[clang-doc] Add JSON output to existing template tests
clang-doc has some useful, preexisting tests for templates, so we'll
reuse them to cover more cases.
[Delinearization] Remove `isKnownNonNegative` (#171817)
Delinearization has its own `isKnownNonNegative` function, which wraps
`ScalarEvolution::isKnownNonNegative` and adds additional logic. The
additional logic is that, for a pointer addrec `{a,+,b}`, if the pointer
has `inbounds` and both `a` and `b` are known to be non-negative, then
the addrec is also known non-negative (i.e., it doesn't wrap). This
reasoning is incorrect. If the GEP and/or load/store using the pointer
are not unconditionally executed in the loop, then the addrec can still
wrap. Even though no actual example has been found where this causes a
miscompilation (probably because the subsequent checks fail so the
validation also fails), simply replacing it with
`ScalarEvolution::isKnownNonNegative` is safer, especially it doesn't
cause any regressions in the existing tests.
Resolve #169811
[lldb][ClangExpressionParser] Emit more accurate language note for Objective-C++ fallback (#172047)
We fall back to `Objective-C++` when running C++ expressions in frames
that don't have debug-info. But we were missing a fallback note for this
situation. We would now print following note on expression error:
```
note: Possibly stopped inside system library, so speculatively enabled Objective-C. Ran expression as 'Objective C++'.
```
AMDGPU: Introduce f64 rsq pattern in AMDGPUCodeGenPrepare
Handle this here instead of DAGCombine, mostly because the f32
case is handled here due to the dependency on !fpmath. Also we can
take advantage of computeKnownFPClass.