OpenVDB: PointComputeGenerator Struct Reference

OpenVDB 11.0.0

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PointComputeGenerator Struct Reference

Visitor object which will generate llvm IR for a syntax tree which has been generated from AX that targets point grids. The IR will represent 2 functions : one that executes over single points and one that executes over a collection of points. This is primarily used by the Compiler class. More...

`#include <openvdb_ax/codegen/PointComputeGenerator.h>`

Inheritance diagram for PointComputeGenerator:

## Public Types
using | NodeType = typename std::conditional< true, const NodeT, NodeT >::type
| Templated conditional which resolves to a const NodeT if ConstVisit is true, or a non-const NodeT if ConstVisit is false.

## Public Member Functions
| PointComputeGenerator (llvm::Module &module, const FunctionOptions &options, FunctionRegistry &functionRegistry, Logger &logger)
| Constructor.
| ~PointComputeGenerator () override=default
AttributeRegistry::Ptr | generate (const ast::Tree &node)
bool | visit (const ast::Attribute *) override
| Visitor methods for all AST nodes which implement IR generation.
bool | traverse (const ast::Block *block)
| Custom traversal of scoped blocks.
bool | traverse (const ast::CommaOperator *comma)
| Custom traversal of comma expression.
bool | traverse (const ast::ConditionalStatement *cond)
| Custom traversal of conditional statements.
bool | traverse (const ast::BinaryOperator *bin)
| Custom traversal of binary operators.
bool | traverse (const ast::TernaryOperator *tern)
| Custom traversal of ternary operators.
bool | traverse (const ast::Loop *loop)
| Custom traversal of loops.
bool | traverse (const ast::DeclareLocal *decl)
| Custom traversal of declarations.
virtual bool | visit (const ast::CommaOperator *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::AssignExpression *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Crement *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::FunctionCall *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Attribute *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Tree *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Block *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::ConditionalStatement *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Loop *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Keyword *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::UnaryOperator *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::BinaryOperator *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::TernaryOperator *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Cast *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::DeclareLocal *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Local *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::ExternalVariable *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::ArrayUnpack *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::ArrayPack *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Value< bool > *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Value< int16_t > *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Value< int32_t > *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Value< int64_t > *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Value< float > *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Value< double > *)
| Visitor methods for all AST nodes which implement IR generation.
virtual bool | visit (const ast::Value< std::string > *)
| Visitor methods for all AST nodes which implement IR generation.
template<typename ValueType >
std::enable_if< std::is_integral< ValueType >::value, bool >::type | visit (const ast::Value< ValueType > *node)
template<typename ValueType >
std::enable_if< std::is_floating_point< ValueType >::value, bool >::type | visit (const ast::Value< ValueType > *node)
SymbolTable & | globals ()
const SymbolTable & | globals () const
bool | postOrderNodes () const
| Code generation always runs post order.
ComputeGenerator & | derived ()
| Accesses the derived class by static casting the current object. Assumes use of the Curiously Recursive Template Pattern (CRTP).
Traversals
bool | traverse (NodeType< ast::Tree > *tree)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::StatementList > *cond)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Block > *block)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::CommaOperator > *comma)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Loop > *loop)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Keyword > *keyw)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::ConditionalStatement > *cond)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::AssignExpression > *asgn)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Crement > *crmt)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::UnaryOperator > *unry)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::BinaryOperator > *bin)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::TernaryOperator > *tern)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Cast > *cast)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::FunctionCall > *call)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Attribute > *attr)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::ExternalVariable > *ext)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::DeclareLocal > *decl)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Local > *loc)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::ArrayPack > *pack)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::ArrayUnpack > *pack)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Value< bool > > *val)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Value< int16_t > > *val)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Value< int32_t > > *val)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Value< int64_t > > *val)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Value< float > > *val)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Value< double > > *val)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Value< std::string > > *val)
| Default traversals for a given concrete AST node type.
bool | traverse (NodeType< ast::Node > *node)
| The default traversal method which is hit for all child traversals. The correct derived traversal scheme is selected by using the node enumerated type.
Visits
bool | visit (NodeType< ast::Node > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Statement > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Expression > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Variable > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::ValueBase > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Tree > *)
| Visits for concrete Node types.
bool | visit (NodeType< ast::StatementList > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Block > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::CommaOperator > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Loop > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Keyword > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::ConditionalStatement > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::AssignExpression > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Crement > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::UnaryOperator > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::BinaryOperator > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::TernaryOperator > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Cast > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::FunctionCall > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Attribute > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::ExternalVariable > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::DeclareLocal > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Local > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::ArrayPack > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::ArrayUnpack > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Value< bool > > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Value< int16_t > > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Value< int32_t > > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Value< int64_t > > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Value< float > > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Value< double > > *)
| Visits for abstract (pure-virtual) Node types.
bool | visit (NodeType< ast::Value< std::string > > *)
| Visits for abstract (pure-virtual) Node types.
Options
bool | reverseChildVisits () const
| Default behavior option. Reverses the traversal order of child nodes. If true, child nodes are accessed from last to first index .i.e. Node::children() -> 0. If false, child nodes are accessed from first to last .i.e. 0 -> Node::children()
bool | visitNodeHierarchies () const
| Default behavior option. Controls whether nodes visit themselves at each stage of their class hierarchy. If true, nodes perform multiple visits on their potentially abstract base classes. If false, only the concrete derived types are visited.
bool | reverseHierarchyVisits () const
| Default behavior option. Reverses the traversal order of node hierarchies. If true, hierarchical visits start at the very top of their inheritance structure (always a Node AST node) and visit downwards until the lowest derived concrete node is reached. If false, hierarchical visits start at the lowest derived concrete node and visit upwards until the very top of their inheritance structure (always a Node AST node) is reached.

