Lines Matching defs:effects
51 /// evaluations). The Scheduler analyze the memory effects of these regions
67 /// of forall). The point of this is to avoid adding the side effects of
74 /// Analyze the memory effects of a region containing an expression
76 /// the expression has write effects (which is possible outside of forall),
80 /// was saved in a previous run is considered to have no side effects with the
88 /// regions effects are added to the "parent" effect list since evaluating the
111 llvm::ArrayRef<mlir::MemoryEffects::EffectInstance> effects,
116 /// effects conflicting with the previous run.
119 /// Memory effects of the assignments being lowered.
121 /// Memory effects of the evaluations implied by the assignments
125 /// Memory effects of the unsaved evaluation region that are controlling or
142 /// effects?
152 // Scheduling Implementation : gathering memory effects of nodes.
156 /// Read effects to forall index can be ignored since forall
163 /// Gather the memory effects of the operations contained in a region.
164 /// \p mayOnlyRead can be given to exclude some potential write effects that
173 llvm::SmallVectorImpl<mlir::MemoryEffects::EffectInstance> &effects) {
181 gatherMemoryEffects(subRegion, mayOnlyRead, effects);
183 // MemoryEffectOpInterface to describe extra effects on top of the
184 // effects of the nested operations. However, the presence of
186 // implies the operation has no other memory effects than the one of its
198 effects.emplace_back(mlir::MemoryEffects::Read::get());
200 effects.emplace_back(mlir::MemoryEffects::Write::get());
203 // Collect read/write effects. Alloc/Free effects do not matter, they
208 // mayOnlyRead is set). When mayOnlyRead is set, local write effects are
216 effects.push_back(effect);
220 effects.push_back(effect);
240 /// of an assignment. This also includes the effects of the user defined
241 /// assignment, if any, but this does not include the effects of evaluating the
242 /// RHS and LHS, which occur before the assignment effects in Fortran.
254 // This side effects are "defensive" and could be improved.
258 // arguments. For now, simply assume the worst. Once fir.call side effects
259 // analysis is improved, it would best to let the call side effects be used
268 /// Gather the effects of evaluations implied by the given assignment.
269 /// These are the effects of operations from LHS and RHS.
283 // Scheduling Implementation : finding conflicting memory effects.
350 /// Could there be any write effects in "effects" affecting memory storages
353 anyNonLocalWrite(llvm::ArrayRef<mlir::MemoryEffects::EffectInstance> effects,
356 effects, [®ion](const mlir::MemoryEffects::EffectInstance &effect) {
377 // Unconditionally collect effects of the evaluations of LHS and RHS
392 // no effects in the current assignment evaluation.
395 llvm::SmallVector<mlir::MemoryEffects::EffectInstance> effects;
396 gatherMemoryEffects(yieldRegion, leafRegionsMayOnlyRead, effects);
405 effects.emplace_back(mlir::MemoryEffects::Read::get(), entity);
407 if (!leafRegionsMayOnlyRead && anyNonLocalWrite(effects, yieldRegion)) {
414 saveEvaluation(yieldRegion, effects, /*anyWrite=*/true);
415 } else if (conflict(effects, assignEffects)) {
421 saveEvaluation(yieldRegion, effects, /*anyWrite=*/false);
423 conflict(effects, assignEvaluateEffects)) {
429 saveEvaluation(yieldRegion, effects,
430 anyNonLocalWrite(effects, yieldRegion));
433 independentEvaluationEffects.append(effects.begin(), effects.end());
439 llvm::ArrayRef<mlir::MemoryEffects::EffectInstance> effects,
444 // could try to prove the effects do not conflict with the previous
450 // run that contains any write effects. One could try to prove
451 // that "effects" do not conflict with the current run assignments.
459 // parent control or masks. Note that these effects may already be in the
464 schedule.back().memoryEffects.append(effects.begin(), effects.end());
484 // no conflicting effects.
490 // parentEvaluationEffects that already in the previous run effects (since