LLVM  16.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
llvm::AttributorConfig Struct Reference

Configuration for the Attributor. More...

#include "llvm/Transforms/IPO/Attributor.h"

Collaboration diagram for llvm::AttributorConfig:
Collaboration graph
[legend]

Public Types

using OptimizationRemarkGetter = function_ref< OptimizationRemarkEmitter &(Function *)>
 A callback function that returns an ORE object from a Function pointer. More...
 

Public Member Functions

 AttributorConfig (CallGraphUpdater &CGUpdater)
 

Public Attributes

bool IsModulePass = true
 Is the user of the Attributor a module pass or not. More...
 
bool DeleteFns = true
 Flag to determine if we can delete functions or keep dead ones around. More...
 
bool RewriteSignatures = true
 Flag to determine if we rewrite function signatures. More...
 
bool DefaultInitializeLiveInternals = true
 Flag to determine if we want to initialize all default AAs for an internal function marked live. More...
 
CallGraphUpdaterCGUpdater
 Helper to update an underlying call graph and to delete functions. More...
 
DenseSet< const char * > * Allowed = nullptr
 If not null, a set limiting the attribute opportunities. More...
 
std::optional< unsigned > MaxFixpointIterations = None
 Maximum number of iterations to run until fixpoint. More...
 
OptimizationRemarkGetter OREGetter = nullptr
 
const char * PassName = nullptr
 } More...
 

Detailed Description

Configuration for the Attributor.

Definition at line 1318 of file Attributor.h.

Member Typedef Documentation

◆ OptimizationRemarkGetter

A callback function that returns an ORE object from a Function pointer.

{

Definition at line 1356 of file Attributor.h.

Constructor & Destructor Documentation

◆ AttributorConfig()

llvm::AttributorConfig::AttributorConfig ( CallGraphUpdater CGUpdater)
inline

Definition at line 1320 of file Attributor.h.

Member Data Documentation

◆ Allowed

DenseSet<const char *>* llvm::AttributorConfig::Allowed = nullptr

If not null, a set limiting the attribute opportunities.

Definition at line 1348 of file Attributor.h.

Referenced by llvm::Attributor::getOrCreateAAFor().

◆ CGUpdater

CallGraphUpdater& llvm::AttributorConfig::CGUpdater

Helper to update an underlying call graph and to delete functions.

Definition at line 1345 of file Attributor.h.

Referenced by llvm::Attributor::removeCallSite().

◆ DefaultInitializeLiveInternals

bool llvm::AttributorConfig::DefaultInitializeLiveInternals = true

Flag to determine if we want to initialize all default AAs for an internal function marked live.

TODO: This should probably be a callback, or maybe identifyDefaultAbstractAttributes should be virtual, something to allow customizable lazy initialization for internal functions.

Definition at line 1342 of file Attributor.h.

Referenced by llvm::Attributor::markLiveInternalFunction(), llvm::OpenMPOptPass::run(), and llvm::OpenMPOptCGSCCPass::run().

◆ DeleteFns

bool llvm::AttributorConfig::DeleteFns = true

Flag to determine if we can delete functions or keep dead ones around.

Definition at line 1332 of file Attributor.h.

Referenced by llvm::Attributor::deleteAfterManifest().

◆ IsModulePass

bool llvm::AttributorConfig::IsModulePass = true

Is the user of the Attributor a module pass or not.

This determines what IR we can look at and modify. If it is a module pass we might deduce facts outside the initial function set and modify functions outside that set, but only as part of the optimization of the functions in the initial function set. For CGSCC passes we can look at the IR of the module slice but never run any deduction, or perform any modification, outside the initial function set (which we assume is the SCC).

Definition at line 1329 of file Attributor.h.

Referenced by llvm::Attributor::isModulePass(), and llvm::OpenMPOptCGSCCPass::run().

◆ MaxFixpointIterations

std::optional<unsigned> llvm::AttributorConfig::MaxFixpointIterations = None

Maximum number of iterations to run until fixpoint.

Definition at line 1351 of file Attributor.h.

Referenced by llvm::OpenMPOptPass::run(), and llvm::OpenMPOptCGSCCPass::run().

◆ OREGetter

OptimizationRemarkGetter llvm::AttributorConfig::OREGetter = nullptr

◆ PassName

const char* llvm::AttributorConfig::PassName = nullptr

}

The name of the pass running the attributor, used to emit remarks.

Definition at line 1361 of file Attributor.h.

Referenced by llvm::Attributor::emitRemark(), llvm::OpenMPOptPass::run(), and llvm::OpenMPOptCGSCCPass::run().

◆ RewriteSignatures

bool llvm::AttributorConfig::RewriteSignatures = true

Flag to determine if we rewrite function signatures.

Definition at line 1335 of file Attributor.h.

Referenced by llvm::Attributor::isValidFunctionSignatureRewrite(), llvm::OpenMPOptPass::run(), and llvm::OpenMPOptCGSCCPass::run().


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