## Protected Member Functions
const FunctionGroup * | getFunction (const std::string &identifier, const bool allowInternal=false)
bool | binaryExpression (llvm::Value *&result, llvm::Value *lhs, llvm::Value *rhs, const ast::tokens::OperatorToken op, const ast::Node *node)
bool | assignExpression (llvm::Value *lhs, llvm::Value *&rhs, const ast::Node *node)
void | createFreeSymbolStrings (llvm::IRBuilder<> &)
| Clear any strings which were allocated in a given function. This method accepts an IRBuilder which is expected to be attached to a valid block/function. For each block in the function with a return instruction, this function calls the appropriate memory methods to deallocate any strings (which are alloced in the function prologue).

## Protected Attributes
llvm::Module & | mModule
llvm::LLVMContext & | mContext
llvm::IRBuilder | mBuilder
std::stack< llvm::Value * > | mValues
std::stack< std::pair< llvm::BasicBlock *, llvm::BasicBlock * > > | mBreakContinueStack
size_t | mScopeIndex
SymbolTableBlocks | mSymbolTables
llvm::Function * | mFunction
const FunctionOptions | mOptions
Logger & | mLog

## Detailed Description

Visitor object which will generate llvm IR for a syntax tree which has been generated from AX that targets point grids. The IR will represent 2 functions : one that executes over single points and one that executes over a collection of points. This is primarily used by the Compiler class.

## Member Typedef Documentation

## ◆ NodeType

using NodeType = typename std::conditional<true , const NodeT, NodeT>::type
| inherited

Templated conditional which resolves to a const NodeT if ConstVisit is true, or a non-const NodeT if ConstVisit is false.

## Constructor & Destructor Documentation

## ◆ PointComputeGenerator()

PointComputeGenerator | ( | llvm::Module & | module,
|  | const FunctionOptions & | options,
|  | FunctionRegistry & | functionRegistry,
|  | Logger & | logger
| ) |  |

Constructor.

Parameters

  module | llvm Module for generating IR
  options | Options for the function registry behaviour
  functionRegistry | Function registry object which will be used when generating IR for function calls
  logger | Logger for collecting logical errors and warnings

## ◆ ~PointComputeGenerator()

~PointComputeGenerator | ( |  | ) |
| overridedefault

## Member Function Documentation

## ◆ assignExpression()

bool assignExpression | ( | llvm::Value * | lhs,
|  | llvm::Value *& | rhs,
|  | const ast::Node * | node
| ) |  |
| protectedinherited

## ◆ binaryExpression()

bool binaryExpression | ( | llvm::Value *& | result,
|  | llvm::Value * | lhs,
|  | llvm::Value * | rhs,
|  | const ast::tokens::OperatorToken | op,
|  | const ast::Node * | node
| ) |  |
| protectedinherited

## ◆ createFreeSymbolStrings()

void createFreeSymbolStrings | ( | llvm::IRBuilder<> & |  | ) |
| protectedinherited

