@@ -274,9 +274,10 @@ collectEffects(Operation *op,
274
274
// / set. Returns `true` if the memory effects added to `effects` are exact,
275
275
// / `false` if they are a conservative over-approximation. The latter means that
276
276
// / `effects` contain instances not associated with a specific value.
277
- bool getEffectsBefore (Operation *op,
278
- SmallVectorImpl<MemoryEffects::EffectInstance> &effects,
279
- bool stopAtBarrier) {
277
+ static bool
278
+ getEffectsBefore (Operation *op,
279
+ SmallVectorImpl<MemoryEffects::EffectInstance> &effects,
280
+ bool stopAtBarrier) {
280
281
if (!op->getBlock ())
281
282
return true ;
282
283
@@ -353,9 +354,10 @@ bool getEffectsBefore(Operation *op,
353
354
// / set. Returns `true` if the memory effects added to `effects` are exact,
354
355
// / `false` if they are a conservative over-approximation. The latter means that
355
356
// / `effects` contain instances not associated with a specific value.
356
- bool getEffectsAfter (Operation *op,
357
- SmallVectorImpl<MemoryEffects::EffectInstance> &effects,
358
- bool stopAtBarrier) {
357
+ static bool
358
+ getEffectsAfter (Operation *op,
359
+ SmallVectorImpl<MemoryEffects::EffectInstance> &effects,
360
+ bool stopAtBarrier) {
359
361
if (!op->getBlock ())
360
362
return true ;
361
363
@@ -498,7 +500,7 @@ static std::optional<bool> getKnownCapturingStatus(Operation *op, Value v) {
498
500
// / the user may be storing this value into memory. This makes aliasing analysis
499
501
// / more conservative as it cannot assume the pointer-like value is only passed
500
502
// / around through SSA use-def.
501
- bool maybeCaptured (Value v) {
503
+ static bool maybeCaptured (Value v) {
502
504
SmallVector<Value> todo = {v};
503
505
while (!todo.empty ()) {
504
506
Value v = todo.pop_back_val ();
@@ -618,7 +620,7 @@ static bool mayAlias(Value first, Value second) {
618
620
// / Returns `true` if the effect may be affecting memory aliasing the value. If
619
621
// / the effect is not associated with any value, it is assumed to affect all
620
622
// / memory and therefore aliases with everything.
621
- bool mayAlias (MemoryEffects::EffectInstance a, Value v2) {
623
+ static bool mayAlias (MemoryEffects::EffectInstance a, Value v2) {
622
624
if (Value v = a.getValue ()) {
623
625
return mayAlias (v, v2);
624
626
}
@@ -629,8 +631,8 @@ bool mayAlias(MemoryEffects::EffectInstance a, Value v2) {
629
631
// / an effect is not associated with any value, it is assumed to affect all
630
632
// / memory and therefore aliases with everything. Effects on different resources
631
633
// / cannot alias.
632
- bool mayAlias (MemoryEffects::EffectInstance a,
633
- MemoryEffects::EffectInstance b) {
634
+ static bool mayAlias (MemoryEffects::EffectInstance a,
635
+ MemoryEffects::EffectInstance b) {
634
636
if (a.getResource ()->getResourceID () != b.getResource ()->getResourceID ())
635
637
return false ;
636
638
if (Value v2 = b.getValue ()) {
0 commit comments