Jlm
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
jlm::llvm::aa::Andersen::Configuration Class Reference

#include <Andersen.hpp>

Public Types

enum class  Solver { Naive , Worklist }
 

Public Member Functions

void SetSolver (Solver solver) noexcept
 
Solver GetSolver () const noexcept
 
void SetWorklistSolverPolicy (PointerObjectConstraintSet::WorklistSolverPolicy policy) noexcept
 
PointerObjectConstraintSet::WorklistSolverPolicy GetWorklistSoliverPolicy () const noexcept
 
void EnableOfflineVariableSubstitution (bool enable) noexcept
 
bool IsOfflineVariableSubstitutionEnabled () const noexcept
 
void EnableOfflineConstraintNormalization (bool enable) noexcept
 
bool IsOfflineConstraintNormalizationEnabled () const noexcept
 
void EnableOnlineCycleDetection (bool enable) noexcept
 
bool IsOnlineCycleDetectionEnabled () const noexcept
 
void EnableHybridCycleDetection (bool enable) noexcept
 
bool IsHybridCycleDetectionEnabled () const noexcept
 
void EnableLazyCycleDetection (bool enable) noexcept
 
bool IsLazyCycleDetectionEnabled () const noexcept
 
void EnableDifferencePropagation (bool enable) noexcept
 
bool IsDifferencePropagationEnabled () const noexcept
 
void EnablePreferImplicitPointees (bool enable) noexcept
 
bool IsPreferImplicitPointeesEnabled () const noexcept
 
std::string ToString () const
 

Static Public Member Functions

static Configuration DefaultConfiguration ()
 
static Configuration NaiveSolverConfiguration () noexcept
 
static std::vector< ConfigurationGetAllConfigurations ()
 

Private Member Functions

 Configuration ()=default
 

Private Attributes

bool EnableOfflineVariableSubstitution_ = false
 
bool EnableOfflineConstraintNormalization_ = false
 
Solver Solver_ = Solver::Naive
 
PointerObjectConstraintSet::WorklistSolverPolicy WorklistSolverPolicy_
 
bool EnableOnlineCycleDetection_ = false
 
bool EnableHybridCycleDetection_ = false
 
bool EnableLazyCycleDetection_ = false
 
bool EnableDifferencePropagation_ = false
 
bool EnablePreferImplicitPointees_ = false
 

Detailed Description

class for configuring the Andersen pass, such as what solver to use.

Definition at line 59 of file Andersen.hpp.

Member Enumeration Documentation

◆ Solver

Enumerator
Naive 
Worklist 

Definition at line 64 of file Andersen.hpp.

Constructor & Destructor Documentation

◆ Configuration()

jlm::llvm::aa::Andersen::Configuration::Configuration ( )
privatedefault

Member Function Documentation

◆ DefaultConfiguration()

static Configuration jlm::llvm::aa::Andersen::Configuration::DefaultConfiguration ( )
inlinestatic
Returns
the default configuration

Definition at line 227 of file Andersen.hpp.

◆ EnableDifferencePropagation()

void jlm::llvm::aa::Andersen::Configuration::EnableDifferencePropagation ( bool  enable)
inlinenoexcept

Enables or disables difference propagation in the Worklist solver, as described by Pearce, 2003: "Online cycle detection and difference propagation for pointer analysis" Only used by the worklist solver.

Definition at line 194 of file Andersen.hpp.

◆ EnableHybridCycleDetection()

void jlm::llvm::aa::Andersen::Configuration::EnableHybridCycleDetection ( bool  enable)
inlinenoexcept

Enables or disables hybrid cycle detection in the Worklist solver, as described by Hardekopf and Lin, 2007: "The Ant & the Grasshopper" It detects some cycles, so it can not be combined with techniques that find all cycles.

Definition at line 160 of file Andersen.hpp.

◆ EnableLazyCycleDetection()

void jlm::llvm::aa::Andersen::Configuration::EnableLazyCycleDetection ( bool  enable)
inlinenoexcept

Enables or disables lazy cycle detection in the Worklist solver, as described by Hardekopf and Lin, 2007: "The Ant & the Grasshopper" It detects some cycles, so it can not be combined with techniques that find all cycles.

Definition at line 177 of file Andersen.hpp.

◆ EnableOfflineConstraintNormalization()

void jlm::llvm::aa::Andersen::Configuration::EnableOfflineConstraintNormalization ( bool  enable)
inlinenoexcept

Enables or disables offline constraint normalization. If enabled, it is the last step in offline processing.

See also
PointerObjectConstraintSet::NormalizeConstraints()

Definition at line 126 of file Andersen.hpp.

◆ EnableOfflineVariableSubstitution()

void jlm::llvm::aa::Andersen::Configuration::EnableOfflineVariableSubstitution ( bool  enable)
inlinenoexcept

Enables or disables the use of offline variable substitution to pre-process the constraint set before applying the solving algorithm. The substitution only performs constraint variable unification, which may create opportunities for constraint normalization.

Definition at line 109 of file Andersen.hpp.

◆ EnableOnlineCycleDetection()

void jlm::llvm::aa::Andersen::Configuration::EnableOnlineCycleDetection ( bool  enable)
inlinenoexcept

Enables or disables online cycle detection in the Worklist solver, as described by Pearce, 2003: "Online cycle detection and difference propagation for pointer analysis" It detects all cycles, so it can not be combined with other cycle detection techniques.

Definition at line 143 of file Andersen.hpp.

◆ EnablePreferImplicitPointees()

