This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Mark time intrinsics as nomem, hassideeffects
ClosedPublic

Authored by foad on Dec 7 2021, 1:43 AM.

Details

Summary

Adding IntrHasSideEffects to @llvm.amdgcn.s.memtime and
@llvm.amdgcn.s.memrealtime means that we can stop pretending they read
and write memory, and similarly for the corresponding pseudo
instructions.

This should stop these intrinsics from being rescheduled past all other
instructions, even ones which don't load or store.

See also https://reviews.llvm.org/D58635.

Diff Detail

Event Timeline

foad created this revision.Dec 7 2021, 1:43 AM
foad requested review of this revision.Dec 7 2021, 1:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 7 2021, 1:43 AM
foad added inline comments.Dec 7 2021, 2:48 AM
llvm/lib/Target/AMDGPU/SMInstructions.td
187

Was there a reason the intrinsics weren't IntrHasSideEffects in the first place? (Did that property not exist?)

arsenm accepted this revision.Dec 7 2021, 7:37 AM
arsenm added inline comments.
llvm/lib/Target/AMDGPU/SMInstructions.td
187

It didn't exist for most of history

This revision is now accepted and ready to land.Dec 7 2021, 7:37 AM
This revision was automatically updated to reflect the committed changes.