Commit e090be97 authored by Vitja Makarov's avatar Vitja Makarov

Rename MarkAssignments to MarkParallelAssignments

parent cf89a114
...@@ -129,7 +129,7 @@ def create_pipeline(context, mode, exclude_classes=()): ...@@ -129,7 +129,7 @@ def create_pipeline(context, mode, exclude_classes=()):
from ParseTreeTransforms import CreateClosureClasses, MarkClosureVisitor, DecoratorTransform from ParseTreeTransforms import CreateClosureClasses, MarkClosureVisitor, DecoratorTransform
from ParseTreeTransforms import InterpretCompilerDirectives, TransformBuiltinMethods from ParseTreeTransforms import InterpretCompilerDirectives, TransformBuiltinMethods
from ParseTreeTransforms import ExpandInplaceOperators, ParallelRangeTransform from ParseTreeTransforms import ExpandInplaceOperators, ParallelRangeTransform
from TypeInference import MarkAssignments, MarkOverflowingArithmetic from TypeInference import MarkParallelAssignments, MarkOverflowingArithmetic
from ParseTreeTransforms import AdjustDefByDirectives, AlignFunctionDefinitions from ParseTreeTransforms import AdjustDefByDirectives, AlignFunctionDefinitions
from ParseTreeTransforms import RemoveUnreachableCode, GilCheck from ParseTreeTransforms import RemoveUnreachableCode, GilCheck
from FlowControl import ControlFlowAnalysis from FlowControl import ControlFlowAnalysis
...@@ -179,10 +179,10 @@ def create_pipeline(context, mode, exclude_classes=()): ...@@ -179,10 +179,10 @@ def create_pipeline(context, mode, exclude_classes=()):
EmbedSignature(context), EmbedSignature(context),
EarlyReplaceBuiltinCalls(context), ## Necessary? EarlyReplaceBuiltinCalls(context), ## Necessary?
TransformBuiltinMethods(context), ## Necessary? TransformBuiltinMethods(context), ## Necessary?
MarkAssignments(context), MarkParallelAssignments(context),
ControlFlowAnalysis(context), ControlFlowAnalysis(context),
RemoveUnreachableCode(context), RemoveUnreachableCode(context),
# MarkAssignments(context), # MarkParallelAssignments(context),
MarkOverflowingArithmetic(context), MarkOverflowingArithmetic(context),
IntroduceBufferAuxiliaryVars(context), IntroduceBufferAuxiliaryVars(context),
_check_c_declarations, _check_c_declarations,
......
...@@ -15,7 +15,11 @@ class TypedExprNode(ExprNodes.ExprNode): ...@@ -15,7 +15,11 @@ class TypedExprNode(ExprNodes.ExprNode):
object_expr = TypedExprNode(py_object_type) object_expr = TypedExprNode(py_object_type)
class MarkAssignments(EnvTransform):
class MarkParallelAssignments(EnvTransform):
# Collects assignments inside parallel blocks prange, with parallel.
# Perhaps it's better to move it to ControlFlowAnalysis.
# tells us whether we're in a normal loop # tells us whether we're in a normal loop
in_loop = False in_loop = False
...@@ -24,7 +28,7 @@ class MarkAssignments(EnvTransform): ...@@ -24,7 +28,7 @@ class MarkAssignments(EnvTransform):
def __init__(self, context): def __init__(self, context):
# Track the parallel block scopes (with parallel, for i in prange()) # Track the parallel block scopes (with parallel, for i in prange())
self.parallel_block_stack = [] self.parallel_block_stack = []
return super(MarkAssignments, self).__init__(context) return super(MarkParallelAssignments, self).__init__(context)
def mark_assignment(self, lhs, rhs, inplace_op=None): def mark_assignment(self, lhs, rhs, inplace_op=None):
if isinstance(lhs, (ExprNodes.NameNode, Nodes.PyArgDeclNode)): if isinstance(lhs, (ExprNodes.NameNode, Nodes.PyArgDeclNode)):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment