summaryrefslogtreecommitdiff
path: root/src/ir/stack-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/stack-utils.h')
-rw-r--r--src/ir/stack-utils.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ir/stack-utils.h b/src/ir/stack-utils.h
index 0c05381db..aad13f7f0 100644
--- a/src/ir/stack-utils.h
+++ b/src/ir/stack-utils.h
@@ -166,6 +166,13 @@ struct StackSignature {
// other stack signature. This corresponds to the `unreachable` instruction
// being able to be given any stack signature.
static bool isSubType(StackSignature a, StackSignature b);
+
+ // Returns true iff `a` and `b` have a LUB, i.e. a minimal StackSignature that
+ // could type block contents of either type `a` or type `b`.
+ static bool haveLeastUpperBound(StackSignature a, StackSignature b);
+
+ // Returns the LUB of `a` and `b`. Assumes that the LUB exists.
+ static StackSignature getLeastUpperBound(StackSignature a, StackSignature b);
};
// Calculates stack machine data flow, associating the sources and destinations