This is an archive of the discontinued LLVM Phabricator instance.

[ARM][AArch64] Switch to generic MEMBARRIER node
ClosedPublic

Authored by reames on Jan 11 2023, 8:36 AM.

Details

Summary

This change switches both targets from using target specific CompilerBarrier nodes to the recently introduced generic MEMBARRIER instruction.

A couple things to call out.

First, this changes the assembly comment printed. I'm not sure this matters, but if it does, we can simply drop this patch. This is a minor clean up at best.

Second, the ordering operand on the target instruction appears to be unused. We could easily add ordering to the generic instruction, but since we don't seem to have a motivating case in tree, I simply dropped the ordering when selecting to the generic instruction.

Diff Detail

Event Timeline

reames created this revision.Jan 11 2023, 8:36 AM
reames requested review of this revision.Jan 11 2023, 8:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2023, 8:36 AM
lenary accepted this revision.Jan 12 2023, 3:25 AM

If the ordering is not used, I don't mind us removing it.

It might be worth documenting that MEMBARRIER should maybe be treated as a seq_cst singlescope fence though? This would mean it has an ordering, even if no ordering requirement.

This revision is now accepted and ready to land.Jan 12 2023, 3:25 AM
This revision was landed with ongoing or failed builds.Jan 20 2023, 8:54 AM
This revision was automatically updated to reflect the committed changes.