From: Matthias Braun Date: Wed, 23 Jun 2010 10:32:42 +0000 (+0000) Subject: remove arch_irn_class_is macro as it hides usages of arch_irn_class_XXX from grep... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=8de89d300022849c317e3b9b2b04c9d347512bd9;p=libfirm remove arch_irn_class_is macro as it hides usages of arch_irn_class_XXX from grep, also remove useless safety checks against classify of Projs returning wrong values [r27645] --- diff --git a/ir/be/bearch.h b/ir/be/bearch.h index b6ffb7ff1..0b3d499e1 100644 --- a/ir/be/bearch.h +++ b/ir/be/bearch.h @@ -105,7 +105,7 @@ void arch_dump_register_reqs(FILE *F, const ir_node *node); void arch_dump_reqs_and_registers(FILE *F, const ir_node *node); /** - * Node classification. Used for statistics. + * Node classification. Used for statistics and for detecting reload nodes. */ typedef enum arch_irn_class_t { arch_irn_class_spill = 1 << 0, @@ -199,8 +199,6 @@ void arch_irn_set_register(ir_node *irn, int pos, const arch_register_t *reg); */ arch_irn_class_t arch_irn_classify(const ir_node *irn); -#define arch_irn_class_is(irn, irn_class) ((arch_irn_classify(irn) & arch_irn_class_ ## irn_class) != 0) - /** * Get the flags of a node. * @param irn The node. diff --git a/ir/be/bespillslots.c b/ir/be/bespillslots.c index eff37fd2e..6fa43ca0e 100644 --- a/ir/be/bespillslots.c +++ b/ir/be/bespillslots.c @@ -816,11 +816,7 @@ static void collect_spills_walker(ir_node *node, void *data) const arch_register_class_t *cls; int align; - /* classify returns classification of the irn the proj is attached to */ - if (is_Proj(node)) - return; - - if (!arch_irn_class_is(node, reload)) + if (! (arch_irn_classify(node) & arch_irn_class_reload)) return; mode = get_irn_mode(node); diff --git a/ir/be/beverify.c b/ir/be/beverify.c index 436af8319..a175c9b30 100644 --- a/ir/be/beverify.c +++ b/ir/be/beverify.c @@ -534,11 +534,7 @@ static void collect_spills_walker(ir_node *node, void *data) { be_verify_spillslots_env_t *env = data; - /* @@@ ia32_classify returns classification of Proj_pred :-/ */ - if (is_Proj(node)) - return; - - if (arch_irn_class_is(node, reload)) { + if (arch_irn_classify(node) & arch_irn_class_reload) { ir_node *spill = get_memory_edge(node); ir_entity *ent;