summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beirg.h
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2018-04-03 10:33:02 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2018-04-03 10:53:52 +0200
commitced77d384cb1bbedc1c57d345328e79e05a41de0 (patch)
tree31bf68ee3d3c7dc34f55e85c9c2a54bbd596a382 /ir/be/beirg.h
parent75a92e30b49a1394047a0db03e8bf614440db38a (diff)
amd64, be, ia32, sparc: Record that there is a twice returning call (setjmp) centrally in the birg.
This way not each backend has to keep a separate flag and also does not need to manually call be_forbid_coalescing().
Diffstat (limited to 'ir/be/beirg.h')
-rw-r--r--ir/be/beirg.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ir/be/beirg.h b/ir/be/beirg.h
index 3cd72ec..bb0d754 100644
--- a/ir/be/beirg.h
+++ b/ir/be/beirg.h
@@ -54,6 +54,7 @@ typedef struct be_irg_t {
struct obstack obst;
/** Architecture specific per-graph data */
void *isa_link;
+ bool has_returns_twice_call;
} be_irg_t;
static inline be_irg_t *be_birg_from_irg(const ir_graph *irg)
@@ -79,4 +80,10 @@ static inline struct obstack *be_get_be_obst(const ir_graph *irg)
return obst;
}
+static inline void record_returns_twice(ir_graph *const irg, ir_type *const type)
+{
+ if (get_method_additional_properties(type) & mtp_property_returns_twice)
+ be_birg_from_irg(irg)->has_returns_twice_call = true;
+}
+
#endif