Skip to content

Commit

Permalink
add code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
aparajit-pratap committed Dec 8, 2023
1 parent d688294 commit ba8f011
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Engine/ProtoAssociative/CodeGen_SSA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,10 @@ private List<AssociativeNode> BuildSSA(List<AssociativeNode> astList, ProtoCore.
BinaryExpressionNode bnode = (node as BinaryExpressionNode);
int generatedUID = ProtoCore.DSASM.Constants.kInvalidIndex;

// Skip SSA for input ASTs that are first assigned null such as this:
// a = null; (update "a") => a = <some primitive>;
// SSA would break up the null AST into two assignments, which then breaks update:
// a = null; (SSA) => temp = null; a = temp;
if (context.applySSATransform && core.Options.GenerateSSA && !bnode.IsInputExpression)
{
int ssaID = ProtoCore.DSASM.Constants.kInvalidIndex;
Expand Down

0 comments on commit ba8f011

Please sign in to comment.