summaryrefslogtreecommitdiff
path: root/6/asm.h
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-06-18 10:52:29 -0400
committerOri Bernstein <ori@eigenstate.org>2014-06-18 10:52:29 -0400
commitd602a0b9372004e85db60153d4579938c1022f06 (patch)
tree72171d447806034f561f2c288cb311ff9d2dae41 /6/asm.h
parent05d7bc89b7b144997e91c764c9aa0bbdddc0dcac (diff)
downloadmc-d602a0b9372004e85db60153d4579938c1022f06.tar.gz
Optimize nodemoves()
Maintain sets for the instruction, so that we don't have to do lots of O(n) lookups. Those are slow.
Diffstat (limited to '6/asm.h')
-rw-r--r--6/asm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/6/asm.h b/6/asm.h
index e631ede..4c1d8a7 100644
--- a/6/asm.h
+++ b/6/asm.h
@@ -84,6 +84,7 @@ struct Loc {
};
struct Insn {
+ size_t uid;
AsmOp op;
Loc *args[Maxarg];
size_t nargs;
@@ -156,11 +157,13 @@ struct Isel {
Insn **mfrozen;
size_t nmfrozen;
+ Bitset *mactiveset;
Insn **mactive;
size_t nmactive;
/* worklists */
+ Bitset *wlmoveset;
Insn **wlmove;
size_t nwlmove;