@@ -43,7 +43,7 @@ static Name getLoadName(Load* curr) {
4343 if (LoadUtils::isSignRelevant (curr) && !curr->signed_ ) {
4444 ret += " U_" ;
4545 }
46- if (curr->isAtomic ) {
46+ if (curr->isAtomic () ) {
4747 ret += " A" ;
4848 } else {
4949 ret += std::to_string (curr->align );
@@ -233,7 +233,8 @@ struct SafeHeap : public Pass {
233233 continue ;
234234 }
235235 for (auto isAtomic : {true , false }) {
236- load.isAtomic = isAtomic;
236+ load.order =
237+ isAtomic ? MemoryOrder::SeqCst : MemoryOrder::Unordered;
237238 if (isAtomic &&
238239 !isPossibleAtomicOperation (
239240 align, bytes, module ->memories [0 ]->shared , type)) {
@@ -321,7 +322,7 @@ struct SafeHeap : public Pass {
321322 *load = style; // basically the same as the template we are given!
322323 load->ptr = builder.makeLocalGet (2 , addressType);
323324 Expression* last = load;
324- if (load->isAtomic && load->signed_ ) {
325+ if (load->isAtomic () && load->signed_ ) {
325326 // atomic loads cannot be signed, manually sign it
326327 last = Bits::makeSignExt (load, load->bytes , *module );
327328 load->signed_ = false ;
@@ -410,8 +411,9 @@ struct SafeHeap : public Pass {
410411 bool is64,
411412 Name memory) {
412413 bool lowMemUnused = getPassOptions ().lowMemoryUnused ;
413- auto upperOp = is64 ? lowMemUnused ? LtUInt64 : EqInt64
414- : lowMemUnused ? LtUInt32 : EqInt32;
414+ auto upperOp = is64 ? lowMemUnused ? LtUInt64 : EqInt64
415+ : lowMemUnused ? LtUInt32
416+ : EqInt32;
415417 auto upperBound = lowMemUnused ? PassOptions::LowMemoryBound : 0 ;
416418 Expression* brkLocation;
417419 if (sbrk.is ()) {
0 commit comments