remove commented out, old and unused code
[libfirm] / ir / be / beirg.h
index 647480a..2f16db5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
 #ifndef FIRM_BE_BEIRG_H
 #define FIRM_BE_BEIRG_H
 
-#include "belive.h"
-#include "bedomfront.h"
+#include "be.h"
+#include "be_types.h"
+#include "be_t.h"
+#include "irtypes.h"
 
-typedef struct be_irg_t be_irg_t;
-
-ir_graph *be_get_birg_irg(const be_irg_t *birg);
-
-void be_assure_liveness(be_irg_t *birg);
-void be_assure_liveness_chk(be_irg_t *birg);
-void be_invalidate_liveness(be_irg_t *birg);
-be_lv_t *be_get_birg_liveness(const be_irg_t *birg);
+be_lv_t *be_assure_liveness(be_irg_t *birg);
 
 void be_assure_dom_front(be_irg_t *birg);
 void be_invalidate_dom_front(be_irg_t *birg);
-be_dom_front_info_t *be_get_birg_dom_front(const be_irg_t *birg);
-
-const arch_env_t *be_get_birg_arch_env(const be_irg_t *birg);
-
-ir_exec_freq *be_get_birg_exec_freq(const be_irg_t *birg);
 
 /**
  * frees all memory allocated by birg structures (liveness, dom_front, ...).
@@ -54,10 +44,57 @@ ir_exec_freq *be_get_birg_exec_freq(const be_irg_t *birg);
 void be_free_birg(be_irg_t *birg);
 
 /**
- * Compare the computed liveness information with the liveness check info.
- * @param lv    The computed liveness.
- * @param lvc   The liveness check information.
+ * An ir_graph with additional analysis data about this irg. Also includes some
+ * backend structures
  */
-void be_live_chk_compare(be_irg_t *birg);
+struct be_irg_t {
+       ir_graph               *irg;
+       be_main_env_t          *main_env;
+       be_abi_irg_t           *abi;
+       arch_code_generator_t  *cg;
+       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)
+{
+       return birg->lv;
+}
+
+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)
+{
+       return birg->dom_front;
+}
+
+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)
+{
+       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 */