ia32: we cannot fold ia32_mode_E reloads
[libfirm] / ir / be / beirg.h
index 8970cf4..535125c 100644 (file)
@@ -1,20 +1,6 @@
 /*
- * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
- *
  * This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
  */
 
 /**
@@ -31,9 +17,6 @@
 #include "be_t.h"
 #include "irtypes.h"
 
-void be_assure_dom_front(ir_graph *irg);
-void be_invalidate_dom_front(ir_graph *irg);
-
 void be_assure_live_sets(ir_graph *irg);
 void be_assure_live_chk(ir_graph *irg);
 /**
@@ -48,7 +31,7 @@ void be_invalidate_live_sets(ir_graph *irg);
 void be_invalidate_live_chk(ir_graph *irg);
 
 /**
- * frees all memory allocated by birg structures (liveness, dom_front, ...).
+ * frees all memory allocated by birg structures (liveness, ...).
  * The memory of the birg structure itself is not freed.
  */
 void be_free_birg(ir_graph *irg);
@@ -83,22 +66,18 @@ struct be_stack_layout_t {
  * backend structures
  */
 typedef struct be_irg_t {
-       ir_graph              *irg;
-       be_main_env_t         *main_env;
-       be_abi_irg_t          *abi;
-       ir_exec_freq          *exec_freq;
-       be_dom_front_info_t   *dom_front;
-       be_lv_t               *lv;
-       be_stack_layout_t      stack_layout;
-       unsigned              *allocatable_regs; /**< registers available for the
-                                                                                             allocator */
-       arch_register_req_t   *sp_req; /**< requirements for stackpointer producing
-                                           nodes. */
-       struct obstack         obst; /**< birg obstack (mainly used to keep
-                                         register constraints which we can't keep
-                                         in the irg obst, because it gets replaced
-                                         during code selection) */
-       void                  *isa_link; /**< architecture specific per-graph data*/
+       be_main_env_t             *main_env;
+       be_lv_t                   *lv;
+       be_stack_layout_t          stack_layout;
+       unsigned                  *allocatable_regs; /**< registers available for the
+                                                         allocator */
+       arch_register_req_t const *sp_req;           /**< requirements for stackpointer producing
+                                                         nodes. */
+       struct obstack             obst;             /**< birg obstack (mainly used to keep
+                                                         register constraints which we can't keep
+                                                         in the irg obst, because it gets replaced
+                                                         during code selection) */
+       void                      *isa_link;         /**< architecture specific per-graph data*/
 } be_irg_t;
 
 static inline be_irg_t *be_birg_from_irg(const ir_graph *irg)
@@ -116,32 +95,6 @@ static inline be_lv_t *be_get_irg_liveness(const ir_graph *irg)
        return be_birg_from_irg(irg)->lv;
 }
 
-static inline ir_exec_freq *be_get_irg_exec_freq(const ir_graph *irg)
-{
-       return be_birg_from_irg(irg)->exec_freq;
-}
-
-static inline be_dom_front_info_t *be_get_irg_dom_front(const ir_graph *irg)
-{
-       return be_birg_from_irg(irg)->dom_front;
-}
-
-static inline be_abi_irg_t *be_get_irg_abi(const ir_graph *irg)
-{
-       return be_birg_from_irg(irg)->abi;
-}
-
-static inline void be_set_irg_abi(ir_graph *irg, be_abi_irg_t *abi)
-{
-       be_birg_from_irg(irg)->abi = abi;
-}
-
-/** deprecated */
-static inline ir_graph *be_get_birg_irg(const be_irg_t *birg)
-{
-       return birg->irg;
-}
-
 static inline const arch_env_t *be_get_irg_arch_env(const ir_graph *irg)
 {
        return be_birg_from_irg(irg)->main_env->arch_env;
@@ -149,8 +102,10 @@ static inline const arch_env_t *be_get_irg_arch_env(const ir_graph *irg)
 
 static inline struct obstack *be_get_be_obst(const ir_graph *irg)
 {
-       be_irg_t *birg = be_birg_from_irg(irg);
-       return &birg->obst;
+       be_irg_t       *const birg = be_birg_from_irg(irg);
+       struct obstack *const obst = &birg->obst;
+       assert(obstack_object_size(obst) == 0);
+       return obst;
 }
 
 static inline be_stack_layout_t *be_get_irg_stack_layout(const ir_graph *irg)