This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Fix listing of Low and High latency instructions
AbandonedPublic

Authored by axeldavy on Feb 18 2017, 1:26 PM.

Details

Reviewers
arsenm
tstellar
Summary

A few instruction types were missing.

Diff Detail

Repository
rL LLVM

Event Timeline

axeldavy created this revision.Feb 18 2017, 1:26 PM
axeldavy added a project: Restricted Project.Feb 18 2017, 2:33 PM
axeldavy added a subscriber: llvm-commits.
arsenm edited edge metadata.Feb 21 2017, 3:50 PM

It's still missing a few. VINTRP and EXP. I think it would be better to check instruction latency data. In absence of that, I think it would be simpler to just use isHighLatencyInstruction, and !isHighLatencyInstruction

It's still missing a few. VINTRP and EXP. I think it would be better to check instruction latency data. In absence of that, I think it would be simpler to just use isHighLatencyInstruction, and !isHighLatencyInstruction

The true usage of these helper functions is to deduce instructions which need a VMCNT wait or a LGKMCNT wait (former ones being incorrectly called 'high latency' and the latter ones 'lon latency').

What about renaming to isVMCNTInstruction and isLGKMCNTInstruction ?

t-tye added a subscriber: t-tye.Mar 22 2017, 6:38 PM
tony-tye removed a subscriber: tony-tye.Mar 22 2017, 6:46 PM

It's still missing a few. VINTRP and EXP. I think it would be better to check instruction latency data. In absence of that, I think it would be simpler to just use isHighLatencyInstruction, and !isHighLatencyInstruction

The true usage of these helper functions is to deduce instructions which need a VMCNT wait or a LGKMCNT wait (former ones being incorrectly called 'high latency' and the latter ones 'lon latency').

What about renaming to isVMCNTInstruction and isLGKMCNTInstruction ?

SIInstrInfo has helper function:

static bool usesVM_CNT(const MachineInstr &MI)

It doesn't however contains the analogue for LGKM though it can be easily added.

axeldavy abandoned this revision.Mar 27 2017, 3:13 PM

usesVM_CNT and usesLGKM_CNT is probably the best way forward (and dropping is*LatencyInstruction)