This is an archive of the discontinued LLVM Phabricator instance.

[libomptarget][NVPTX] Drop dead code and data structures, NFCI.
ClosedPublic

Authored by Hahnfeld on Sep 4 2018, 6:04 AM.

Details

Summary
  • cg and HasCancel in WorkDescr were never read and can be removed.
  • This eliminates the last use of priv in ThreadPrivateContext.
  • CounterGroup is unused afterwards.
  • Remove duplicate external declares in omptarget-nvptx.cu that are already in the header omptarget-nvptx.h.

Diff Detail

Repository
rL LLVM

Event Timeline

Hahnfeld created this revision.Sep 4 2018, 6:04 AM
ABataev added inline comments.Sep 4 2018, 7:25 AM
libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
24–42 ↗(On Diff #163791)

Are you sure that you want to delete these variables?

Hahnfeld marked an inline comment as done.Sep 4 2018, 7:30 AM
Hahnfeld added inline comments.
libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
24–42 ↗(On Diff #163791)

Yes, they are also declared in omptarget-nvptx.h (I added an inline comment). I've been criticizing these duplicated declarations in a few reviews, time to get rid of them. Note that omptarget_nvptx_device_State and omptarget_nvptx_device_simpleState are not in the header because they are only used in this file.

libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
431–446 ↗(On Diff #163791)

Here.

This revision is now accepted and ready to land.Sep 4 2018, 7:33 AM
grokos added inline comments.Sep 4 2018, 7:53 AM
libomptarget/deviceRTLs/nvptx/src/omptarget-nvptxi.h
182 ↗(On Diff #163791)

Also remove this dead code?

Hahnfeld marked 2 inline comments as done.Sep 4 2018, 8:11 AM
Hahnfeld added inline comments.
libomptarget/deviceRTLs/nvptx/src/omptarget-nvptxi.h
182 ↗(On Diff #163791)

Yes, will do on commit.

This revision was automatically updated to reflect the committed changes.
Hahnfeld marked an inline comment as done.