Skip to content

Commit

Permalink
Eliminate COPY of CONST
Browse files Browse the repository at this point in the history
COPY is opaque for tiling, so the COPY of CONST values disables tiles
that operate on a const directly. This allows us to use the CONST
value directly which should help us pick better tiles.
  • Loading branch information
bdw committed Jan 13, 2019
1 parent a59b6f9 commit 9f869a1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/jit/optimize.c
Expand Up @@ -136,6 +136,15 @@ static void optimize_postorder(MVMThreadContext *tc, MVMJitTreeTraverser *traver
}
break;
}
case MVM_JIT_COPY:
{
MVMint32 child = MVM_JIT_EXPR_LINKS(tree, node)[0];
if (tree->nodes[child] == MVM_JIT_CONST) {
_DEBUG("Elinimating COPY of CONST (%d)", tree->nodes[child+1]);
replacement = child;
}
break;
}
}

if (replacement > 0) {
Expand Down

0 comments on commit 9f869a1

Please sign in to comment.