Fixed bug with modes of the Projs from the Barrier
[libfirm] / ir / be / bearch.h
index b8f8817..011b5cb 100644 (file)
@@ -1,26 +1,15 @@
 #ifndef _FIRM_BEARCH_H
 #define _FIRM_BEARCH_H
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
+#include "firm_config.h"
 
 #ifdef WITH_LIBCORE
 #include <libcore/lc_opts.h>
 #endif
 
-#include "type.h"
-
-#include "irnode.h"
-#include "irmode.h"
+#include "firm_types.h"
 
 #include "bitset.h"
-#include "hashptr.h"
-#include "fourcc.h"
-#include "set.h"
-#include "list.h"
-#include "ident.h"
 
 #include "belistsched.h"
 #include "beabi_t.h"
@@ -133,6 +122,8 @@ typedef enum _arch_register_req_type_t {
   arch_register_req_type_should_be_different = 8,  /**< The register must be unequal
                                                         to some other at the node. */
 
+  arch_register_req_type_should_be_different_from_all = 16, /**< The register must be different from
+                                                        all in's at the node */
 } arch_register_req_type_t;
 
 /**
@@ -393,16 +384,16 @@ extern arch_irn_class_t arch_irn_classify(const arch_env_t *env, const ir_node *
  */
 extern arch_irn_flags_t arch_irn_get_flags(const arch_env_t *env, const ir_node *irn);
 
-#define arch_irn_is_ignore(env, irn) ((arch_irn_get_flags(env, irn) & arch_irn_flags_ignore) != 0)
+#define arch_irn_is(env, irn, flag) ((arch_irn_get_flags(env, irn) & arch_irn_flags_ ## flag) != 0)
 
 #define arch_irn_has_reg_class(env, irn, pos, cls) \
   ((cls) == arch_get_irn_reg_class(env, irn, pos))
 
 #define arch_irn_consider_in_reg_alloc(env, cls, irn) \
-       (arch_irn_has_reg_class(env, irn, -1, cls) && !arch_irn_is_ignore(env, irn))
+       (arch_irn_has_reg_class(env, irn, -1, cls) && !arch_irn_is(env, irn, ignore))
 
 /**
- * Somebody who can be asked about nodes.
+ * Somebody who can be asked about IR nodes.
  */
 struct _arch_irn_handler_t {
 
@@ -414,15 +405,12 @@ struct _arch_irn_handler_t {
     */
   const void *(*get_irn_ops)(const arch_irn_handler_t *handler,
       const ir_node *irn);
-
 };
 
 /**
- * The code generator.
+ * The code generator interface.
  */
 struct _arch_code_generator_if_t {
-
-
        /**
         * Initialize the code generator.
         * @param file The file to dump to.
@@ -461,9 +449,12 @@ struct _arch_code_generator_if_t {
         * The code generator must also be de-allocated here.
         */
        void (*done)(void *self);
-
 };
 
+/**
+ * helper macro: call function func from the code generator
+ * if it's implemented.
+ */
 #define _arch_cg_call(cg, func) \
 do { \
        if((cg)->impl->func) \