Page MenuHomePhabricator

[SelectionDAG] Strengthen assertions about usage of AtomicSDNodes
ClosedPublic

Authored by reames on Feb 27 2019, 2:10 PM.

Details

Summary

In D57601, I described the expectations around usage of AtomicSDNode and LoadSDNode/StoreSDNode w.r.t. atomic and volatiles. This patch simply embeds those expectations in assertions so that they can't be accidentally weakened.

Note: The reason only AtomicSDNodes of ATOMIC_LOAD and ATOMIC_STORE opcode are currently checked is that AMDGPU has an intrinsic which gets lowered to an ATOMIC_LOAD_FADD w/o a corresponding atomic MMO. This is suspicious, and I've brought it to the attention of the relevant developers. Once resolved, I'll strengthen that assertion.

Note 2: If this breaks your out-of-tree backend, go read the update instructions associated w/the previously mentioned patch. This will assert on (a subset of) things you need to update per those instructions.

Diff Detail

Event Timeline

reames created this revision.Feb 27 2019, 2:10 PM
reames updated this revision to Diff 188620.Feb 27 2019, 2:11 PM

I somehow uploaded entirely the wrong patch... oops.

jlebar accepted this revision.Feb 27 2019, 3:44 PM
This revision is now accepted and ready to land.Feb 27 2019, 3:44 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 27 2019, 8:07 PM