void jlm::llvm::aa::Andersen::Configuration::EnablePreferImplicitPointees ( bool  enable)
inlinenoexcept

Enables or disables preferring implicit pointees in the Worklist solver

Definition at line 209 of file Andersen.hpp.

◆ GetAllConfigurations()

std::vector< Andersen::Configuration > jlm::llvm::aa::Andersen::Configuration::GetAllConfigurations ( )
static
Returns
a list containing all possible Configurations, avoiding useless combinations of techniques.

Definition at line 68 of file Andersen.cpp.

◆ GetSolver()

Solver jlm::llvm::aa::Andersen::Configuration::GetSolver ( ) const
inlinenoexcept

Definition at line 81 of file Andersen.hpp.

◆ GetWorklistSoliverPolicy()

PointerObjectConstraintSet::WorklistSolverPolicy jlm::llvm::aa::Andersen::Configuration::GetWorklistSoliverPolicy ( ) const
inlinenoexcept

Definition at line 97 of file Andersen.hpp.

◆ IsDifferencePropagationEnabled()

bool jlm::llvm::aa::Andersen::Configuration::IsDifferencePropagationEnabled ( ) const
inlinenoexcept

Definition at line 200 of file Andersen.hpp.

◆ IsHybridCycleDetectionEnabled()

bool jlm::llvm::aa::Andersen::Configuration::IsHybridCycleDetectionEnabled ( ) const
inlinenoexcept

Definition at line 166 of file Andersen.hpp.

◆ IsLazyCycleDetectionEnabled()

bool jlm::llvm::aa::Andersen::Configuration::IsLazyCycleDetectionEnabled ( ) const
inlinenoexcept

Definition at line 183 of file Andersen.hpp.

◆ IsOfflineConstraintNormalizationEnabled()

bool jlm::llvm::aa::Andersen::Configuration::IsOfflineConstraintNormalizationEnabled ( ) const
inlinenoexcept

Definition at line 132 of file Andersen.hpp.

◆ IsOfflineVariableSubstitutionEnabled()

bool jlm::llvm::aa::Andersen::Configuration::IsOfflineVariableSubstitutionEnabled ( ) const
inlinenoexcept

Definition at line 115 of file Andersen.hpp.

◆ IsOnlineCycleDetectionEnabled()

bool jlm::llvm::aa::Andersen::Configuration::IsOnlineCycleDetectionEnabled ( ) const
inlinenoexcept

Definition at line 149 of file Andersen.hpp.

◆ IsPreferImplicitPointeesEnabled()

bool jlm::llvm::aa::Andersen::Configuration::IsPreferImplicitPointeesEnabled ( ) const
inlinenoexcept

Definition at line 215 of file Andersen.hpp.

◆ NaiveSolverConfiguration()

static Configuration jlm::llvm::aa::Andersen::Configuration::NaiveSolverConfiguration ( )
inlinestaticnoexcept

Creates a solver configuration using the naive solver, with all offline and online speedup techniques disabled.

Returns
the solver configuration

Definition at line 250 of file Andersen.hpp.

◆ SetSolver()

void jlm::llvm::aa::Andersen::Configuration::SetSolver ( Solver  solver)
inlinenoexcept

Sets which solver algorithm to use. Not all solvers are compatible with all online techniques.

Definition at line 75 of file Andersen.hpp.

◆ SetWorklistSolverPolicy()

void jlm::llvm::aa::Andersen::Configuration::SetWorklistSolverPolicy ( PointerObjectConstraintSet::WorklistSolverPolicy  policy)
inlinenoexcept

Sets which policy to be used by the worklist. Only applies to the worklist solver.

Definition at line 91 of file Andersen.hpp.

◆ ToString()

std::string jlm::llvm::aa::Andersen::Configuration::ToString ( ) const

Definition at line 28 of file Andersen.cpp.

Member Data Documentation

◆ EnableDifferencePropagation_

bool jlm::llvm::aa::Andersen::Configuration::EnableDifferencePropagation_ = false
private

Definition at line 276 of file Andersen.hpp.

◆ EnableHybridCycleDetection_

bool jlm::llvm::aa::Andersen::Configuration::EnableHybridCycleDetection_ = false
private

Definition at line 274 of file Andersen.hpp.

◆ EnableLazyCycleDetection_

bool jlm::llvm::aa::Andersen::Configuration::EnableLazyCycleDetection_ = false
private

Definition at line 275 of file Andersen.hpp.

◆ EnableOfflineConstraintNormalization_

bool jlm::llvm::aa::Andersen::Configuration::EnableOfflineConstraintNormalization_ = false
private

Definition at line 269 of file Andersen.hpp.

◆ EnableOfflineVariableSubstitution_

bool jlm::llvm::aa::Andersen::Configuration::EnableOfflineVariableSubstitution_ = false
private

Definition at line 268 of file Andersen.hpp.

◆ EnableOnlineCycleDetection_

bool jlm::llvm::aa::Andersen::Configuration::EnableOnlineCycleDetection_ = false
private

Definition at line 273 of file Andersen.hpp.

◆ EnablePreferImplicitPointees_

bool jlm::llvm::aa::Andersen::Configuration::EnablePreferImplicitPointees_ = false
private

Definition at line 277 of file Andersen.hpp.

◆ Solver_

Solver jlm::llvm::aa::Andersen::Configuration::Solver_ = Solver::Naive
private

Definition at line 270 of file Andersen.hpp.

◆ WorklistSolverPolicy_

PointerObjectConstraintSet::WorklistSolverPolicy jlm::llvm::aa::Andersen::Configuration::WorklistSolverPolicy_
private

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