/*
- * 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.
*
* @date 13.12.2006
* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
#include "execfreq.h"
-#include "beirg_t.h"
+#include "beirg.h"
#include "absgraph.h"
+#include "belive.h"
+#include "bedomfront.h"
-be_lv_t *be_assure_liveness(be_irg_t *birg)
+be_lv_t *be_assure_liveness(ir_graph *irg)
{
+ be_irg_t *birg = be_birg_from_irg(irg);
if (birg->lv != NULL)
return birg->lv;
- return birg->lv = be_liveness(birg);
+ return birg->lv = be_liveness(birg->irg);
}
-void be_assure_dom_front(be_irg_t *birg)
+void be_assure_dom_front(ir_graph *irg)
{
+ be_irg_t *birg = be_birg_from_irg(irg);
if (birg->dom_front != NULL)
return;
birg->dom_front = be_compute_dominance_frontiers(birg->irg);
}
-void be_invalidate_dom_front(be_irg_t *birg)
+void be_invalidate_dom_front(ir_graph *irg)
{
+ be_irg_t *birg = be_birg_from_irg(irg);
if (birg->dom_front == NULL)
return;
birg->dom_front = NULL;
}
-void be_free_birg(be_irg_t *birg)
+void be_free_birg(ir_graph *irg)
{
+ be_irg_t *birg = be_birg_from_irg(irg);
free_execfreq(birg->exec_freq);
birg->exec_freq = NULL;
be_liveness_free(birg->lv);
birg->lv = NULL;
}
-}
-
-ir_graph *(be_get_birg_irg)(const be_irg_t *birg)
-{
- return _be_get_birg_irg(birg);
-}
-
-ir_exec_freq *(be_get_birg_exec_freq)(const be_irg_t *birg)
-{
- return _be_get_birg_exec_freq(birg);
-}
-be_lv_t *(be_get_birg_liveness)(const be_irg_t *birg)
-{
- return _be_get_birg_liveness(birg);
-}
-
-be_dom_front_info_t *(be_get_birg_dom_front)(const be_irg_t *birg)
-{
- return _be_get_birg_dom_front(birg);
-}
-
-const arch_env_t *(be_get_birg_arch_env)(const be_irg_t *birg)
-{
- return _be_get_birg_arch_env(birg);
+ obstack_free(&birg->obst, NULL);
+ irg->be_data = NULL;
}