This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add support for Zihintpause extention
AbandonedPublic

Authored by mundaym on Dec 10 2020, 3:17 AM.

Details

Summary

Add support for the 'pause' hint instruction as an alias for
'fence w, 0'. To do this allow the 'fence' operands pred and succ
to be set to 0 (the empty set). This will also allow future hints
to be encoded as 'fence 0, <x>' and 'fence <x>, 0'.

Diff Detail

Event Timeline

mundaym created this revision.Dec 10 2020, 3:17 AM
mundaym requested review of this revision.Dec 10 2020, 3:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 10 2020, 3:17 AM
mundaym retitled this revision from [RISCV] Add support for 'pause' as an alias for 'fence w, 0' to [RISCV] Add support for 'pause' as an alias for 'fence w, 0' [do not merge].Dec 10 2020, 3:35 AM
lenary accepted this revision.Dec 10 2020, 10:49 AM

LGTM! Let's wait for the spec to be merged before merging this though.

This revision is now accepted and ready to land.Dec 10 2020, 10:49 AM
luojia added a subscriber: luojia.EditedDec 2 2021, 2:00 AM

Hello! I noticed that the pause hint instruction is merged into spec (https://github.com/riscv/riscv-isa-manual/pull/398) and got ratified (https://github.com/riscv/riscv-isa-manual/commit/7a58119dad5bd43e2171a26b56ef60f9591a1c9c).

Should this patch be merged? :) This patch LGTM.

asb added a comment.Dec 9 2021, 5:13 AM

Hello! I noticed that the pause hint instruction is merged into spec (https://github.com/riscv/riscv-isa-manual/pull/398) and got ratified (https://github.com/riscv/riscv-isa-manual/commit/7a58119dad5bd43e2171a26b56ef60f9591a1c9c).

Should this patch be merged? :) This patch LGTM.

It just needs to be appropriately gated by a zihintpause attribute.

Add support for Zihintpause extention

achieveartificialintelligence retitled this revision from [RISCV] Add support for 'pause' as an alias for 'fence w, 0' [do not merge] to [RISCV] Add support for Zihintpause extention.Jan 12 2022, 1:26 AM

Since this commit hasn't been updated for a year, I updated it. @mundaym

This patch is accepted a year ago. Could this patch land now?

asb accepted this revision.Jan 20 2022, 6:29 AM

This LGTM.

mundaym abandoned this revision.Jan 20 2022, 6:54 AM

@achieveartificialintelligence would you mind creating your revised change as a new patch? I'm going to abandon this. Feel free to include any of my original code.

Once you have done that ping @asb and he can do a quick check and approve again.

llvm/test/CodeGen/RISCV/attributes.ll