@@ -360,9 +360,10 @@ collectEffects(Operation *op,
360
360
// / set. Returns `true` if the memory effects added to `effects` are exact,
361
361
// / `false` if they are a conservative over-approximation. The latter means that
362
362
// / `effects` contain instances not associated with a specific value.
363
- bool getEffectsBefore (Operation *op,
364
- SmallVectorImpl<MemoryEffects::EffectInstance> &effects,
365
- bool stopAtBarrier) {
363
+ static bool
364
+ getEffectsBefore (Operation *op,
365
+ SmallVectorImpl<MemoryEffects::EffectInstance> &effects,
366
+ bool stopAtBarrier) {
366
367
if (!op->getBlock ())
367
368
return true ;
368
369
@@ -439,9 +440,10 @@ bool getEffectsBefore(Operation *op,
439
440
// / set. Returns `true` if the memory effects added to `effects` are exact,
440
441
// / `false` if they are a conservative over-approximation. The latter means that
441
442
// / `effects` contain instances not associated with a specific value.
442
- bool getEffectsAfter (Operation *op,
443
- SmallVectorImpl<MemoryEffects::EffectInstance> &effects,
444
- bool stopAtBarrier) {
443
+ static bool
444
+ getEffectsAfter (Operation *op,
445
+ SmallVectorImpl<MemoryEffects::EffectInstance> &effects,
446
+ bool stopAtBarrier) {
445
447
if (!op->getBlock ())
446
448
return true ;
447
449
@@ -584,7 +586,7 @@ static std::optional<bool> getKnownCapturingStatus(Operation *op, Value v) {
584
586
// / the user may be storing this value into memory. This makes aliasing analysis
585
587
// / more conservative as it cannot assume the pointer-like value is only passed
586
588
// / around through SSA use-def.
587
- bool maybeCaptured (Value v) {
589
+ static bool maybeCaptured (Value v) {
588
590
SmallVector<Value> todo = {v};
589
591
while (!todo.empty ()) {
590
592
Value v = todo.pop_back_val ();
@@ -704,7 +706,7 @@ static bool mayAlias(Value first, Value second) {
704
706
// / Returns `true` if the effect may be affecting memory aliasing the value. If
705
707
// / the effect is not associated with any value, it is assumed to affect all
706
708
// / memory and therefore aliases with everything.
707
- bool mayAlias (MemoryEffects::EffectInstance a, Value v2) {
709
+ static bool mayAlias (MemoryEffects::EffectInstance a, Value v2) {
708
710
if (Value v = a.getValue ()) {
709
711
return mayAlias (v, v2);
710
712
}
@@ -715,8 +717,8 @@ bool mayAlias(MemoryEffects::EffectInstance a, Value v2) {
715
717
// / an effect is not associated with any value, it is assumed to affect all
716
718
// / memory and therefore aliases with everything. Effects on different resources
717
719
// / cannot alias.
718
- bool mayAlias (MemoryEffects::EffectInstance a,
719
- MemoryEffects::EffectInstance b) {
720
+ static bool mayAlias (MemoryEffects::EffectInstance a,
721
+ MemoryEffects::EffectInstance b) {
720
722
if (a.getResource ()->getResourceID () != b.getResource ()->getResourceID ())
721
723
return false ;
722
724
if (Value v2 = b.getValue ()) {
0 commit comments