4 Commits

Author SHA1 Message Date
Adrian Kuegel
2fe9a342a6 [mlir][SCF] Use getResult() instead of static_cast<Value>(). 2023-10-23 05:05:28 +00:00
Mehdi Amini
35e4a28f04 Fix MLIR gcc7 build: ambiguous overload from user conversion
The implicit conversion from an op to a Value is not triggered for some reasons:

/LoopLikeSCFOpsTest.cpp:78:57: error: call of overloaded ‘ValueRange(mlir::arith::ConstantIndexOp)’ is ambiguous
       b.create<scf::ParallelOp>(loc, ValueRange(lb.get()), ValueRange(ub.get()),

explicitly taking the result of the op should solve it.
2023-10-20 12:16:29 -07:00
Adrian Kuegel
40ba0ca521 [mlir][SCF] Fix memory leak in LoopLikeSCFOpsTest.cpp 2023-10-20 11:36:50 +00:00
Felix Schneider
aa0208d1bc
[mlir][scf] Implement getSingle... of LoopLikeOpinterface for scf::ParallelOp (#68511)
This adds implementations for `getSingleIterationVar`,
`getSingleLowerBound`, `getSingleUpperBound`, `getSingleStep` of
`LoopLikeOpInterface` to `scf::ParallelOp`. Until now, the
implementations for these methods defaulted to returning `std::nullopt`,
even in the special case where the parallel Op only has one dimension.

Related: https://github.com/llvm/llvm-project/pull/67883
2023-10-20 09:07:25 +02:00