ParallelAccelerator.ParallelIR
Exported
AstWalk(ast, callback, cbdata) ¶
ParallelIR version of AstWalk. Invokes the DomainIR version of AstWalk and provides the parallel IR AstWalk callback AstWalkCallback.
Parallel IR AstWalk calls Domain IR AstWalk which in turn calls CompilerTools.AstWalker.AstWalk. For each AST node, CompilerTools.AstWalker.AstWalk calls Domain IR callback to give it a chance to handle the node if it is a Domain IR node. Likewise, Domain IR callback first calls Parallel IR callback to give it a chance to handle Parallel IR nodes. The Parallel IR callback similarly first calls the user-level callback to give it a chance to process the node. If a callback returns "nothing" it means it didn't modify that node and that the previous code should process it. The Parallel IR callback will return "nothing" if the node isn't a Parallel IR node. The Domain IR callback will return "nothing" if the node isn't a Domain IR node.
source: ParallelAccelerator/src/parallel-ir.jl:5229
PIRInplace(x) ¶
If set to non-zero, perform the phase where non-inplace maps are converted to inplace maps to reduce allocations.
source: ParallelAccelerator/src/parallel-ir.jl:4139
PIRNumSimplify(x) ¶
Specify the number of passes over the AST that do things like hoisting and other rearranging to maximize fusion. DEPRECATED.
source: ParallelAccelerator/src/parallel-ir.jl:1950
PIRRunAsTasks(x) ¶
Debugging feature to specify the number of tasks to create and to stop thereafter.
source: ParallelAccelerator/src/parallel-ir.jl:2140
PIRSetFuseLimit(x) ¶
Control how many parfor can be fused for testing purposes. -1 means fuse all possible parfors. 0 means don't fuse any parfors. 1+ means fuse the specified number of parfors but then stop fusing beyond that.
source: ParallelAccelerator/src/parallel-ir.jl:1944
PIRShortcutArrayAssignment(x) ¶
Enables an experimental mode where if there is a statement a = b and they are arrays and b is not live-out then use a special assignment node like a move assignment in C++.
source: ParallelAccelerator/src/parallel-ir.jl:4165
PIRTaskGraphMode(x) ¶
Control how blocks of code are made into tasks.
source: ParallelAccelerator/src/parallel-ir-task.jl:589
from_exprs(ast::Array{Any, 1}, depth, state) ¶
Process an array of expressions. Differentiate between top-level arrays of statements and arrays of expression that may occur elsewhere than the :body Expr.
source: ParallelAccelerator/src/parallel-ir.jl:2567
ParallelAccelerator.ParallelIR.PIRLoopNest ¶
Holds the information about a loop in a parfor node.
source: ParallelAccelerator/src/parallel-ir.jl:89
ParallelAccelerator.ParallelIR.PIRParForAst ¶
The parfor AST node type. While we are lowering domain IR to parfors and fusing we use this representation because it makes it easier to associate related statements before and after the loop to the loop itself.
source: ParallelAccelerator/src/parallel-ir.jl:333
ParallelAccelerator.ParallelIR.PIRReduction ¶
Holds the information about a reduction in a parfor node.
source: ParallelAccelerator/src/parallel-ir.jl:99
Internal
AstWalkCallback(x::Expr, dw::ParallelAccelerator.ParallelIR.DirWalk, top_level_number::Int64, is_top_level::Bool, read::Bool) ¶
AstWalk callback that handles ParallelIR AST node types.
source: ParallelAccelerator/src/parallel-ir.jl:5054
EquivalenceClassesAdd(ec::ParallelAccelerator.ParallelIR.EquivalenceClasses, sym::Symbol) ¶
Add a symbol as part of a new equivalence class if the symbol wasn't already in an equivalence class. Return the equivalence class for the symbol.
source: ParallelAccelerator/src/parallel-ir.jl:152
EquivalenceClassesClear(ec::ParallelAccelerator.ParallelIR.EquivalenceClasses) ¶
Clear an equivalence class.
source: ParallelAccelerator/src/parallel-ir.jl:166
EquivalenceClassesMerge(ec::ParallelAccelerator.ParallelIR.EquivalenceClasses, merge_to::Symbol, merge_from::Symbol) ¶
At some point we realize that two arrays must have the same dimensions but up until that point we might not have known that. In which case they will start in different equivalence classes, merge_to and merge_from, but need to be combined into one equivalence class. Go through the equivalence class dictionary and for any symbol belonging to the merge_from equivalence class, change it to now belong to the merge_to equivalence class.
source: ParallelAccelerator/src/parallel-ir.jl:136
PIRBbReorder(x) ¶
If set to non-zero, perform the bubble-sort like reordering phase to coalesce more parfor nodes together for fusion.
source: ParallelAccelerator/src/parallel-ir.jl:4155
PIRHoistAllocation(x) ¶
If set to non-zero, perform the rearrangement phase that tries to moves alllocations outside of loops.
source: ParallelAccelerator/src/parallel-ir.jl:4147
TypedExpr(typ, rest...) ¶
This should pretty always be used instead of Expr(...) to form an expression as it forces the typ to be provided.
source: ParallelAccelerator/src/parallel-ir.jl:80
addUnknownArray(x::Union{GenSym, Symbol}, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Given an array whose name is in "x", allocate a new equivalence class for this array.
source: ParallelAccelerator/src/parallel-ir.jl:866
addUnknownRange(x::Array{Union{ParallelAccelerator.ParallelIR.MaskSelector, ParallelAccelerator.ParallelIR.RangeData, ParallelAccelerator.ParallelIR.SingularSelector}, 1}, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Given an array of RangeExprs describing loop nest ranges, allocate a new equivalence class for this range.
source: ParallelAccelerator/src/parallel-ir.jl:876
add_merge_correlations(old_sym::Union{GenSym, Symbol}, new_sym::Union{GenSym, Symbol}, state::ParallelAccelerator.ParallelIR.expr_state) ¶
If we somehow determine that two arrays must be the same length then get the equivalence classes for the two arrays and merge those equivalence classes together.
source: ParallelAccelerator/src/parallel-ir.jl:917
asArray(x) ¶
Return one element array with element x.
source: ParallelAccelerator/src/parallel-ir.jl:5045
augment_sn(dim::Int64, index_vars, range::Array{Union{ParallelAccelerator.ParallelIR.MaskSelector, ParallelAccelerator.ParallelIR.RangeData, ParallelAccelerator.ParallelIR.SingularSelector}, 1}) ¶
Make sure the index parameters to arrayref or arrayset are Int64 or SymbolNode.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:60
call_instruction_count(args, state::ParallelAccelerator.ParallelIR.eic_state, debug_level) ¶
Generate an instruction count estimate for a call instruction.
source: ParallelAccelerator/src/parallel-ir-task.jl:352
checkAndAddSymbolCorrelation(lhs::Union{GenSym, Symbol}, state, dim_array) ¶
Make sure all the dimensions are SymbolNodes. Make sure each dimension variable is assigned to only once in the function. Extract just the dimension variables names into dim_names and then register the correlation from lhs to those dimension names.
source: ParallelAccelerator/src/parallel-ir.jl:3577
convertUnsafe(stmt) ¶
Remove unsafe array access Symbols from the incoming "stmt". Returns the updated statement if something was modifed, else returns "nothing".
source: ParallelAccelerator/src/parallel-ir-task.jl:950
convertUnsafeOrElse(stmt) ¶
Try to remove unsafe array access Symbols from the incoming "stmt". If successful, then return the updated statement, else return the unmodified statement.
source: ParallelAccelerator/src/parallel-ir-task.jl:969
convertUnsafeWalk(x::Expr, state, top_level_number, is_top_level, read) ¶
The AstWalk callback to find unsafe arrayset and arrayref variants and replace them with the regular Julia versions. Sets the "found" flag in the state when such a replacement is performed.
source: ParallelAccelerator/src/parallel-ir-task.jl:918
copy_propagate(node::ANY, data::ParallelAccelerator.ParallelIR.CopyPropagateState, top_level_number, is_top_level, read) ¶
In each basic block, if there is a "copy" (i.e., something of the form "a = b") then put that in copies as copies[a] = b. Then, later in the basic block if you see the symbol "a" then replace it with "b". Note that this is not SSA so "a" may be written again and if it is then it must be removed from copies.
source: ParallelAccelerator/src/parallel-ir.jl:3148
count_assignments(x, symbol_assigns::Dict{Symbol, Int64}, top_level_number, is_top_level, read) ¶
AstWalk callback to count the number of static times that a symbol is assigne within a method.
source: ParallelAccelerator/src/parallel-ir.jl:1197
create1D_array_access_desc(array::SymbolNode) ¶
Create an array access descriptor for "array". Presumes that for point "i" in the iteration space that only index "i" is accessed.
source: ParallelAccelerator/src/parallel-ir-task.jl:124
create2D_array_access_desc(array::SymbolNode) ¶
Create an array access descriptor for "array". Presumes that for points "(i,j)" in the iteration space that only indices "(i,j)" is accessed.
source: ParallelAccelerator/src/parallel-ir-task.jl:134
createInstructionCountEstimate(the_parfor::ParallelAccelerator.ParallelIR.PIRParForAst, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Takes a parfor and walks the body of the parfor and estimates the number of instruction needed for one instance of that body.
source: ParallelAccelerator/src/parallel-ir-task.jl:557
createLoweredAliasMap(dict1) ¶
Take a single-step alias map, e.g., a=>b, b=>c, and create a lowered dictionary, a=>c, b=>c, that maps each array to the transitively lowered array.
source: ParallelAccelerator/src/parallel-ir.jl:2127
createMapLhsToParfor(parfor_assignment, the_parfor, is_multi::Bool, sym_to_type::Dict{Union{GenSym, Symbol}, DataType}, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Creates a mapping between variables on the left-hand side of an assignment where the right-hand side is a parfor and the arrays or scalars in that parfor that get assigned to the corresponding parts of the left-hand side. Returns a tuple where the first element is a map for arrays between left-hand side and parfor and the second element is a map for reduction scalars between left-hand side and parfor. is_multi is true if the assignment is a fusion assignment. parfor_assignment is the AST of the whole expression. the_parfor is the PIRParForAst type part of the incoming assignment. sym_to_type is an out parameter that maps symbols in the output mapping to their types.
source: ParallelAccelerator/src/parallel-ir.jl:2061
createStateVar(state, name, typ, access) ¶
Add a local variable to the current function's lambdaInfo. Returns a symbol node of the new variable.
source: ParallelAccelerator/src/parallel-ir.jl:759
createTempForArray(array_sn::Union{GenSym, Symbol, SymbolNode}, unique_id::Int64, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Create a temporary variable that is parfor private to hold the value of an element of an array.
source: ParallelAccelerator/src/parallel-ir.jl:767
createTempForArray(array_sn::Union{GenSym, Symbol, SymbolNode}, unique_id::Int64, state::ParallelAccelerator.ParallelIR.expr_state, temp_type) ¶
Create a temporary variable that is parfor private to hold the value of an element of an array.
source: ParallelAccelerator/src/parallel-ir.jl:767
createTempForRangeOffset(num_used, ranges::Array{ParallelAccelerator.ParallelIR.RangeData, 1}, unique_id::Int64, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Create a variable to hold the offset of a range offset from the start of the array.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:452
createTempForRangedArray(array_sn::Union{GenSym, Symbol, SymbolNode}, range::Array{Union{ParallelAccelerator.ParallelIR.MaskSelector, ParallelAccelerator.ParallelIR.RangeData, ParallelAccelerator.ParallelIR.SingularSelector}, 1}, unique_id::Int64, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Create a temporary variable that is parfor private to hold the value of an element of an array.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:479
create_array_access_desc(array::SymbolNode) ¶
Create an array access descriptor for "array".
source: ParallelAccelerator/src/parallel-ir-task.jl:144
create_equivalence_classes(node::Expr, state::ParallelAccelerator.ParallelIR.expr_state, top_level_number::Int64, is_top_level::Bool, read::Bool) ¶
AstWalk callback to determine the array equivalence classes.
source: ParallelAccelerator/src/parallel-ir.jl:3727
dfsVisit(swd::ParallelAccelerator.ParallelIR.StatementWithDeps, vtime::Int64, topo_sort::Array{ParallelAccelerator.ParallelIR.StatementWithDeps, N}) ¶
Construct a topological sort of the dependence graph.
source: ParallelAccelerator/src/parallel-ir.jl:4186
estimateInstrCount(ast::Expr, state::ParallelAccelerator.ParallelIR.eic_state, top_level_number, is_top_level, read) ¶
AstWalk callback for estimating the instruction count.
source: ParallelAccelerator/src/parallel-ir-task.jl:474
extractArrayEquivalencies(node::Expr, state) ¶
"node" is a domainIR node. Take the arrays used in this node, create an array equivalence for them if they don't already have one and make sure they all share one equivalence class.
source: ParallelAccelerator/src/parallel-ir.jl:3516
findSelectedDimensions(inputInfo::Array{ParallelAccelerator.ParallelIR.InputInfo, 1}, state) ¶
Given all the InputInfo for a Domain IR operation being lowered to Parallel IR, determine the number of output dimensions for those arrays taking into account that singly selected trailing dimensinos are eliminated. Make sure that all such arrays have the same output dimensions because this will match the loop nest size.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:959
flattenParfor(new_body, the_parfor::ParallelAccelerator.ParallelIR.PIRParForAst) ¶
Takes a new array of body statements in the process of construction in "new_body" and takes a parfor to add to that body. This parfor is in the nested (parfor code is in the parfor node itself) temporary form we use for fusion although pre-statements and post-statements are already elevated by this point. We replace this nested form with a non-nested form where we have a parfor_start and parfor_end to delineate the parfor code.
source: ParallelAccelerator/src/parallel-ir-flatten.jl:94
form_and_simplify(ranges::Array{Union{ParallelAccelerator.ParallelIR.MaskSelector, ParallelAccelerator.ParallelIR.RangeData, ParallelAccelerator.ParallelIR.SingularSelector}, 1}) ¶
For each entry in ranges, form a range length expression and simplify them.
source: ParallelAccelerator/src/parallel-ir.jl:1034
form_and_simplify(rd::ParallelAccelerator.ParallelIR.RangeData) ¶
Convert one RangeData to some length expression and then simplify it.
source: ParallelAccelerator/src/parallel-ir.jl:1010
from_assertEqShape(node::Expr, state) ¶
Create array equivalences from an assertEqShape AST node. There are two arrays in the args to assertEqShape.
source: ParallelAccelerator/src/parallel-ir.jl:2901
from_assignment(lhs, rhs, depth, state) ¶
Process an assignment expression. Starts by recurisvely processing the right-hand side of the assignment. Eliminates the assignment of a=b if a is dead afterwards and b has no side effects. Does some array equivalence class work which may be redundant given that we now run a separate equivalence class pass so consider removing that part of this code.
source: ParallelAccelerator/src/parallel-ir.jl:2984
from_call(ast::Array{Any, 1}, depth, state) ¶
Process a call AST node.
source: ParallelAccelerator/src/parallel-ir.jl:3106
from_expr(ast::Expr, depth, state::ParallelAccelerator.ParallelIR.expr_state, top_level) ¶
The main ParallelIR function for processing some node in the AST.
source: ParallelAccelerator/src/parallel-ir.jl:4876
from_lambda(lambda::Expr, depth, state) ¶
Process a :lambda Expr.
source: ParallelAccelerator/src/parallel-ir.jl:1223
from_root(function_name, ast::Expr) ¶
The main ENTRY point into ParallelIR. 1) Do liveness analysis. 2) Convert mmap to mmap! where possible. 3) Do some code rearrangement (e.g., hoisting) to maximize later fusion. 4) Create array equivalence classes within the function. 5) Rearrange statements within a basic block to push domain operations to the bottom so more fusion. 6) Call the main from_expr to process the AST for the function. This will a) Lower domain IR to parallel IR AST nodes. b) Fuse parallel IR nodes where possible. c) Convert to task IR nodes if task mode enabled.
source: ParallelAccelerator/src/parallel-ir.jl:4535
fullyLowerAlias(dict::Dict{Union{GenSym, Symbol}, Union{GenSym, Symbol}}, input::Union{GenSym, Symbol}) ¶
Given an "input" Symbol, use that Symbol as key to a dictionary. While such a Symbol is present in the dictionary replace it with the corresponding value from the dict.
source: ParallelAccelerator/src/parallel-ir.jl:2116
fuse(body, body_index, cur, state) ¶
Test whether we can fuse the two most recent parfor statements and if so to perform that fusion.
source: ParallelAccelerator/src/parallel-ir.jl:2158
generate_instr_count(function_name, signature) ¶
Try to figure out the instruction count for a given call.
source: ParallelAccelerator/src/parallel-ir-task.jl:398
getArrayElemType(array::GenSym, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Returns the element type of an Array.
source: ParallelAccelerator/src/parallel-ir.jl:731
getArrayElemType(array::SymbolNode, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Returns the element type of an Array.
source: ParallelAccelerator/src/parallel-ir.jl:724
getArrayElemType(atyp::DataType) ¶
Returns the element type of an Array.
source: ParallelAccelerator/src/parallel-ir.jl:711
getArrayNumDims(array::GenSym, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Return the number of dimensions of an Array.
source: ParallelAccelerator/src/parallel-ir.jl:748
getArrayNumDims(array::SymbolNode, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Return the number of dimensions of an Array.
source: ParallelAccelerator/src/parallel-ir.jl:739
getConstDims(num_dim_inputs, inputInfo::ParallelAccelerator.ParallelIR.InputInfo) ¶
In the case where a domain IR operation on an array creates a lower dimensional output, the indexing expression needs the expression that selects those constant trailing dimensions that are being dropped. This function returns an array of those constant expressions for the trailing dimensions.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:980
getCorrelation(sng::Union{GenSym, Symbol, SymbolNode}, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Get the equivalence class of a domain IR input in inputInfo.
source: ParallelAccelerator/src/parallel-ir.jl:2024
getFirstArrayLens(prestatements, num_dims) ¶
Get the variable which holds the length of the first input array to a parfor.
source: ParallelAccelerator/src/parallel-ir.jl:1715
getIO(stmt_ids, bb_statements) ¶
Given a set of statement IDs and liveness information for the statements of the function, determine which symbols are needed at input and which symbols are purely local to the functio.
source: ParallelAccelerator/src/parallel-ir-task.jl:840
getInputSet(node::ParallelAccelerator.ParallelIR.PIRParForAst) ¶
Returns a Set with all the arrays read by this parfor.
source: ParallelAccelerator/src/parallel-ir.jl:1383
getLhsFromAssignment(assignment) ¶
Get the left-hand side of an assignment expression.
source: ParallelAccelerator/src/parallel-ir.jl:1354
getLhsOutputSet(lhs, assignment) ¶
Get the real outputs of an assignment statement. If the assignment expression is normal then the output is just the left-hand side. If the assignment expression is augmented with a FusionSentinel then the real outputs are the 4+ arguments to the expression.
source: ParallelAccelerator/src/parallel-ir.jl:1398
getMaxLabel(max_label, stmts::Array{Any, 1}) ¶
Scan the body of a function in "stmts" and return the max label in a LabelNode AST seen in the body.
source: ParallelAccelerator/src/parallel-ir.jl:4349
getNonBlock(head_preds, back_edge) ¶
Find the basic block before the entry to a loop.
source: ParallelAccelerator/src/parallel-ir-task.jl:5
getOrAddArrayCorrelation(x::Union{GenSym, Symbol}, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Return a correlation set for an array. If the array was not previously added then add it and return it.
source: ParallelAccelerator/src/parallel-ir.jl:929
getOrAddRangeCorrelation(array, ranges::Array{Union{ParallelAccelerator.ParallelIR.MaskSelector, ParallelAccelerator.ParallelIR.RangeData, ParallelAccelerator.ParallelIR.SingularSelector}, 1}, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Gets (or adds if absent) the range correlation for the given array of RangeExprs.
source: ParallelAccelerator/src/parallel-ir.jl:1071
getOrAddSymbolCorrelation(array::Union{GenSym, Symbol}, state::ParallelAccelerator.ParallelIR.expr_state, dims::Array{Union{GenSym, Symbol}, 1}) ¶
A new array is being created with an explicit size specification in dims.
source: ParallelAccelerator/src/parallel-ir.jl:1109
getParforCorrelation(parfor, state) ¶
Get the equivalence class of the first array who length is extracted in the pre-statements of the specified "parfor".
source: ParallelAccelerator/src/parallel-ir.jl:2017
getParforNode(node) ¶
Get the parfor object from either a bare parfor or one part of an assignment.
source: ParallelAccelerator/src/parallel-ir.jl:1336
getPastIndex(arrays::Dict{Union{GenSym, Symbol}, Array{Array{Any, 1}, 1}}) ¶
Look at the arrays that are accessed and see if they use a forward index, i.e., an index that could be greater than 1.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:30
getPrivateSet(body::Array{Any, 1}) ¶
Go through the body of a parfor and collect those Symbols, GenSyms, etc. that are assigned to within the parfor except reduction variables.
source: ParallelAccelerator/src/parallel-ir.jl:1175
getPrivateSetInner(x::Expr, state::Set{Union{GenSym, Symbol, SymbolNode}}, top_level_number::Int64, is_top_level::Bool, read::Bool) ¶
The AstWalk callback function for getPrivateSet. For each AST in a parfor body, if the node is an assignment or loop head node then add the written entity to the state.
source: ParallelAccelerator/src/parallel-ir.jl:1145
getRhsFromAssignment(assignment) ¶
Get the right-hand side of an assignment expression.
source: ParallelAccelerator/src/parallel-ir.jl:1347
getSName(ssn::Symbol) ¶
Get the name of a symbol whether the input is a Symbol or SymbolNode or :(::) Expr.
source: ParallelAccelerator/src/parallel-ir.jl:2530
get_one(ast::Array{T, N}) ¶
Take something returned from AstWalk and assert it should be an array but in this context that the array should also be of length 1 and then return that single element.
source: ParallelAccelerator/src/parallel-ir.jl:5030
get_unique_num() ¶
If we need to generate a name and make sure it is unique then include an monotonically increasing number.
source: ParallelAccelerator/src/parallel-ir.jl:1130
hasNoSideEffects(node::Union{GenSym, LambdaStaticData, Number, Symbol, SymbolNode}) ¶
Sometimes statements we exist in the AST of the form a=Expr where a is a Symbol that isn't live past the assignment and we'd like to eliminate the whole assignment statement but we have to know that the right-hand side has no side effects before we can do that. This function says whether the right-hand side passed into it has side effects or not. Several common function calls that otherwise we wouldn't know are safe are explicitly checked for.
source: ParallelAccelerator/src/parallel-ir.jl:2840
hasSymbol(ssn::Symbol) ¶
Returns true if the incoming AST node can be interpreted as a Symbol.
source: ParallelAccelerator/src/parallel-ir.jl:2511
hoistAllocation(ast::Array{Any, 1}, lives, domLoop::CompilerTools.Loops.DomLoops, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Try to hoist allocations outside the loop if possible.
source: ParallelAccelerator/src/parallel-ir.jl:4021
insert_no_deps_beginning(node, data::ParallelAccelerator.ParallelIR.RemoveNoDepsState, top_level_number, is_top_level, read) ¶
Works with remove_no_deps below to move statements with no dependencies to the beginning of the AST.
source: ParallelAccelerator/src/parallel-ir.jl:3355
intermediate_from_exprs(ast::Array{Any, 1}, depth, state) ¶
Process an array of expressions that aren't from a :body Expr.
source: ParallelAccelerator/src/parallel-ir.jl:2581
isArrayType(typ) ¶
Returns true if the incoming type in "typ" is an array type.
source: ParallelAccelerator/src/parallel-ir.jl:704
isArrayType(x::SymbolNode) ¶
Returns true if a given SymbolNode "x" is an Array type.
source: ParallelAccelerator/src/parallel-ir.jl:2609
isArrayref(x) ¶
Is a node an arrayref node?
source: ParallelAccelerator/src/parallel-ir.jl:1633
isArrayrefCall(x::Expr) ¶
Is a node a call to arrayref.
source: ParallelAccelerator/src/parallel-ir.jl:1654
isArrayset(x) ¶
Is a node an arrayset node?
source: ParallelAccelerator/src/parallel-ir.jl:1623
isArraysetCall(x::Expr) ¶
Is a node a call to arrayset.
source: ParallelAccelerator/src/parallel-ir.jl:1643
isAssignmentNode(node::Expr) ¶
Is a node an assignment expression node.
source: ParallelAccelerator/src/parallel-ir.jl:1264
isBareParfor(node::Expr) ¶
Is this a parfor node not part of an assignment statement.
source: ParallelAccelerator/src/parallel-ir.jl:1286
isDomainNode(ast::Expr) ¶
Returns true if the given "ast" node is a DomainIR operation.
source: ParallelAccelerator/src/parallel-ir.jl:4205
isFusionAssignment(x::Expr) ¶
Check if an assignement is a fusion assignment. In regular assignments, there are only two args, the left and right hand sides. In fusion assignments, we introduce a third arg that is marked by an object of FusionSentinel type.
source: ParallelAccelerator/src/parallel-ir.jl:1977
isLoopheadNode(node::Expr) ¶
Is a node a loophead expression node (a form of assignment).
source: ParallelAccelerator/src/parallel-ir.jl:1275
isParforAssignmentNode(node::Expr) ¶
Is a node an assignment expression with a parfor node as the right-hand side.
source: ParallelAccelerator/src/parallel-ir.jl:1310
isSymbolsUsed(vars, top_level_numbers::Array{Int64, 1}, state) ¶
Returns true if any variable in the collection "vars" is used in any statement whose top level number is in "top_level_numbers". We use expr_state "state" to get the block liveness information from which we use "def" and "use" to determine if a variable usage is present.
source: ParallelAccelerator/src/parallel-ir.jl:1993
is_eliminated_arraylen(x::Expr) ¶
Returns true if the input node is an assignment node where the right-hand side is a call to arraysize.
source: ParallelAccelerator/src/parallel-ir.jl:1866
isbitstuple(a::Tuple) ¶
Returns true if input "a" is a tuple and each element of the tuple of isbits type.
source: ParallelAccelerator/src/parallel-ir.jl:4823
iterations_equals_inputs(node::ParallelAccelerator.ParallelIR.PIRParForAst) ¶
Returns true if the domain operation mapped to this parfor has the property that the iteration space is identical to the dimenions of the inputs.
source: ParallelAccelerator/src/parallel-ir.jl:1363
lambdaFromDomainLambda(domain_lambda, dl_inputs) ¶
Form a Julia :lambda Expr from a DomainLambda.
source: ParallelAccelerator/src/parallel-ir.jl:4361
makePrivateParfor(var_name::Symbol, state) ¶
Takes an existing variable whose name is in "var_name" and adds the descriptor flag ISPRIVATEPARFORLOOP to declare the variable to be parfor loop private and eventually go in an OMP private clause.
source: ParallelAccelerator/src/parallel-ir.jl:781
makeTasks(start_index, stop_index, body, bb_live_info, state, task_graph_mode) ¶
For a given start and stop index in some body and liveness information, form a set of tasks.
source: ParallelAccelerator/src/parallel-ir-task.jl:759
maxFusion(bl::CompilerTools.LivenessAnalysis.BlockLiveness) ¶
For every basic block, try to push domain IR statements down and non-domain IR statements up so that domain nodes are next to each other and can be fused.
source: ParallelAccelerator/src/parallel-ir.jl:4249
mergeLambdaIntoOuterState(state, inner_lambda::Expr) ¶
Pull the information from the inner lambda into the outer lambda.
source: ParallelAccelerator/src/parallel-ir.jl:1495
merge_correlations(state, unchanging, eliminate) ¶
If we somehow determine that two sets of correlations are actually the same length then merge one into the other.
source: ParallelAccelerator/src/parallel-ir.jl:885
mk_alloc_array_1d_expr(elem_type, atype, length) ¶
Return an expression that allocates and initializes a 1D Julia array that has an element type specified by "elem_type", an array type of "atype" and a "length".
source: ParallelAccelerator/src/parallel-ir.jl:616
mk_alloc_array_2d_expr(elem_type, atype, length1, length2) ¶
Return an expression that allocates and initializes a 2D Julia array that has an element type specified by "elem_type", an array type of "atype" and two dimensions of length in "length1" and "length2".
source: ParallelAccelerator/src/parallel-ir.jl:654
mk_alloc_array_3d_expr(elem_type, atype, length1, length2, length3) ¶
Return an expression that allocates and initializes a 3D Julia array that has an element type specified by "elem_type", an array type of "atype" and two dimensions of length in "length1" and "length2" and "length3".
source: ParallelAccelerator/src/parallel-ir.jl:680
mk_arraylen_expr(x::ParallelAccelerator.ParallelIR.InputInfo, dim::Int64) ¶
Create an expression whose value is the length of the input array.
source: ParallelAccelerator/src/parallel-ir.jl:562
mk_arraylen_expr(x::Union{GenSym, Symbol, SymbolNode}, dim::Int64) ¶
Create an expression whose value is the length of the input array.
source: ParallelAccelerator/src/parallel-ir.jl:555
mk_arrayref1(num_dim_inputs, array_name, index_vars, inbounds, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Return an expression that corresponds to getting the index_var index from the array array_name. If "inbounds" is true then use the faster :unsafe_arrayref call that doesn't do a bounds check.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:89
mk_arrayref1(num_dim_inputs, array_name, index_vars, inbounds, state::ParallelAccelerator.ParallelIR.expr_state, range::Array{Union{ParallelAccelerator.ParallelIR.MaskSelector, ParallelAccelerator.ParallelIR.RangeData, ParallelAccelerator.ParallelIR.SingularSelector}, 1}) ¶
Return an expression that corresponds to getting the index_var index from the array array_name. If "inbounds" is true then use the faster :unsafe_arrayref call that doesn't do a bounds check.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:89
mk_arrayset1(num_dim_inputs, array_name, index_vars, value, inbounds, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Return a new AST node that corresponds to setting the index_var index from the array "array_name" with "value". The paramater "inbounds" is true if this access is known to be within the bounds of the array.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:194
mk_arrayset1(num_dim_inputs, array_name, index_vars, value, inbounds, state::ParallelAccelerator.ParallelIR.expr_state, range::Array{Union{ParallelAccelerator.ParallelIR.MaskSelector, ParallelAccelerator.ParallelIR.RangeData, ParallelAccelerator.ParallelIR.SingularSelector}, 1}) ¶
Return a new AST node that corresponds to setting the index_var index from the array "array_name" with "value". The paramater "inbounds" is true if this access is known to be within the bounds of the array.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:194
mk_assignment_expr(lhs::Union{GenSym, Symbol, SymbolNode}, rhs, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Create an assignment expression AST node given a left and right-hand side. The left-hand side has to be a symbol node from which we extract the type so as to type the new Expr.
source: ParallelAccelerator/src/parallel-ir.jl:515
mk_colon_expr(start_expr, skip_expr, end_expr) ¶
Returns an expression to construct a :colon object that contains the start of a range, the end and the skip expression.
source: ParallelAccelerator/src/parallel-ir-task.jl:878
mk_convert(new_type, ex) ¶
Returns an expression that convert "ex" into a another type "new_type".
source: ParallelAccelerator/src/parallel-ir.jl:593
mk_gotoifnot_expr(cond, goto_label) ¶
Returns a :gotoifnot Expr given a condition "cond" and a label "goto_label".
source: ParallelAccelerator/src/parallel-ir-task.jl:899
mk_mask_arrayref1(cur_dimension, num_dim_inputs, array_name, index_vars, inbounds, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Return an expression that corresponds to getting the index_var index from the array array_name. If "inbounds" is true then use the faster :unsafe_arrayref call that doesn't do a bounds check.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:156
mk_mask_arrayref1(cur_dimension, num_dim_inputs, array_name, index_vars, inbounds, state::ParallelAccelerator.ParallelIR.expr_state, range::Array{Union{ParallelAccelerator.ParallelIR.MaskSelector, ParallelAccelerator.ParallelIR.RangeData, ParallelAccelerator.ParallelIR.SingularSelector}, 1}) ¶
Return an expression that corresponds to getting the index_var index from the array array_name. If "inbounds" is true then use the faster :unsafe_arrayref call that doesn't do a bounds check.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:156
mk_next_expr(colon_sym, start_sym) ¶
Returns a :next call Expr that gets the next element of an iteration range from a :colon object.
source: ParallelAccelerator/src/parallel-ir-task.jl:892
mk_parallelir_ref(sym) ¶
Create an expression that references something inside ParallelIR. In other words, returns an expression the equivalent of ParallelAccelerator.ParallelIR.sym where sym is an input argument to this function.
source: ParallelAccelerator/src/parallel-ir.jl:585
mk_parallelir_ref(sym, ref_type) ¶
Create an expression that references something inside ParallelIR. In other words, returns an expression the equivalent of ParallelAccelerator.ParallelIR.sym where sym is an input argument to this function.
source: ParallelAccelerator/src/parallel-ir.jl:585
mk_parfor_args_from_mmap!(input_arrays::Array{T, N}, dl::ParallelAccelerator.DomainIR.DomainLambda, with_indices, domain_oprs, state) ¶
The main routine that converts a mmap! AST node to a parfor AST node.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:690
mk_parfor_args_from_mmap(input_arrays::Array{T, N}, dl::ParallelAccelerator.DomainIR.DomainLambda, domain_oprs, state) ¶
The main routine that converts a mmap AST node to a parfor AST node.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:1005
mk_parfor_args_from_reduce(input_args::Array{Any, 1}, state) ¶
The main routine that converts a reduce AST node to a parfor AST node.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:234
mk_return_expr(outs) ¶
Given an array of outputs in "outs", form a return expression. If there is only one out then the args of :return is just that expression. If there are multiple outs then form a tuple of them and that tuple goes in :return args.
source: ParallelAccelerator/src/parallel-ir.jl:500
mk_start_expr(colon_sym) ¶
Returns an expression to get the start of an iteration range from a :colon object.
source: ParallelAccelerator/src/parallel-ir-task.jl:885
mk_svec_expr(parts...) ¶
Make a svec expression.
source: ParallelAccelerator/src/parallel-ir.jl:607
mk_tuple_expr(tuple_fields, typ) ¶
Return an expression which creates a tuple.
source: ParallelAccelerator/src/parallel-ir.jl:1428
mk_tupleref_expr(tuple_var, index, typ) ¶
Create an expression which returns the index'th element of the tuple whose name is contained in tuple_var.
source: ParallelAccelerator/src/parallel-ir.jl:600
mk_untyped_assignment(lhs, rhs) ¶
Only used to create fake expression to force lhs to be seen as written rather than read.
source: ParallelAccelerator/src/parallel-ir.jl:532
mmapInline(ast::Expr, lives, uniqSet) ¶
If a definition of a mmap is only used once and not aliased, it can be inlined into its
use side as long as its dependencies have not been changed.
FIXME: is the implementation still correct when branches are present?
source: ParallelAccelerator/src/parallel-ir.jl:3944
mmapToMmap!(ast, lives, uniqSet) ¶
Performs the mmap to mmap! phase. If the arguments of a mmap dies aftewards, and is not aliased, then we can safely change the mmap to mmap!.
source: ParallelAccelerator/src/parallel-ir.jl:4087
mustRemainLastStatementInBlock(node::GotoNode) ¶
Returns true if the given AST "node" must remain the last statement in a basic block. This is true if the node is a GotoNode or a :gotoifnot Expr.
source: ParallelAccelerator/src/parallel-ir.jl:4233
nameToSymbolNode(name::Symbol, sym_to_type) ¶
Forms a SymbolNode given a symbol in "name" and get the type of that symbol from the incoming dictionary "sym_to_type".
source: ParallelAccelerator/src/parallel-ir.jl:1436
nested_function_exprs(max_label, domain_lambda, dl_inputs) ¶
A routine similar to the main parallel IR entry put but designed to process the lambda part of domain IR AST nodes.
source: ParallelAccelerator/src/parallel-ir.jl:4390
next_label(state::ParallelAccelerator.ParallelIR.expr_state) ¶
Returns the next usable label for the current function.
source: ParallelAccelerator/src/parallel-ir.jl:858
nonExactRangeSearch(ranges::Array{Union{ParallelAccelerator.ParallelIR.MaskSelector, ParallelAccelerator.ParallelIR.RangeData, ParallelAccelerator.ParallelIR.SingularSelector}, 1}, range_correlations) ¶
We can only do exact matches in the range correlation dict but there can still be non-exact matches where the ranges are different but equivalent in length. In this function, we can the dictionary and look for equivalent ranges.
source: ParallelAccelerator/src/parallel-ir.jl:1045
oneIfOnly(x) ¶
Returns a single element of an array if there is only one or the array otherwise.
source: ParallelAccelerator/src/parallel-ir.jl:2147
parforToTask(parfor_index, bb_statements, body, state) ¶
Given a parfor statement index in "parfor_index" in the "body"'s statements, create a TaskInfo node for this parfor.
source: ParallelAccelerator/src/parallel-ir-task.jl:1210
pirPrintDl(dbg_level, dl) ¶
Debug print the parts of a DomainLambda.
source: ParallelAccelerator/src/parallel-ir.jl:4340
pir_alias_cb(ast::Expr, state, cbdata) ¶
An AliasAnalysis callback (similar to LivenessAnalysis callback) that handles ParallelIR introduced AST node types. For each ParallelIR specific node type, form an array of expressions that AliasAnalysis can analyze to reflect the aliases of the given AST node. If we read a symbol it is sufficient to just return that symbol as one of the expressions. If we write a symbol, then form a fake mk_assignment_expr just to get liveness to realize the symbol is written.
source: ParallelAccelerator/src/parallel-ir.jl:5237
pir_live_cb(ast::Expr, cbdata::ANY) ¶
A LivenessAnalysis callback that handles ParallelIR introduced AST node types. For each ParallelIR specific node type, form an array of expressions that liveness can analysis to reflect the read/write set of the given AST node. If we read a symbol it is sufficient to just return that symbol as one of the expressions. If we write a symbol, then form a fake mk_assignment_expr just to get liveness to realize the symbol is written.
source: ParallelAccelerator/src/parallel-ir.jl:2705
pir_live_cb_def(x) ¶
Just call the AST walker for symbol for parallel IR nodes with no state.
source: ParallelAccelerator/src/parallel-ir.jl:1216
printBody(dlvl, body::Array{Any, 1}) ¶
Pretty print the args part of the "body" of a :lambda Expr at a given debug level in "dlvl".
source: ParallelAccelerator/src/parallel-ir.jl:2620
printLambda(dlvl, node::Expr) ¶
Pretty print a :lambda Expr in "node" at a given debug level in "dlvl".
source: ParallelAccelerator/src/parallel-ir.jl:2633
processAndUpdateBody(lambda::Expr, f::Function, state) ¶
Apply a function "f" that takes the :body from the :lambda and returns a new :body that is stored back into the :lambda.
source: ParallelAccelerator/src/parallel-ir.jl:3596
rangeSize(start, skip, last) ¶
Compute size of a range.
source: ParallelAccelerator/src/parallel-ir.jl:547
rangeToRangeData(range::Expr, arr, range_num::Int64, state) ¶
Convert a :range Expr introduced by Domain IR into a Parallel IR data structure RangeData.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:495
recreateLoops(new_body, the_parfor::ParallelAccelerator.ParallelIR.PIRParForAst, state, newLambdaInfo) ¶
In threads mode, we can't have parfor_start and parfor_end in the code since Julia has to compile the code itself and so we have to reconstruct a loop infrastructure based on the parfor's loop nest information. This function takes a parfor and outputs that parfor to the new function body as regular Julia loops.
source: ParallelAccelerator/src/parallel-ir-task.jl:1155
recreateLoopsInternal(new_body, the_parfor::ParallelAccelerator.ParallelIR.PIRParForAst, loop_nest_level, next_available_label, state, newLambdaInfo) ¶
This is a recursive routine to reconstruct a regular Julia loop nest from the loop nests described in PIRParForAst. One call of this routine handles one level of the loop nest. If the incoming loop nest level is more than the number of loops nests in the parfor then that is the spot to insert the body of the parfor into the new function body in "new_body".
source: ParallelAccelerator/src/parallel-ir-task.jl:1019
rememberTypeForSym(sym_to_type::Dict{Union{GenSym, Symbol}, DataType}, sym::Union{GenSym, Symbol}, typ::DataType) ¶
Add to the map of symbol names to types.
source: ParallelAccelerator/src/parallel-ir.jl:1956
removeAssertEqShape(args::Array{Any, 1}, state) ¶
Implements one of the main ParallelIR passes to remove assertEqShape AST nodes from the body if they are statically known to be in the same equivalence class.
source: ParallelAccelerator/src/parallel-ir.jl:2885
removeNothingStmts(args::Array{Any, 1}, state) ¶
Empty statements can be added to the AST by some passes in ParallelIR. This pass over the statements of the :body excludes such "nothing" statements from the new :body.
source: ParallelAccelerator/src/parallel-ir.jl:3607
remove_dead(node, data::ParallelAccelerator.ParallelIR.RemoveDeadState, top_level_number, is_top_level, read) ¶
An AstWalk callback that uses liveness information in "data" to remove dead stores.
source: ParallelAccelerator/src/parallel-ir.jl:3287
remove_extra_allocs(ast) ¶
removes extra allocations
source: ParallelAccelerator/src/parallel-ir.jl:4693
remove_no_deps(node::ANY, data::ParallelAccelerator.ParallelIR.RemoveNoDepsState, top_level_number, is_top_level, read) ¶
This routine gathers up nodes that do not use
any variable and removes them from the AST into top_level_no_deps. This works in conjunction with
insert_no_deps_beginning above to move these statements with no dependencies to the beginning of the AST
where they can't prevent fusion.
source: ParallelAccelerator/src/parallel-ir.jl:3371
replaceParforWithDict(parfor::ParallelAccelerator.ParallelIR.PIRParForAst, gensym_map) ¶
Not currently used but might need it at some point. Search a whole PIRParForAst object and replace one SymAllGen with another.
source: ParallelAccelerator/src/parallel-ir.jl:378
run_as_task() ¶
Return true if run_as_task_decrement would return true but don't update the run_as_tasks count.
source: ParallelAccelerator/src/parallel-ir-task.jl:229
run_as_task_decrement() ¶
If run_as_tasks is positive then convert this parfor to a task and decrement the count so that only the original number run_as_tasks if the number of tasks created.
source: ParallelAccelerator/src/parallel-ir-task.jl:215
selectToRangeData(select::Expr, pre_offsets::Array{Expr, 1}, state) ¶
Convert the range(s) part of a :select Expr introduced by Domain IR into an array of Parallel IR data structures RangeData.
source: ParallelAccelerator/src/parallel-ir-mk-parfor.jl:531
seqTask(body_indices, bb_statements, body, state) ¶
Form a task out of a range of sequential statements. This is not currently implemented.
source: ParallelAccelerator/src/parallel-ir-task.jl:1558
show(io::IO, pnode::ParallelAccelerator.ParallelIR.PIRParForAst) ¶
Overload of Base.show to pretty print for parfor AST nodes.
source: ParallelAccelerator/src/parallel-ir.jl:435
simpleIndex(dict) ¶
Returns true if all array references use singular index variables and nothing more complicated involving, for example, addition or subtraction by a constant.
source: ParallelAccelerator/src/parallel-ir.jl:790
simplify_internal(x::Expr, state, top_level_number::Int64, is_top_level::Bool, read::Bool) ¶
Do some simplification to expressions that are part of ranges. For example, the range 2:s-1 becomes a length (s-1)-2 which this function in turn transforms to s-3.
source: ParallelAccelerator/src/parallel-ir.jl:946
sub_arraylen_walk(x::Expr, replacement, top_level_number, is_top_level, read) ¶
AstWalk callback that does the work of substitute_arraylen on a node-by-node basis. replacement is an array containing the length of the dimensions of the arrays a part of this parfor. If we see a call to create an array, replace the length params with those in the common set in "replacement".
source: ParallelAccelerator/src/parallel-ir.jl:1897
sub_arrayset_walk(x::Expr, cbd, top_level_number, is_top_level, read) ¶
AstWalk callback that does the work of substitute_arrayset on a node-by-node basis.
source: ParallelAccelerator/src/parallel-ir.jl:1665
sub_cur_body_walk(x::Expr, cbd::ParallelAccelerator.ParallelIR.cur_body_data, top_level_number::Int64, is_top_level::Bool, read::Bool) ¶
AstWalk callback that does the work of substitute_cur_body on a node-by-node basis.
source: ParallelAccelerator/src/parallel-ir.jl:1748
substitute_arraylen(x, replacement) ¶
replacement is an array containing the length of the dimensions of the arrays a part of this parfor. If we see a call to create an array, replace the length params with those in the common set in "replacement".
source: ParallelAccelerator/src/parallel-ir.jl:1929
substitute_arrayset(x, arrays_set_in_cur_body, output_items_with_aliases) ¶
Modify the body of a parfor. temp_map holds a map of array names whose arraysets should be turned into a mapped variable instead of the arrayset. a[i] = b. a=>c. becomes c = b map_for_non_eliminated holds arrays for which we need to add a variable to save the value but we can't eiminate the arrayset. a[i] = b. a=>c. becomes c = a[i] = b map_drop_arrayset drops the arrayset without replacing with a variable. This is because a variable was previously added here with a map_for_non_eliminated case. a[i] = b. becomes b
source: ParallelAccelerator/src/parallel-ir.jl:1710
substitute_cur_body(x, temp_map::Dict{Union{GenSym, Symbol}, Union{GenSym, SymbolNode}}, index_map::Dict{Union{GenSym, Symbol}, Union{GenSym, Symbol}}, arrays_set_in_cur_body::Set{Union{GenSym, Symbol}}, replace_array_name_in_arrayset::Dict{Union{GenSym, Symbol}, Union{GenSym, Symbol}}, state::ParallelAccelerator.ParallelIR.expr_state) ¶
Make changes to the second parfor body in the process of parfor fusion. temp_map holds array names for which arrayrefs should be converted to a variable. a[i]. a=>b. becomes b index_map holds maps between index variables. The second parfor is modified to use the index variable of the first parfor. arrays_set_in_cur_body # Used as output. Collects the arrays set in the current body. replace_array_name_in_arrayset # Map from one array to another. Replace first array with second when used in arrayset context.
source: ParallelAccelerator/src/parallel-ir.jl:1852
taskableParfor(node) ¶
Returns true if the "node" is a parfor and the task limit hasn't been exceeded. Also controls whether stencils or reduction can become tasks.
source: ParallelAccelerator/src/parallel-ir-task.jl:278
toSNGen(x::Symbol, typ) ¶
If we have the type, convert a Symbol to SymbolNode. If we have a GenSym then we have to keep it.
source: ParallelAccelerator/src/parallel-ir.jl:3087
toSymGen(x::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: ParallelAccelerator/src/parallel-ir.jl:819
toSymNodeGen(x::Symbol, typ) ¶
Form a SymbolNode with the given typ if possible or a GenSym if that is what is passed in.
source: ParallelAccelerator/src/parallel-ir.jl:838
uncompressed_ast(l::LambdaStaticData) ¶
Convert a compressed LambdaStaticData format into the uncompressed AST format.
source: ParallelAccelerator/src/parallel-ir.jl:1191
ParallelAccelerator.ParallelIR.CopyPropagateState ¶
State to aide in the copy propagation phase.
source: ParallelAccelerator/src/parallel-ir.jl:3130
ParallelAccelerator.ParallelIR.DelayedFunc ¶
Ad-hoc support to mimic closures when we want the arguments to be processed during AstWalk.
source: ParallelAccelerator/src/parallel-ir.jl:67
ParallelAccelerator.ParallelIR.DirWalk ¶
Wraps the callback and opaque data passed from the user of ParallelIR's AstWalk.
source: ParallelAccelerator/src/parallel-ir.jl:5037
ParallelAccelerator.ParallelIR.DomainOperation ¶
Holds information about domain operations part of a parfor node.
source: ParallelAccelerator/src/parallel-ir.jl:108
ParallelAccelerator.ParallelIR.EquivalenceClasses ¶
Holds a dictionary from an array symbol to an integer corresponding to an equivalence class. All array symbol in the same equivalence class are known to have the same shape.
source: ParallelAccelerator/src/parallel-ir.jl:118
ParallelAccelerator.ParallelIR.FusionSentinel ¶
Just used to hold a spot in an array to indicate the this is a special assignment expression with embedded real array output names from a fusion.
source: ParallelAccelerator/src/parallel-ir.jl:1967
ParallelAccelerator.ParallelIR.InProgress ¶
A sentinel in the instruction count estimation process. Before recursively processing a call, we add a sentinel for that function so that if we see that sentinel later we know we've tried to recursively process it and so can bail out by setting fully_analyzed to false.
source: ParallelAccelerator/src/parallel-ir-task.jl:346
ParallelAccelerator.ParallelIR.InputInfo ¶
Type used by mk_parfor_args... functions to hold information about input arrays.
source: ParallelAccelerator/src/parallel-ir.jl:298
ParallelAccelerator.ParallelIR.InsertTaskNode ¶
A data type containing the information that CGen uses to generate a call to pert_insert_divisible_task.
source: ParallelAccelerator/src/parallel-ir-task.jl:197
ParallelAccelerator.ParallelIR.PIRParForStartEnd ¶
After lowering, it is necessary to make the parfor body top-level statements so that basic blocks can be correctly identified and labels correctly found. There is a phase in parallel IR where we take a PIRParForAst node and split it into a parfor_start node followed by the body as top-level statements followed by parfor_end (also a top-level statement).
source: ParallelAccelerator/src/parallel-ir.jl:400
ParallelAccelerator.ParallelIR.RangeData ¶
Holds the information from one Domain IR :range Expr.
source: ParallelAccelerator/src/parallel-ir.jl:182
ParallelAccelerator.ParallelIR.RemoveDeadState ¶
Holds liveness information for the remove_dead AstWalk phase.
source: ParallelAccelerator/src/parallel-ir.jl:3280
ParallelAccelerator.ParallelIR.RemoveNoDepsState ¶
State for the remove_no_deps and insert_no_deps_beginning phases.
source: ParallelAccelerator/src/parallel-ir.jl:3340
ParallelAccelerator.ParallelIR.ReplacedRegion ¶
Store information about a section of a body that will be translated into a task.
source: ParallelAccelerator/src/parallel-ir-task.jl:21
ParallelAccelerator.ParallelIR.RhsDead ¶
Marks an assignment statement where the left-hand side can take over the storage from the right-hand side.
source: ParallelAccelerator/src/parallel-ir-task.jl:577
ParallelAccelerator.ParallelIR.StatementWithDeps ¶
Type for dependence graph creation and topological sorting.
source: ParallelAccelerator/src/parallel-ir.jl:4171
ParallelAccelerator.ParallelIR.TaskInfo ¶
Structure for storing information about task formation.
source: ParallelAccelerator/src/parallel-ir-task.jl:36
ParallelAccelerator.ParallelIR.cur_body_data ¶
Holds the data for substitute_cur_body AST walk.
source: ParallelAccelerator/src/parallel-ir.jl:1737
ParallelAccelerator.ParallelIR.cuw_state ¶
Just to hold the "found" Bool that says whether a unsafe variant was replaced with a regular version.
source: ParallelAccelerator/src/parallel-ir-task.jl:906
ParallelAccelerator.ParallelIR.expr_state ¶
State passed around while converting an AST from domain to parallel IR.
source: ParallelAccelerator/src/parallel-ir.jl:407
ParallelAccelerator.ParallelIR.pir_arg_metadata ¶
A Julia representation of the argument metadata that will be passed to the runtime.
source: ParallelAccelerator/src/parallel-ir-task.jl:157
ParallelAccelerator.ParallelIR.pir_array_access_desc ¶
Describes an array. row_major is true if the array is stored in row major format. dim_info describes which portion of the array is accessed for a given point in the iteration space.
source: ParallelAccelerator/src/parallel-ir-task.jl:111
ParallelAccelerator.ParallelIR.pir_grain_size ¶
A Julia representation of the grain size that will be passed to the runtime.
source: ParallelAccelerator/src/parallel-ir-task.jl:178
ParallelAccelerator.ParallelIR.pir_range ¶
Translated to pert_range_Nd_t in the task runtime. This represents an iteration space. dim is the number of dimensions in the iteration space. lower_bounds contains the lower bound of the iteration space in each dimension. upper_bounds contains the upper bound of the iteration space in each dimension. lower_bounds and upper_bounds can be expressions.
source: ParallelAccelerator/src/parallel-ir-task.jl:56
ParallelAccelerator.ParallelIR.pir_range_actual ¶
Similar to pir_range but used in circumstances where the expressions must have already been evaluated. Therefore the arrays are typed as Int64. Up to 3 dimensional iteration space constructors are supported to make it easier to do code generation later.
source: ParallelAccelerator/src/parallel-ir-task.jl:70
ParallelAccelerator.ParallelIR.sub_arrayset_data ¶
Holds data for modifying arrayset calls.