This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] add s_incperflevel/s_decperflevel intrinsics
ClosedPublic

Authored by vpykhtin on Aug 18 2016, 8:43 AM.

Details

Summary

This change adds s_incperflevel/s_decperflevel intrinsics to AMDGPU backend. These instructions along with using SQ_PERF_SEL_USER_LEVEL/SQ_PERF_SEL_ACCUM_PREV counters allows to measure average time spent in some section of kernel code.

Diff Detail

Repository
rL LLVM

Event Timeline

vpykhtin updated this revision to Diff 68542.Aug 18 2016, 8:43 AM
vpykhtin retitled this revision from to [AMDGPU] add s_incperflevel/s_decperflevel intrinsics.
vpykhtin updated this object.
vpykhtin added reviewers: tstellarAMD, arsenm.
vpykhtin set the repository for this revision to rL LLVM.
vpykhtin added a project: Restricted Project.
vpykhtin added subscribers: artem.tamazov, SamWot, alex-t.
arsenm accepted this revision.Aug 18 2016, 9:51 AM
arsenm edited edge metadata.

LGTM with nits

lib/Target/AMDGPU/SIInstructions.td
520 ↗(On Diff #68542)

Previous line

527 ↗(On Diff #68542)

Previous line

test/CodeGen/AMDGPU/llvm.amdgcn.s.decperflevel.ll
1 ↗(On Diff #68542)

Should also have a VI run line

test/CodeGen/AMDGPU/llvm.amdgcn.s.incperflevel.ll
1 ↗(On Diff #68542)

Ditto

This revision is now accepted and ready to land.Aug 18 2016, 9:51 AM
This revision was automatically updated to reflect the committed changes.