Skip to content

Commit 2067948

Browse files
authored
[SYCL-MLIR] Mark helper functions static (#11050)
Mark helper functions as static to avoid collision with functions in Polygeist by the same name.
1 parent 5c6fb36 commit 2067948

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

mlir/lib/Dialect/GPU/TransformOps/GPUTransformOps.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,10 @@ collectEffects(Operation *op,
274274
/// set. Returns `true` if the memory effects added to `effects` are exact,
275275
/// `false` if they are a conservative over-approximation. The latter means that
276276
/// `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) {
280281
if (!op->getBlock())
281282
return true;
282283

@@ -353,9 +354,10 @@ bool getEffectsBefore(Operation *op,
353354
/// set. Returns `true` if the memory effects added to `effects` are exact,
354355
/// `false` if they are a conservative over-approximation. The latter means that
355356
/// `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) {
359361
if (!op->getBlock())
360362
return true;
361363

@@ -498,7 +500,7 @@ static std::optional<bool> getKnownCapturingStatus(Operation *op, Value v) {
498500
/// the user may be storing this value into memory. This makes aliasing analysis
499501
/// more conservative as it cannot assume the pointer-like value is only passed
500502
/// around through SSA use-def.
501-
bool maybeCaptured(Value v) {
503+
static bool maybeCaptured(Value v) {
502504
SmallVector<Value> todo = {v};
503505
while (!todo.empty()) {
504506
Value v = todo.pop_back_val();
@@ -618,7 +620,7 @@ static bool mayAlias(Value first, Value second) {
618620
/// Returns `true` if the effect may be affecting memory aliasing the value. If
619621
/// the effect is not associated with any value, it is assumed to affect all
620622
/// memory and therefore aliases with everything.
621-
bool mayAlias(MemoryEffects::EffectInstance a, Value v2) {
623+
static bool mayAlias(MemoryEffects::EffectInstance a, Value v2) {
622624
if (Value v = a.getValue()) {
623625
return mayAlias(v, v2);
624626
}
@@ -629,8 +631,8 @@ bool mayAlias(MemoryEffects::EffectInstance a, Value v2) {
629631
/// an effect is not associated with any value, it is assumed to affect all
630632
/// memory and therefore aliases with everything. Effects on different resources
631633
/// cannot alias.
632-
bool mayAlias(MemoryEffects::EffectInstance a,
633-
MemoryEffects::EffectInstance b) {
634+
static bool mayAlias(MemoryEffects::EffectInstance a,
635+
MemoryEffects::EffectInstance b) {
634636
if (a.getResource()->getResourceID() != b.getResource()->getResourceID())
635637
return false;
636638
if (Value v2 = b.getValue()) {

0 commit comments

Comments
 (0)