|
Jlm
|
#include <Worklist.hpp>


Public Member Functions | |
| ~TwoPhaseLrfWorklist () override=default | |
| TwoPhaseLrfWorklist ()=default | |
| bool | HasMoreWorkItems () const noexcept override |
| T | PopWorkItem () override |
| void | PushWorkItem (T item) override |
Public Member Functions inherited from jlm::util::Worklist< T > | |
| virtual | ~Worklist ()=default |
| Worklist ()=default | |
| Worklist (const Worklist &other)=delete | |
| Worklist (Worklist &&other)=default | |
| Worklist & | operator= (const Worklist &other)=delete |
| Worklist & | operator= (Worklist &&other)=default |
Private Attributes | |
| std::vector< std::pair< size_t, T > > | Current_ |
| std::vector< std::pair< size_t, T > > | Next_ |
| size_t | FireCounter_ = 0 |
| std::unordered_map< T, size_t > | LastFire_ |
Static Private Attributes | |
| static const size_t | InQueueSentinelValue = std::numeric_limits<size_t>::max() |
Worklist implementation similar to "Least Recently Fired", but using two lists. Pushed work items are added to next, and popped from current. When current is empty, next is sorted by last fired time, and becomes the new current. Pushing a work item that is already in next or current is a no-op. Two-phase LRF is presented by B. Hardekopf and C. Lin "The And and the Grasshopper: Fast and Accurate Pointer Analysis
for Millions of Lines of Code" (2007)
| T | the type of the work items. |
Definition at line 236 of file Worklist.hpp.
|
overridedefault |
|
default |
|
inlineoverridevirtualnoexcept |
Implements jlm::util::Worklist< T >.
Definition at line 244 of file Worklist.hpp.
|
inlineoverridevirtual |
Removes one work item from the worklist. Requires there to be at least one work item left.
Implements jlm::util::Worklist< T >.
Definition at line 250 of file Worklist.hpp.
|
inlineoverridevirtual |
Adds a work item to the worklist. If the item is already present, the item is not added again, but its position may be changed.
| item | the work item to be added. |
Implements jlm::util::Worklist< T >.
Definition at line 267 of file Worklist.hpp.
|
private |
Definition at line 283 of file Worklist.hpp.
|
private |
Definition at line 290 of file Worklist.hpp.
|
inlinestaticprivate |
Definition at line 280 of file Worklist.hpp.
|
private |
Definition at line 294 of file Worklist.hpp.
|
private |
Definition at line 287 of file Worklist.hpp.