From 3272b5d83d2e2167eed24748557df88bd66584ee Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Fri, 5 Jan 2018 23:42:24 +0100 Subject: There's actually a chance that, correctly stringified, this will work --- regalloc.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 regalloc.h (limited to 'regalloc.h') diff --git a/regalloc.h b/regalloc.h new file mode 100644 index 0000000..6ba0470 --- /dev/null +++ b/regalloc.h @@ -0,0 +1,19 @@ +#pragma once + +#include +#include "ir.h" + + +struct allocation_record { + bool spill; + int reg; // only used if spill == false +}; + +struct allocation { + int numregs; + struct allocation_record *allocs; +}; + +struct allocation* regalloc(const struct ir *ir); + +void allocation_delete(struct allocation *alloc); -- cgit v1.2.3-54-g00ecf