class IdentifyingPassPtr

Declaration

class IdentifyingPassPtr { /* full declaration omitted */ };

Description

Discriminated union of Pass ID types. The PassConfig API prefers dealing with IDs because they are safer and more efficient. IDs decouple configuration from instantiation. This way, when a pass is overriden, it isn't unnecessarily instantiated. It is also unsafe to refer to a Pass pointer after adding it to a pass manager, which deletes redundant pass instances. However, it is convient to directly instantiate target passes with non-default ctors. These often don't have a registered PassInfo. Rather than force all target passes to implement the pass registry boilerplate, allow the PassConfig API to handle either type. AnalysisID is sadly char*, so PointerIntPair won't work.

Declared at: llvm/include/llvm/CodeGen/TargetPassConfig.h:53

Member Variables

private anonymous struct / union
private bool IsInstance = false

Method Overview

Methods

IdentifyingPassPtr()

Declared at: llvm/include/llvm/CodeGen/TargetPassConfig.h:61

IdentifyingPassPtr(llvm::AnalysisID IDPtr)

Declared at: llvm/include/llvm/CodeGen/TargetPassConfig.h:62

Parameters

llvm::AnalysisID IDPtr

IdentifyingPassPtr(llvm::Pass* InstancePtr)

Declared at: llvm/include/llvm/CodeGen/TargetPassConfig.h:63

Parameters

llvm::Pass* InstancePtr

llvm::AnalysisID getID() const

Declared at: llvm/include/llvm/CodeGen/TargetPassConfig.h:68

llvm::Pass* getInstance() const

Declared at: llvm/include/llvm/CodeGen/TargetPassConfig.h:73

bool isInstance() const

Declared at: llvm/include/llvm/CodeGen/TargetPassConfig.h:66

bool isValid() const

Declared at: llvm/include/llvm/CodeGen/TargetPassConfig.h:65