LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
llvm::PredIteratorCache Class Reference

#include <PredIteratorCache.h>

Public Member Functions

BasicBlock ** GetPreds (BasicBlock *BB)
 
unsigned GetNumPreds (BasicBlock *BB)
 
void clear ()
 clear - Remove all information. More...
 

Detailed Description

PredIteratorCache - This class is an extremely trivial cache for predecessor iterator queries. This is useful for code that repeatedly wants the predecessor list for the same blocks.

Definition at line 27 of file PredIteratorCache.h.

Member Function Documentation

void llvm::PredIteratorCache::clear ( )
inline

clear - Remove all information.

Definition at line 62 of file PredIteratorCache.h.

unsigned llvm::PredIteratorCache::GetNumPreds ( BasicBlock BB)
inline

Definition at line 56 of file PredIteratorCache.h.

References GetPreds().

BasicBlock** llvm::PredIteratorCache::GetPreds ( BasicBlock BB)
inline

GetPreds - Get a cached list for the null-terminated predecessor list of the specified block. This can be used in a loop like this: for (BasicBlock **PI = PredCache->GetPreds(BB); *PI; ++PI) use(*PI); instead of: for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI)

Definition at line 42 of file PredIteratorCache.h.

References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::pred_begin(), llvm::pred_end(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and llvm::SmallVectorTemplateCommon< T >::size().

Referenced by GetNumPreds().


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