This is an archive of the discontinued LLVM Phabricator instance.

[openmp][nfc] Replace OMPGridValues array with struct
ClosedPublic

Authored by JonChesterfield on Aug 18 2021, 3:42 PM.

Details

Summary

[nfc] Replaces enum indices into an array with a struct. Named the
fields to match the enum, leaves memory layout and initialization unchanged.

Motivation is to later safely remove dead fields and replace redundant ones
with (compile time) computation. It should also be possible to factor some
common fields into a base and introduce a gfx10 amdgpu instance with less
duplication than the arrays of integers require.

Diff Detail

Event Timeline

JonChesterfield requested review of this revision.Aug 18 2021, 3:42 PM
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptAug 18 2021, 3:42 PM

Given this patch, I can then template the amdgpu one on wavesize to get something that is a compile time constant in the devicertl and easily used from clang/host plugin. Expecting to have a few refactors following on from this to make the gfx9/gfx10 abstraction dry.

  • revert to unsigned, file doesn't currently require stdint
ronlieb accepted this revision.Aug 19 2021, 5:23 AM
This revision is now accepted and ready to land.Aug 19 2021, 5:23 AM
This revision was landed with ongoing or failed builds.Aug 19 2021, 5:25 AM
This revision was automatically updated to reflect the committed changes.