Clear any strings which were allocated in a given function. This method accepts an IRBuilder which is expected to be attached to a valid block/function. For each block in the function with a return instruction, this function calls the appropriate memory methods to deallocate any strings (which are alloced in the function prologue).

## ◆ derived()

ComputeGenerator & derived | ( |  | ) |
| inlineinherited

Accesses the derived class by static casting the current object. Assumes use of the Curiously Recursive Template Pattern (CRTP).

## ◆ generate()

AttributeRegistry::Ptr generate | ( | const ast::Tree & | node | ) |

## ◆ getFunction()

const FunctionGroup * getFunction | ( | const std::string & | identifier,
|  | const bool | allowInternal = `false`
| ) |  |
| protectedinherited

## ◆ globals() [1/2]

SymbolTable & globals | ( |  | ) |
| inlineinherited

## ◆ globals() [2/2]

const SymbolTable & globals | ( |  | ) | const
| inlineinherited

## ◆ postOrderNodes()

bool postOrderNodes | ( |  | ) | const
| inlineinherited

Code generation always runs post order.

## ◆ reverseChildVisits()

bool reverseChildVisits | ( |  | ) | const
| inlineinherited

Default behavior option. Reverses the traversal order of child nodes. If true, child nodes are accessed from last to first index .i.e. Node::children() -> 0. If false, child nodes are accessed from first to last .i.e. 0 -> Node::children()

## ◆ reverseHierarchyVisits()

bool reverseHierarchyVisits | ( |  | ) | const
| inlineinherited

Default behavior option. Reverses the traversal order of node hierarchies. If true, hierarchical visits start at the very top of their inheritance structure (always a Node AST node) and visit downwards until the lowest derived concrete node is reached. If false, hierarchical visits start at the lowest derived concrete node and visit upwards until the very top of their inheritance structure (always a Node AST node) is reached.

Note
  Has no effect if visitNodeHierarchies() is false

## ◆ traverse() [1/35]

bool traverse | ( | const ast::BinaryOperator * | bin | ) |
| inline

Custom traversal of binary operators.

Note
  This overrides the default traversal to handle short-circuiting in logical AND and OR

## ◆ traverse() [2/35]

bool traverse | ( | const ast::Block * | block | ) |
| inline

Custom traversal of scoped blocks.

Note
  This overrides the default traversal to incorporate the scoping of variables declared in this block

## ◆ traverse() [3/35]

bool traverse | ( | const ast::CommaOperator * | comma | ) |
| inline

Custom traversal of comma expression.

Note
  This overrides the default traversal to handle errors without stopping generation of entire list

## ◆ traverse() [4/35]

bool traverse | ( | const ast::ConditionalStatement * | cond | ) |
| inline

Custom traversal of conditional statements.

Note
  This overrides the default traversal to handle branching between different code paths

## ◆ traverse() [5/35]

bool traverse | ( | const ast::DeclareLocal * | decl | ) |
| inline

Custom traversal of declarations.

Note
  This overrides the default traversal to handle traversal of the local and assignment of initialiser, if it exists

## ◆ traverse() [6/35]

bool traverse | ( | const ast::Loop * | loop | ) |
| inline

Custom traversal of loops.

Note
  This overrides the default traversal to handle branching between different code paths and the scoping of variables in for-loop initialisation

## ◆ traverse() [7/35]

bool traverse | ( | const ast::TernaryOperator * | tern | ) |
| inline

Custom traversal of ternary operators.

Note
  This overrides the default traversal to handle branching between different code paths

## ◆ traverse() [8/35]

