This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][Plugin] Minor adjustments to ResourcePool
ClosedPublic

Authored by tianshilei1992 on Dec 28 2021, 12:19 PM.

Details

Summary

This patch makes some minor adjustments to ResourcePool:

  • Don't initialize the resources if Size is 0 which can avoid assertion.
  • Add a new interface function clear to release all hold resources.
  • If initial size is 0, resize to 1 when the first request is encountered.

Diff Detail

Event Timeline

tianshilei1992 requested review of this revision.Dec 28 2021, 12:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 28 2021, 12:19 PM
This revision is now accepted and ready to land.Dec 28 2021, 12:34 PM
This revision was automatically updated to reflect the committed changes.