From 6ddacde514af7cc546caa07fede4baa3e429c33c Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 20 Dec 2024 17:45:47 -0800 Subject: [NFC] Make MemoryOrder parameters non-optional (#7171) Update Builder and IRBuilder makeStructGet and makeStructSet functions to require the memory order to be explicitly supplied. This is slightly more verbose, but will reduce the chances that we forget to properly consider synchronization when implementing new features in the future. --- src/passes/Heap2Local.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/passes/Heap2Local.cpp') diff --git a/src/passes/Heap2Local.cpp b/src/passes/Heap2Local.cpp index a6223d4fc..b050c4a76 100644 --- a/src/passes/Heap2Local.cpp +++ b/src/passes/Heap2Local.cpp @@ -1066,7 +1066,9 @@ struct Array2Struct : PostWalker { } // Convert the ArraySet into a StructSet. - replaceCurrent(builder.makeStructSet(index, curr->ref, curr->value)); + // TODO: Handle atomic array accesses. + replaceCurrent(builder.makeStructSet( + index, curr->ref, curr->value, MemoryOrder::Unordered)); } void visitArrayGet(ArrayGet* curr) { @@ -1085,8 +1087,9 @@ struct Array2Struct : PostWalker { } // Convert the ArrayGet into a StructGet. - replaceCurrent( - builder.makeStructGet(index, curr->ref, curr->type, curr->signed_)); + // TODO: Handle atomic array accesses. + replaceCurrent(builder.makeStructGet( + index, curr->ref, MemoryOrder::Unordered, curr->type, curr->signed_)); } // Some additional operations need special handling -- cgit v1.2.3