bool traverse | ( | NodeType< ast::ArrayPack > * | pack | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [9/35]

bool traverse | ( | NodeType< ast::ArrayUnpack > * | pack | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [10/35]

bool traverse | ( | NodeType< ast::AssignExpression > * | asgn | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [11/35]

bool traverse | ( | NodeType< ast::Attribute > * | attr | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [12/35]

bool traverse | ( | NodeType< ast::BinaryOperator > * | bin | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [13/35]

bool traverse | ( | NodeType< ast::Block > * | block | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [14/35]

bool traverse | ( | NodeType< ast::Cast > * | cast | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [15/35]

bool traverse | ( | NodeType< ast::CommaOperator > * | comma | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [16/35]

bool traverse | ( | NodeType< ast::ConditionalStatement > * | cond | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [17/35]

bool traverse | ( | NodeType< ast::Crement > * | crmt | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [18/35]

bool traverse | ( | NodeType< ast::DeclareLocal > * | decl | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [19/35]

bool traverse | ( | NodeType< ast::ExternalVariable > * | ext | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [20/35]

bool traverse | ( | NodeType< ast::FunctionCall > * | call | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [21/35]

bool traverse | ( | NodeType< ast::Keyword > * | keyw | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [22/35]

bool traverse | ( | NodeType< ast::Local > * | loc | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [23/35]

bool traverse | ( | NodeType< ast::Loop > * | loop | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [24/35]

bool traverse | ( | NodeType< ast::Node > * | node | ) |
| inlineinherited

The default traversal method which is hit for all child traversals. The correct derived traversal scheme is selected by using the node enumerated type.

Note
  Only handles traversal on concrete node types.

## ◆ traverse() [25/35]

bool traverse | ( | NodeType< ast::StatementList > * | cond | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [26/35]

bool traverse | ( | NodeType< ast::TernaryOperator > * | tern | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [27/35]

bool traverse | ( | NodeType< ast::Tree > * | tree | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [28/35]

bool traverse | ( | NodeType< ast::UnaryOperator > * | unry | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [29/35]

bool traverse | ( | NodeType< ast::Value< bool > > * | val | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [30/35]

bool traverse | ( | NodeType< ast::Value< double > > * | val | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [31/35]

bool traverse | ( | NodeType< ast::Value< float > > * | val | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [32/35]

bool traverse | ( | NodeType< ast::Value< int16_t > > * | val | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [33/35]

bool traverse | ( | NodeType< ast::Value< int32_t > > * | val | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [34/35]

bool traverse | ( | NodeType< ast::Value< int64_t > > * | val | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ traverse() [35/35]

bool traverse | ( | NodeType< ast::Value< std::string > > * | val | ) |
| inlineinherited

Default traversals for a given concrete AST node type.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [1/61]

virtual bool visit | ( | const ast::ArrayPack * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [2/61]

virtual bool visit | ( | const ast::ArrayUnpack * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [3/61]

virtual bool visit | ( | const ast::AssignExpression * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [4/61]

virtual bool visit | ( | const ast::Attribute * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [5/61]

bool visit | ( | const ast::Attribute * |  | ) |
| overridevirtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [6/61]

virtual bool visit | ( | const ast::BinaryOperator * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [7/61]

virtual bool visit | ( | const ast::Block * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [8/61]

virtual bool visit | ( | const ast::Cast * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [9/61]

virtual bool visit | ( | const ast::CommaOperator * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [10/61]

virtual bool visit | ( | const ast::ConditionalStatement * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [11/61]

virtual bool visit | ( | const ast::Crement * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [12/61]

virtual bool visit | ( | const ast::DeclareLocal * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [13/61]

virtual bool visit | ( | const ast::ExternalVariable * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [14/61]

virtual bool visit | ( | const ast::FunctionCall * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [15/61]

virtual bool visit | ( | const ast::Keyword * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [16/61]

virtual bool visit | ( | const ast::Local * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [17/61]

virtual bool visit | ( | const ast::Loop * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [18/61]

virtual bool visit | ( | const ast::TernaryOperator * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [19/61]

virtual bool visit | ( | const ast::Tree * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [20/61]

virtual bool visit | ( | const ast::UnaryOperator * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [21/61]

virtual bool visit | ( | const ast::Value< bool > * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [22/61]

virtual bool visit | ( | const ast::Value< double > * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [23/61]

virtual bool visit | ( | const ast::Value< float > * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [24/61]

virtual bool visit | ( | const ast::Value< int16_t > * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [25/61]

virtual bool visit | ( | const ast::Value< int32_t > * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [26/61]

virtual bool visit | ( | const ast::Value< int64_t > * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [27/61]

virtual bool visit | ( | const ast::Value< std::string > * |  | ) |
| virtual

Visitor methods for all AST nodes which implement IR generation.

Reimplemented from ComputeGenerator.

## ◆ visit() [28/61]

template<typename ValueType >

std::enable_if< std::is_floating_point< ValueType >::value, bool >::type visit | ( | const ast::Value< ValueType > * | node | ) |

## ◆ visit() [29/61]

template<typename ValueType >

std::enable_if< std::is_integral< ValueType >::value, bool >::type visit | ( | const ast::Value< ValueType > * | node | ) |

## ◆ visit() [30/61]

bool visit | ( | NodeType< ast::ArrayPack > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [31/61]

bool visit | ( | NodeType< ast::ArrayUnpack > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [32/61]

bool visit | ( | NodeType< ast::AssignExpression > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [33/61]

bool visit | ( | NodeType< ast::Attribute > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [34/61]

bool visit | ( | NodeType< ast::BinaryOperator > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [35/61]

bool visit | ( | NodeType< ast::Block > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [36/61]

bool visit | ( | NodeType< ast::Cast > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [37/61]

bool visit | ( | NodeType< ast::CommaOperator > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [38/61]

bool visit | ( | NodeType< ast::ConditionalStatement > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [39/61]

bool visit | ( | NodeType< ast::Crement > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [40/61]

bool visit | ( | NodeType< ast::DeclareLocal > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [41/61]

bool visit | ( | NodeType< ast::Expression > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [42/61]

bool visit | ( | NodeType< ast::ExternalVariable > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [43/61]

bool visit | ( | NodeType< ast::FunctionCall > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [44/61]

bool visit | ( | NodeType< ast::Keyword > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [45/61]

bool visit | ( | NodeType< ast::Local > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [46/61]

bool visit | ( | NodeType< ast::Loop > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [47/61]

bool visit | ( | NodeType< ast::Node > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [48/61]

bool visit | ( | NodeType< ast::Statement > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [49/61]

bool visit | ( | NodeType< ast::StatementList > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [50/61]

bool visit | ( | NodeType< ast::TernaryOperator > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [51/61]

bool visit | ( | NodeType< ast::Tree > * |  | ) |
| inlineinherited

Visits for concrete Node types.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [52/61]

bool visit | ( | NodeType< ast::UnaryOperator > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [53/61]

bool visit | ( | NodeType< ast::Value< bool > > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [54/61]

bool visit | ( | NodeType< ast::Value< double > > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [55/61]

bool visit | ( | NodeType< ast::Value< float > > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [56/61]

bool visit | ( | NodeType< ast::Value< int16_t > > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [57/61]

bool visit | ( | NodeType< ast::Value< int32_t > > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [58/61]

bool visit | ( | NodeType< ast::Value< int64_t > > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [59/61]

bool visit | ( | NodeType< ast::Value< std::string > > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [60/61]

bool visit | ( | NodeType< ast::ValueBase > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visit() [61/61]

bool visit | ( | NodeType< ast::Variable > * |  | ) |
| inlineinherited

Visits for abstract (pure-virtual) Node types.

Note
  These are only hit through the default behavior if Visitor::visitNodeHierarchies is enabled.

Returns
  True if traversal should continue, false to terminate

## ◆ visitNodeHierarchies()

bool visitNodeHierarchies | ( |  | ) | const
| inlineinherited

Default behavior option. Controls whether nodes visit themselves at each stage of their class hierarchy. If true, nodes perform multiple visits on their potentially abstract base classes. If false, only the concrete derived types are visited.

When disabled, abstract node visitor methods are never accessed directly through the default Visitor implementation. These types include Node, Statement, Expression, etc AST nodes. If true, for each linearly inherited AST node, a visit is performed on the entire hierarchy. For example, for a Local AST node which derives from Variable -> Expression -> Statement -> Node, 5 visits will be performed at each level.

## Member Data Documentation

## ◆ mBreakContinueStack

std::stack<std::pair<llvm::BasicBlock*, llvm::BasicBlock*> > mBreakContinueStack
| protectedinherited

## ◆ mBuilder

llvm::IRBuilder mBuilder
| protectedinherited

## ◆ mContext

llvm::LLVMContext& mContext
| protectedinherited

## ◆ mFunction

llvm::Function* mFunction
| protectedinherited

## ◆ mLog

Logger& mLog
| protectedinherited

## ◆ mModule

llvm::Module& mModule
| protectedinherited

## ◆ mOptions

const FunctionOptions mOptions
| protectedinherited

## ◆ mScopeIndex

size_t mScopeIndex
| protectedinherited

## ◆ mSymbolTables

SymbolTableBlocks mSymbolTables
| protectedinherited

## ◆ mValues

std::stack<llvm::Value*> mValues
| protectedinherited