-
-
Save timo/a8cc59072de640a643c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/3rdparty/dyncall b/3rdparty/dyncall | |
--- a/3rdparty/dyncall | |
+++ b/3rdparty/dyncall | |
@@ -1 +1 @@ | |
-Subproject commit 5c4e85c290756b84eb55c9ed97f550555bcdc29d | |
+Subproject commit 5c4e85c290756b84eb55c9ed97f550555bcdc29d-dirty | |
diff --git a/src/spesh/facts.c b/src/spesh/facts.c | |
index a5c4f2f..14f85b8 100644 | |
--- a/src/spesh/facts.c | |
+++ b/src/spesh/facts.c | |
@@ -133,6 +133,9 @@ static void add_bb_facts(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpeshBB *bb) | |
(ins->info->operands[i] & MVM_operand_rw_mask) == MVM_operand_read_reg) | |
g->facts[ins->operands[i].reg.orig][ins->operands[i].reg.i].usages++; | |
+ if (ins->info->num_operands >= 1 && (ins->info->operands[0] & MWM_operand_rw_mask) == MVM_operand_write_reg) | |
+ g->facts[ins->operands[0].reg.orig][ins->operands[0].reg.i].origin = ins; | |
+ | |
/* Look for ops that are fact-interesting. */ | |
switch (ins->info->opcode) { | |
case MVM_OP_inc_i: | |
diff --git a/src/spesh/facts.h b/src/spesh/facts.h | |
index 9bea593..ce8cd75 100644 | |
--- a/src/spesh/facts.h | |
+++ b/src/spesh/facts.h | |
@@ -12,6 +12,9 @@ struct MVMSpeshFacts { | |
/* Known type post-decontainerization, if any. */ | |
MVMObject *decont_type; | |
+ /* The instruction that's the origin of this register + version */ | |
+ MVMSpeshIns *origin; | |
+ | |
/* Known value, if any. */ | |
union { | |
MVMObject *o; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment