This is an archive of the discontinued LLVM Phabricator instance.

[M68k] Add support for lowering atomic fence
ClosedPublic

Authored by myhsu on Mar 27 2023, 12:39 PM.

Details

Summary

Ideally we want to lower ATOMIC_FENCE into __sync_synchronize. However, libgcc doesn't implement that builtin as GCC simply generates an inline assembly memory barrier whenever there has to be a fence.

We use a similar way to lower ATOMIC_FENCE.

Diff Detail

Event Timeline

myhsu created this revision.Mar 27 2023, 12:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 27 2023, 12:39 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
myhsu requested review of this revision.Mar 27 2023, 12:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 27 2023, 12:39 PM
0x59616e accepted this revision.EditedMar 31 2023, 7:44 PM

Just wondering if this method is available only under non-OOO environment ?

This revision is now accepted and ready to land.Mar 31 2023, 7:44 PM
myhsu added a comment.Apr 1 2023, 7:47 PM

Just wondering if this method is available only under non-OOO environment ?

yes I believe so.

This revision was automatically updated to reflect the committed changes.