Polly 20.0.0git
Public Member Functions | Private Attributes | List of all members
polly::IslQuotaScope Class Referencefinal

Scope guard for code that allows arbitrary isl function to return an error if the max-operations quota exceeds. More...

#include <GICHelper.h>

Public Member Functions

 IslQuotaScope ()
 
 IslQuotaScope (const IslQuotaScope &)=delete
 
 IslQuotaScope (IslQuotaScope &&Other)
 
const IslQuotaScopeoperator= (IslQuotaScope &&Other)
 
 IslQuotaScope (isl_ctx *IslCtx, unsigned long LocalMaxOps)
 Enter a quota-aware scope.
 
 ~IslQuotaScope ()
 
bool hasQuotaExceeded () const
 Return whether the current quota has exceeded.
 

Private Attributes

isl_ctxIslCtx
 
int OldOnError
 

Detailed Description

Scope guard for code that allows arbitrary isl function to return an error if the max-operations quota exceeds.

This allows to opt-in code sections that have known long executions times. code not in a hot path can continue to assume that no unexpected error occurs.

This is typically used inside a nested IslMaxOperationsGuard scope. The IslMaxOperationsGuard defines the number of allowed base operations for some code, IslQuotaScope defines where it is allowed to return an error result.

Definition at line 357 of file GICHelper.h.

Constructor & Destructor Documentation

◆ IslQuotaScope() [1/4]

polly::IslQuotaScope::IslQuotaScope ( )
inline

Definition at line 362 of file GICHelper.h.

◆ IslQuotaScope() [2/4]

polly::IslQuotaScope::IslQuotaScope ( const IslQuotaScope )
delete

◆ IslQuotaScope() [3/4]

polly::IslQuotaScope::IslQuotaScope ( IslQuotaScope &&  Other)
inline

Definition at line 364 of file GICHelper.h.

References polly::Other.

◆ IslQuotaScope() [4/4]

polly::IslQuotaScope::IslQuotaScope ( isl_ctx IslCtx,
unsigned long  LocalMaxOps 
)
inlineexplicit

◆ ~IslQuotaScope()

polly::IslQuotaScope::~IslQuotaScope ( )
inline

Member Function Documentation

◆ hasQuotaExceeded()

bool polly::IslQuotaScope::hasQuotaExceeded ( ) const
inline

Return whether the current quota has exceeded.

Definition at line 404 of file GICHelper.h.

References isl_ctx_last_error(), isl_error_quota, and IslCtx.

◆ operator=()

const IslQuotaScope & polly::IslQuotaScope::operator= ( IslQuotaScope &&  Other)
inline

Definition at line 368 of file GICHelper.h.

References polly::Other.

Member Data Documentation

◆ IslCtx

isl_ctx* polly::IslQuotaScope::IslCtx
private

Definition at line 358 of file GICHelper.h.

Referenced by hasQuotaExceeded(), IslQuotaScope(), and ~IslQuotaScope().

◆ OldOnError

int polly::IslQuotaScope::OldOnError
private

Definition at line 359 of file GICHelper.h.

Referenced by IslQuotaScope(), and ~IslQuotaScope().


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