CompilerTools.ReadWriteSet

Exported


from_exprs(ast::Array{T, N})

Walk through an array of expressions. Just recursively call from_expr for each expression in the array.

source: CompilerTools/src/read-write-set.jl:129


from_exprs(ast::Array{T, N}, callback::Union{Function, Void}, cbdata::ANY)

Walk through an array of expressions. Just recursively call from_expr for each expression in the array. Takes a callback and an opaque object so that non-standard Julia AST nodes can be processed via the callback.

source: CompilerTools/src/read-write-set.jl:139


from_exprs(ast::Array{T, N}, depth::Integer, rws::CompilerTools.ReadWriteSet.ReadWriteSetType, callback::Union{Function, Void}, cbdata::ANY)

Walk through an array of expressions. Just recursively call from_expr for each expression in the array. Takes a callback and an opaque object so that non-standard Julia AST nodes can be processed via the callback. Takes a ReadWriteSetType in "rws" into which information will be stored.

source: CompilerTools/src/read-write-set.jl:167


isRead(sym::Union{GenSym, Symbol}, rws::CompilerTools.ReadWriteSet.ReadWriteSetType)

Return true if some symbol in "sym" is read either as a scalar or array within the computed ReadWriteSetType.

source: CompilerTools/src/read-write-set.jl:82


isWritten(sym::Union{GenSym, Symbol}, rws::CompilerTools.ReadWriteSet.ReadWriteSetType)

Return true if some symbol in "sym" is written either as a scalar or array within the computed ReadWriteSetType.

source: CompilerTools/src/read-write-set.jl:95


CompilerTools.ReadWriteSet.AccessSet

Holds which scalars and which array are accessed and for array which index expressions are used.

source: CompilerTools/src/read-write-set.jl:40


CompilerTools.ReadWriteSet.ReadWriteSetType

Stores which scalars and arrays are read or written in some code region.

source: CompilerTools/src/read-write-set.jl:49

Internal


addIndexExpr!(this_dict, array_name, index_expr)

Takes a dictionary of symbol to an array of index expression. Takes an array in "array_name" being accessed with expression "index_expr". Makes sure there is an entry in the dictionary for this array and adds the index expression to this array.

source: CompilerTools/src/read-write-set.jl:229


from_assignment(ast::Array{Any, 1}, depth::Integer, rws::CompilerTools.ReadWriteSet.ReadWriteSetType, callback::Union{Function, Void}, cbdata::ANY)

Process an assignment AST node. The left-hand side of the assignment is added to the writeSet.

source: CompilerTools/src/read-write-set.jl:214


from_call(ast::Array{Any, 1}, depth::Integer, rws::CompilerTools.ReadWriteSet.ReadWriteSetType, callback::Union{Function, Void}, cbdata::ANY)

Process :call Expr nodes to find arrayref and arrayset calls and adding the corresponding index expressions to the read and write sets respectively.

source: CompilerTools/src/read-write-set.jl:239


from_coloncolon(ast::Array{T, N}, depth::Integer, rws::CompilerTools.ReadWriteSet.ReadWriteSetType, callback::Union{Function, Void}, cbdata::ANY)

Process a :(::) AST node. Just process the symbol part of the :(::) node in ast[1] (which is args of the node passed in).

source: CompilerTools/src/read-write-set.jl:189


from_expr(ast::ANY)

Walk through one AST node. Calls the main internal walking function after initializing an empty ReadWriteSetType.

source: CompilerTools/src/read-write-set.jl:146


from_expr(ast::ANY, callback::Union{Function, Void}, cbdata::ANY)

Walk through one AST node. Calls the main internal walking function after initializing an empty ReadWriteSetType. Takes a callback and an opaque object so that non-standard Julia AST nodes can be processed via the callback.

source: CompilerTools/src/read-write-set.jl:156


from_expr(ast::LambdaStaticData, depth::Integer, rws::CompilerTools.ReadWriteSet.ReadWriteSetType, callback::Union{Function, Void}, cbdata::ANY)

The main routine that switches on all the various AST node types. The internal nodes of the AST are of type Expr with various different Expr.head field values such as :lambda, :body, :block, etc. The leaf nodes of the AST all have different types.

source: CompilerTools/src/read-write-set.jl:302


from_lambda(ast::Expr, depth, rws::CompilerTools.ReadWriteSet.ReadWriteSetType, callback::Union{Function, Void}, cbdata::ANY)

Walk through a lambda expression. We just need to recurse through the lambda body and can ignore the rest.

source: CompilerTools/src/read-write-set.jl:118


from_tuple(ast::Array{T, N}, depth::Integer, rws::CompilerTools.ReadWriteSet.ReadWriteSetType, callback::Union{Function, Void}, cbdata::ANY)

Walk through a tuple. Just recursively call from_exprs on the internal tuple array to process each part of the tuple.

source: CompilerTools/src/read-write-set.jl:181


toSymGen(x::Union{GenSym, Symbol})

In various places we need a SymGen type which is the union of Symbol and GenSym. This function takes a Symbol, SymbolNode, or GenSym and return either a Symbol or GenSym.

source: CompilerTools/src/read-write-set.jl:198


tryCallback(ast::ANY, callback::Union{Function, Void}, cbdata::ANY, depth::Integer, rws::CompilerTools.ReadWriteSet.ReadWriteSetType)

If an AST node is not recognized then we try the passing the node to the callback to see if it was able to process it. If so, then we process the regular Julia statement returned by the callback.

source: CompilerTools/src/read-write-set.jl:284


uncompressed_ast(l::LambdaStaticData)

Convert a compressed LambdaStaticData format into the uncompressed AST format.

source: CompilerTools/src/read-write-set.jl:108