X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbearch.h;h=011b5cb620d821fb37cde30c6d240245210dd5e9;hb=f193ebf691abc3cd18ac9b76b258cf41266d7a9a;hp=b8f8817d10dc575d11c938fda9e252458f541851;hpb=fd61324a4bfc64ce80b75fb055dfc8348b34d036;p=libfirm diff --git a/ir/be/bearch.h b/ir/be/bearch.h index b8f8817d1..011b5cb62 100644 --- a/ir/be/bearch.h +++ b/ir/be/bearch.h @@ -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 #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) \