aboutsummaryrefslogtreecommitdiff
path: root/include/ssa
diff options
context:
space:
mode:
Diffstat (limited to 'include/ssa')
-rw-r--r--include/ssa/ssa.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/ssa/ssa.h b/include/ssa/ssa.h
index a21b45a..5411259 100644
--- a/include/ssa/ssa.h
+++ b/include/ssa/ssa.h
@@ -27,7 +27,10 @@ typedef enum {
} SsaNumberType;
typedef struct {
- i64 value;
+ union {
+ i64 integer;
+ f64 floating;
+ } value;
SsaNumberType type;
} SsaNumber;
@@ -44,7 +47,8 @@ typedef struct {
} Ssa;
/* None of these functions are thread-safe */
-SsaNumber create_ssa_number(i64 value, SsaNumberType type);
+SsaNumber create_ssa_integer(i64 value);
+SsaNumber create_ssa_float(f64 value);
CHECK_RESULT int ssa_init(Ssa *self, ScopedAllocator *allocator);
CHECK_RESULT int ssa_get_unique_reg(Ssa *self, SsaRegister *result);