HLVM API Documentation

Pass Class Reference

HLVM AST Abstract Pass. More...

#include <Pass.h>

Inheritance diagram for Pass:

Inheritance graph
[legend]
List of all members.

Constructors

Data

Public Types

Types

Public Member Functions

Handlers
Accessors

Detailed Description

HLVM AST Abstract Pass.

This class provides an abstract interface to Pass execution. This class is meant to be subclassed and the various "handle" methods overriden to gain access to the information in the AST.

Definition at line 42 of file Pass.h.


Member Enumeration Documentation

enum InterestKinds
 

Or these together and pass to the constructor to indicate which kinds of things you are interested in.

Enumerator:
All_Interest  Pass is interested in everything.
Block_Interest  Pass is interested in Blocks.
Operator_Interest  Pass is interested in Operators.
Function_Interest  Pass is interested in Functions.
Program_Interest  Pass is interested in Programs.
Type_Interest  Pass is interested in Types.
Variable_Interest  Pass is interested in Variables.

Definition at line 49 of file Pass.h.

enum TraversalKinds
 

Specifies the kinds of traversals that a pass can request. The PassManager always walks the tree in a depth-first search (DFS) and it can call the pass either when it arrives at the node (preorder) on the way down, or when it leaves the node (postorder) on the way up. A pass can also specify that it wants both pre-order and post-order traversal.

Enumerator:
NoTraversal  Pass doesn't want to be called!
PreOrderTraversal  Call pass on the way down the DFS walk.
PostOrderTraversal  Call pass on the way up the DFS walk.
PreAndPostOrderTraversal  Call pass on both the way down and up.

Definition at line 64 of file Pass.h.


Constructor & Destructor Documentation

Pass int  i,
TraversalKinds  m
[inline, protected]
 

Definition at line 75 of file Pass.h.

~Pass  )  [virtual]
 

Definition at line 224 of file Pass.cpp.


Member Function Documentation

virtual void handle Node n,
TraversalKinds  mode
[pure virtual]
 

Handle any kind of node. Subclasses should override this; the default implementation does nothing. This handler is only called if the interest is set to 0 (interested in everything). It is left to the subclass to disambiguate the Node.

void handleInitialize AST tree  )  [virtual]
 

Handle initialization. This is called before any other handle method is called. Default implementation does nothing

Definition at line 229 of file Pass.cpp.

void handleTerminate  )  [virtual]
 

Handle termination. This is called after all other handle methods are called. Default implementation does nothing

Definition at line 234 of file Pass.cpp.

int interest  )  const [inline]
 

Definition at line 106 of file Pass.h.

int mode  )  const [inline]
 

Definition at line 105 of file Pass.h.

static Pass* new_ResolveTypesPass  )  [static]
 

Pass * new_ValidatePass  )  [static]
 

Instantiate the standard passes.

Definition at line 1812 of file Validate.cpp.

int passed  )  const [inline]
 

Definition at line 107 of file Pass.h.

References Pass::passed_.


Member Data Documentation

bool passed_ [protected]
 

Definition at line 116 of file Pass.h.


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