summaryrefslogtreecommitdiff
path: root/src/lj_opt_mem.c
diff options
context:
space:
mode:
authorMike Pall <mike>2011-02-07 21:59:25 +0100
committerMike Pall <mike>2011-02-07 21:59:25 +0100
commit97d0874ff5dc878758f79ceef5509cc632779c53 (patch)
treed7527912e89c4af827302b0a9ca2f0634d8ead15 /src/lj_opt_mem.c
parent0a50356b6f7d256af36fbf564b73c5721681cb56 (diff)
downloadluajit-97d0874ff5dc878758f79ceef5509cc632779c53.tar.gz
luajit-97d0874ff5dc878758f79ceef5509cc632779c53.tar.bz2
luajit-97d0874ff5dc878758f79ceef5509cc632779c53.zip
Add IR_XBAR, a barrier against XLOAD/XSTORE optimizations.
Diffstat (limited to '')
-rw-r--r--src/lj_opt_mem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lj_opt_mem.c b/src/lj_opt_mem.c
index 211c329a..6062be70 100644
--- a/src/lj_opt_mem.c
+++ b/src/lj_opt_mem.c
@@ -676,6 +676,7 @@ TRef LJ_FASTCALL lj_opt_fwd_xload(jit_State *J)
676 ref = J->chain[IR_XSTORE]; 676 ref = J->chain[IR_XSTORE];
677retry: 677retry:
678 if (J->chain[IR_CALLXS] > lim) lim = J->chain[IR_CALLXS]; 678 if (J->chain[IR_CALLXS] > lim) lim = J->chain[IR_CALLXS];
679 if (J->chain[IR_XBAR] > lim) lim = J->chain[IR_XBAR];
679 while (ref > lim) { 680 while (ref > lim) {
680 IRIns *store = IR(ref); 681 IRIns *store = IR(ref);
681 switch (aa_xref(J, xr, fins, store)) { 682 switch (aa_xref(J, xr, fins, store)) {
@@ -738,6 +739,7 @@ TRef LJ_FASTCALL lj_opt_dse_xstore(jit_State *J)
738 IRRef1 *refp = &J->chain[IR_XSTORE]; 739 IRRef1 *refp = &J->chain[IR_XSTORE];
739 IRRef ref = *refp; 740 IRRef ref = *refp;
740 if (J->chain[IR_CALLXS] > lim) lim = J->chain[IR_CALLXS]; 741 if (J->chain[IR_CALLXS] > lim) lim = J->chain[IR_CALLXS];
742 if (J->chain[IR_XBAR] > lim) lim = J->chain[IR_XBAR];
741 while (ref > lim) { /* Search for redundant or conflicting stores. */ 743 while (ref > lim) { /* Search for redundant or conflicting stores. */
742 IRIns *store = IR(ref); 744 IRIns *store = IR(ref);
743 switch (aa_xref(J, xr, fins, store)) { 745 switch (aa_xref(J, xr, fins, store)) {