summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beirg.h
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2009-09-17 16:16:20 +0200
committerMatthias Braun <matze@braunis.de>2009-09-17 16:16:20 +0200
commit39cb52264857d7c21c7141ba82bb55adaa78064d (patch)
treeb26cc326a4645ad0b5e2758831b3d629a7da5b4d /ir/be/beirg.h
parent65a677516d45936d113d4170932c52c4b9364891 (diff)
- Bigger refactoring and cleanup in backend:
* benodes store the out register requirements in backend_info now (this is work towards killing the register_requirement callbacks) * ir_graph has a pointer to beirg now * Other cleanups [r26540]
Diffstat (limited to 'ir/be/beirg.h')
-rw-r--r--ir/be/beirg.h36
1 files changed, 26 insertions, 10 deletions
diff --git a/ir/be/beirg.h b/ir/be/beirg.h
index fcfa26b..2f16db5 100644
--- a/ir/be/beirg.h
+++ b/ir/be/beirg.h
@@ -30,6 +30,7 @@
#include "be.h"
#include "be_types.h"
#include "be_t.h"
+#include "irtypes.h"
be_lv_t *be_assure_liveness(be_irg_t *birg);
@@ -54,31 +55,46 @@ struct be_irg_t {
ir_exec_freq *exec_freq;
be_dom_front_info_t *dom_front;
be_lv_t *lv;
+ struct obstack obst; /**< birg obstack (mainly used to keep
+ register constraints which we can't keep
+ in the irg obst, because it gets replace
+ during code selection) */
};
-static inline be_lv_t *
-be_get_birg_liveness(const be_irg_t *birg) {
+static inline be_lv_t *be_get_birg_liveness(const be_irg_t *birg)
+{
return birg->lv;
}
-static inline ir_exec_freq *
-be_get_birg_exec_freq(const be_irg_t *birg) {
+static inline ir_exec_freq *be_get_birg_exec_freq(const be_irg_t *birg)
+{
return birg->exec_freq;
}
-static inline be_dom_front_info_t *
-be_get_birg_dom_front(const be_irg_t *birg) {
+static inline be_dom_front_info_t *be_get_birg_dom_front(const be_irg_t *birg)
+{
return birg->dom_front;
}
-static inline ir_graph *
-be_get_birg_irg(const be_irg_t *birg) {
+static inline ir_graph *be_get_birg_irg(const be_irg_t *birg)
+{
return birg->irg;
}
-static inline const arch_env_t *
-be_get_birg_arch_env(const be_irg_t *birg) {
+static inline const arch_env_t *be_get_birg_arch_env(const be_irg_t *birg)
+{
return birg->main_env->arch_env;
}
+static inline be_irg_t *be_birg_from_irg(const ir_graph *irg)
+{
+ return (be_irg_t*) irg->be_data;
+}
+
+static inline struct obstack *be_get_birg_obst(const ir_graph *irg)
+{
+ be_irg_t *birg = be_birg_from_irg(irg);
+ return &birg->obst;
+}
+
#endif /* FIRM_BE_BEIRG_H */