Lines Matching defs:reduction

35 /// Matches a block containing a "simple" reduction. The expected shape of the
62 /// Matches a block containing a select-based min/max reduction. The types of
65 /// arguments. If a reduction is matched, `ifMin` will be set if the reduction
131 // The reduction is a min if it uses less-than predicates with same operands
182 /// Creates an OpenMP reduction declaration and inserts it into the provided
184 /// value `initValue`, and the `reductionIndex`-th reduction combiner carried
216 /// Adds an atomic reduction combiner to the given OpenMP reduction declaration
240 /// Creates an OpenMP reduction declaration that corresponds to the given SCF
241 /// reduction and returns it. Recognizes common reductions in order to identify
242 /// the neutral value, necessary for the OpenMP declaration. If the reduction
250 // Insert reduction declarations in the symbol-table ancestor before the
259 "expected reduction region to have a single element");
263 Block &reduction = reduce.getReductions()[reductionIndex].front();
264 if (matchSimpleReduction<arith::AddFOp, LLVM::FAddOp>(reduction)) {
271 if (matchSimpleReduction<arith::AddIOp, LLVM::AddOp>(reduction)) {
278 if (matchSimpleReduction<arith::OrIOp, LLVM::OrOp>(reduction)) {
285 if (matchSimpleReduction<arith::XOrIOp, LLVM::XOrOp>(reduction)) {
292 if (matchSimpleReduction<arith::AndIOp, LLVM::AndOp>(reduction)) {
304 if (matchSimpleReduction<arith::MulFOp, LLVM::FMulOp>(reduction)) {
308 if (matchSimpleReduction<arith::MulIOp, LLVM::MulOp>(reduction)) {
316 reduction, {arith::CmpFPredicate::OLT, arith::CmpFPredicate::OLE},
319 reduction, {LLVM::FCmpPredicate::olt, LLVM::FCmpPredicate::ole},
325 reduction, {arith::CmpIPredicate::slt, arith::CmpIPredicate::sle},
328 reduction, {LLVM::ICmpPredicate::slt, LLVM::ICmpPredicate::sle},
338 reduction, {arith::CmpIPredicate::ult, arith::CmpIPredicate::ule},
341 reduction, {LLVM::ICmpPredicate::ugt, LLVM::ICmpPredicate::ule},
367 // TODO: consider checking it here is already a compatible reduction
381 // Allocate reduction variables. Make sure the we don't overflow the stack
392 "cannot create a reduction variable if the type is not an LLVM "
400 // Replace the reduction operations contained in this loop. Must be done
402 // reduction variables.
409 // and hence the SCF reduction region will contain a single block.
410 // The ompReductionDecls region is a copy of the SCF reduction region
413 "expect reduction region to have one block");
417 // Make a copy of the reduction combiner region in the body
422 "expect reduction region to have two arguments");
429 "expect YieldOp in reduction region to return one result");
481 // The wrapper's entry block arguments will define the reduction
500 // Remove reduction-related block arguments from omp.loop_nest and