This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Support finer-grained DBAR hints for LA664+
AbandonedPublic

Authored by SixWeining on May 29 2023, 10:44 AM.

Details

Summary

These are treated as DBAR 0 on older uarchs, so we can start to
unconditionally emit the new hints right away.

Diff Detail

Event Timeline

xen0n created this revision.May 29 2023, 10:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 29 2023, 10:44 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
xen0n requested review of this revision.May 29 2023, 10:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 29 2023, 10:44 AM
SixWeining added a subscriber: hev.

Only a few hints (i.e. 0x0, 0x10, 0x12, 0x14) are emitted. Is it possible to emit more?

Add @hev who is more experienced on dbar usage and generating especially on JVM.

llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
264–278

Seems that tests are missing.

hev added a comment.Jun 6 2023, 6:46 AM

Grateful for your contribution.

llvm/test/CodeGen/LoongArch/ir-instruction/load-store-atomic.ll
116

Is it better to use dbar 18 + store for LA664 and later micro-architectures?

269

We should use dbar with ordering kind here.

SixWeining commandeered this revision.Oct 12 2023, 12:40 AM
SixWeining abandoned this revision.
SixWeining edited reviewers, added: xen0n; removed: SixWeining.