[mlir][CF] Add `ub.unreachable` canonicalization (#169873)
Basic blocks with only a `ub.unreachable` terminator are unreachable.
This commit adds a canonicalization pattern that folds to `cf.cond_br`
to `cf.br` if one of the destination branches is unreachable.
Replace LIBOMP_FORTRAN_MODULES with RUNTIMES_FLANG_MODULES_ENABLED
For some reason there were to different flags to build the Fortran modules:
1. LIBOMP_FORTRAN_MODULES=ON and CMAKE_Fortran_COMPILER
2. LIBOMP_FORTRAN_MODULES_COMPILER
When using the second, LIBOMP_FORTRAN_MODULES would be off. Trying to
keep the option available causes build failures by misinterpretation.
[VPlan] Skip cost verification for loops with EVL gather/scatter.
The VPlan-based cost model use vp_gather/vp_scatter for gather/scatter
costs, which is different to the legacy cost model and cannot be matched
there. Don't verify the costs match for plans containing gather/scatters
with EVL.
Fixes https://github.com/llvm/llvm-project/issues/169948.
[VPlan] Turn IVOp assertion into early exit.
Turn assertion added in 99addbf73 [0] into an early exit.
There are cases where the operand may not be a
VPWidenIntOrFpInductionRecipe, e.g. if the IV increment is selected,
as in the test cases.
[0] https://github.com/llvm/llvm-project/pull/141431
ARC: Override pseudos with pointers
This ports #159881 fix for other targets and fixes
```
error: missing target override for pseudoinstruction using PointerLikeRegClass
```
[CIR][X86] Implement lowering for AVX512 mask builtins (#169774)
This patch adds CIR codegen support for AVX512 mask operations on X86,
including kadd, kand, kandn, kor, kxor, knot, and kmov in all supported
mask widths. Each builtin now lowers to the expected vector<i1> form and
bitcast representations in CIR, matching the semantics of the
corresponding LLVM intrinsics.
[clang][bytecode] Unify elementwise integer builtins using callback pattern (#169957)
This patch refactors the handling of elementwise integer unary
operations to use a unified callback-based approach, eliminating code
duplication.
Changes:
- Extended interp__builtin_elementwise_int_unaryop to handle vector types
- Replaced BI__builtin_elementwise_popcount with callback invocation
- Replaced BI__builtin_elementwise_bitreverse with callback invocation
- Removed interp__builtin_elementwise_popcount function
The new approach uses a lambda function to specify the operation
(popcount or reverseBits), which is applied uniformly to both scalar and
vector operands. This reduces code duplication and makes it easier to
add similar builtins in the future.
Fixes #169657
[clang][NFC] Declare `CXXBasePaths::isAmbiguous` as `const` (#169944)
To make this change, we have to use `lookup` instead of `operator[]` on
a map. They both return the same thing: a default constructed value. The
difference is that `lookup` default constructs a value and then returns
it, whereas `operator[]` default constructs a value, inserts it into the
map, and then returns a reference to that. Given that we are using a
by-value return, the only way this is different is if a later use of the
map depends on a value being at that key.
The map is a private variable of the class, so the only possible users
are are other member functions. The only other use of the map that cares
about the contents of the map is in `lookupInBases`, and it accesses the
map with `operator[]`. This means that attempting to access the same
element in this function will default construct the value before doing
anything with it, which means it would do the exact thing it needs to do
in the case where we are looking up a non-existent key, therefore no
behavior has changed.
[4 lines not shown]
[NFC][Linalg] Introduce ConvMatchBuilder + refactor Conv matchers (#169704)
-- This commit is a follow-up and third in the series of adding
matchers for conv/pool ops. Refer:
https://github.com/llvm/llvm-project/pull/163724
-- It introduces ConvMatchBuilder class in order to reduce the
repetitive code across Conv1D/2D/3D/Depthwise/Pooling variants.
-- Refer to [Conv2D
thread](https://github.com/llvm/llvm-project/pull/168362#issuecomment-3575972133)
for further context.
Signed-off-by: Abhishek Varma <abhvarma at amd.com>