LLVM 22.0.0git
llvm::sampleprof::SampleSorter< LocationT, SampleT > Class Template Reference

Sort a LocationT->SampleT map by LocationT. More...

#include "llvm/ProfileData/SampleProf.h"

Public Types

using SamplesWithLoc = std::pair<const LocationT, SampleT>
using SamplesWithLocList = SmallVector<const SamplesWithLoc *, 20>

Public Member Functions

 SampleSorter (const std::map< LocationT, SampleT > &Samples)
const SamplesWithLocListget () const

Detailed Description

template<class LocationT, class SampleT>
class llvm::sampleprof::SampleSorter< LocationT, SampleT >

Sort a LocationT->SampleT map by LocationT.

It produces a sorted list of <LocationT, SampleT> records by ascending order of LocationT.

Definition at line 1481 of file SampleProf.h.

Member Typedef Documentation

◆ SamplesWithLoc

template<class LocationT, class SampleT>
using llvm::sampleprof::SampleSorter< LocationT, SampleT >::SamplesWithLoc = std::pair<const LocationT, SampleT>

Definition at line 1483 of file SampleProf.h.

◆ SamplesWithLocList

template<class LocationT, class SampleT>
using llvm::sampleprof::SampleSorter< LocationT, SampleT >::SamplesWithLocList = SmallVector<const SamplesWithLoc *, 20>

Definition at line 1484 of file SampleProf.h.

Constructor & Destructor Documentation

◆ SampleSorter()

template<class LocationT, class SampleT>
llvm::sampleprof::SampleSorter< LocationT, SampleT >::SampleSorter ( const std::map< LocationT, SampleT > & Samples)
inline

Definition at line 1486 of file SampleProf.h.

References A(), B(), I, and llvm::stable_sort().

Member Function Documentation

◆ get()

template<class LocationT, class SampleT>
const SamplesWithLocList & llvm::sampleprof::SampleSorter< LocationT, SampleT >::get ( ) const
inline

The documentation for this class was generated from the following file: