remove unused op_machine, op_machine_op stuff
authorMatthias Braun <matze@braunis.de>
Thu, 10 Nov 2011 12:45:21 +0000 (13:45 +0100)
committerMatthias Braun <matze@braunis.de>
Thu, 10 Nov 2011 13:17:49 +0000 (14:17 +0100)
include/libfirm/irnode.h
include/libfirm/irop.h
ir/be/beinsn.c
ir/be/scripts/generate_new_opcodes.pl
ir/ir/irnode.c
ir/ir/irnode_t.h
ir/ir/irop_t.h

index 0f24af4..a70794e 100644 (file)
@@ -633,21 +633,6 @@ FIRM_API int is_irn_keep(const ir_node *node);
  */
 FIRM_API int is_irn_start_block_placed(const ir_node *node);
 
-/**
- * Returns non-zero for nodes that are machine operations.
- */
-FIRM_API int is_irn_machine_op(const ir_node *node);
-
-/**
- * Returns non-zero for nodes that are machine operands.
- */
-FIRM_API int is_irn_machine_operand(const ir_node *node);
-
-/**
- * Returns non-zero for nodes that have the n'th user machine flag set.
- */
-FIRM_API int is_irn_machine_user(const ir_node *node, unsigned n);
-
 /**
  * Returns non-zero for nodes that are CSE neutral to its users.
  */
index d6b3725..3f7480f 100644 (file)
@@ -73,14 +73,11 @@ typedef enum {
        irop_flag_uses_memory  = 1U << 10, /**< This operation has a memory input and may change the memory state. */
        irop_flag_dump_noblock = 1U << 11, /**< node should be dumped outside any blocks */
        irop_flag_dump_noinput = 1U << 12, /**< node is a placeholder for "no input" */
-       irop_flag_machine      = 1U << 13, /**< This operation is a machine operation. */
-       irop_flag_machine_op   = 1U << 14, /**< This operation is a machine operand. */
-       irop_flag_cse_neutral  = 1U << 15, /**< This operation is CSE neutral to its users. */
+       irop_flag_cse_neutral  = 1U << 13, /**< This operation is CSE neutral to its users. */
        /** This operation jumps to an unknown destination. The CFG is a
         * conservative aproximation in this case. You cannot change the destination
         * of an unknown_jump */
-       irop_flag_unknown_jump = 1U << 16,
-       irop_flag_user         = 1U << 17, /**< This flag and all higher ones are free for machine user. */
+       irop_flag_unknown_jump = 1U << 14,
 } irop_flags;
 
 /** Returns the ident for the opcode name */
index d0183ea..2f7a290 100644 (file)
 #include "beabi.h"
 #include "raw_bitset.h"
 
-/**
- * Add machine operands to the instruction uses.
- *
- * @param env      the insn construction environment
- * @param insn     the be_insn that is build
- * @param mach_op  the machine operand for which uses are added
- */
-static void add_machine_operands(const be_insn_env_t *env, be_insn_t *insn, ir_node *mach_op)
-{
-       struct obstack *obst = env->obst;
-       int i, n;
-
-       for (i = 0, n = get_irn_arity(mach_op); i < n; ++i) {
-               ir_node *op = get_irn_n(mach_op, i);
-
-               if (is_irn_machine_operand(op)) {
-                       add_machine_operands(env, insn, op);
-               } else if (arch_irn_consider_in_reg_alloc(env->cls, op)) {
-                       be_operand_t o;
-
-                       /* found a register use, create an operand */
-                       o.req     = arch_get_irn_register_req_in(mach_op, i);
-                       o.carrier = op;
-                       o.irn     = insn->irn;
-                       o.pos     = i;
-                       o.partner = NULL;
-                       o.has_constraints = arch_register_req_is(o.req, limited);
-                       obstack_grow(obst, &o, sizeof(o));
-                       insn->n_ops++;
-                       insn->in_constraints |= o.has_constraints;
-               }
-       }
-}
-
 /**
  * Create a be_insn_t for an IR node.
  *
@@ -140,9 +106,7 @@ be_insn_t *be_scan_insn(const be_insn_env_t *env, ir_node *irn)
        for (i = 0, n = get_irn_arity(irn); i < n; ++i) {
                ir_node *op = get_irn_n(irn, i);
 
-               if (is_irn_machine_operand(op)) {
-                       add_machine_operands(env, insn, op);
-               } else if (arch_irn_consider_in_reg_alloc(env->cls, op)) {
+               if (arch_irn_consider_in_reg_alloc(env->cls, op)) {
                        /* found a register use, create an operand */
                        o.req     = arch_get_irn_register_req_in(irn, i);
                        o.carrier = op;
index 20ba899..205a01d 100755 (executable)
@@ -676,7 +676,7 @@ EOF
                "none", "labeled", "commutative", "cfopcode", "unknown_jump", "fragile",
                "forking", "highlevel", "constlike", "always_opt", "keep",
                "start_block", "uses_memory", "dump_noblock", "dump_noinput",
-               "machine", "machine_op", "cse_neutral"
+               "cse_neutral"
        );
        my $is_fragile = 0;
        foreach my $flag (@{$n{"op_flags"}}) {
@@ -697,7 +697,7 @@ EOF
 
        $n_opcodes++;
        $temp  = "\top_$op = new_ir_op(cur_opcode + iro_$op, \"$op\", op_pin_state_".$n{"state"}.", $op_flags";
-       $temp .= "|irop_flag_machine, ".translate_arity($arity).", 0, ${attr_size}, &ops);\n";
+       $temp .= ", ".translate_arity($arity).", 0, ${attr_size}, &ops);\n";
        push(@obst_new_irop, $temp);
        if ($is_fragile) {
                push(@obst_new_irop, "\tir_op_set_fragile_indices(op_${op}, n_${op}_mem, pn_${op}_X_regular, pn_${op}_X_except);\n");
index 43e1433..aaf0036 100644 (file)
@@ -1590,24 +1590,6 @@ int (is_irn_start_block_placed)(const ir_node *node)
        return is_irn_start_block_placed_(node);
 }
 
-/* Returns non-zero for nodes that are machine operations. */
-int (is_irn_machine_op)(const ir_node *node)
-{
-       return is_irn_machine_op_(node);
-}
-
-/* Returns non-zero for nodes that are machine operands. */
-int (is_irn_machine_operand)(const ir_node *node)
-{
-       return is_irn_machine_operand_(node);
-}
-
-/* Returns non-zero for nodes that have the n'th user machine flag set. */
-int (is_irn_machine_user)(const ir_node *node, unsigned n)
-{
-       return is_irn_machine_user_(node, n);
-}
-
 /* Returns non-zero for nodes that are CSE neutral to its users. */
 int (is_irn_cse_neutral)(const ir_node *node)
 {
index 80474c9..fed4468 100644 (file)
@@ -481,21 +481,6 @@ static inline int is_irn_start_block_placed_(const ir_node *node)
        return is_op_start_block_placed(get_irn_op_(node));
 }
 
-static inline int is_irn_machine_op_(const ir_node *node)
-{
-       return is_op_machine(get_irn_op_(node));
-}
-
-static inline int is_irn_machine_operand_(const ir_node *node)
-{
-       return is_op_machine_operand(get_irn_op_(node));
-}
-
-static inline int is_irn_machine_user_(const ir_node *node, unsigned n)
-{
-       return is_op_machine_user(get_irn_op_(node), n);
-}
-
 static inline int is_irn_cse_neutral_(const ir_node *node)
 {
        return is_op_cse_neutral(get_irn_op_(node));
@@ -672,9 +657,6 @@ void init_irnode(void);
 #define is_irn_always_opt(node)               is_irn_always_opt_(node)
 #define is_irn_keep(node)                     is_irn_keep_(node)
 #define is_irn_start_block_placed(node)       is_irn_start_block_placed_(node)
-#define is_irn_machine_op(node)               is_irn_machine_op_(node)
-#define is_irn_machine_operand(node)          is_irn_machine_operand_(node)
-#define is_irn_machine_user(node, n)          is_irn_machine_user_(node, n)
 #define is_irn_cse_neutral(node)              is_irn_cse_neutral_(node)
 #define get_Cond_jmp_pred(node)               get_Cond_jmp_pred_(node)
 #define set_Cond_jmp_pred(node, pred)         set_Cond_jmp_pred_(node, pred)
index f92e208..a2fc0ec 100644 (file)
@@ -129,30 +129,12 @@ static inline bool is_op_start_block_placed(const ir_op *op)
        return op->flags & irop_flag_start_block;
 }
 
-/** Returns non-zero if operation is a machine operation */
-static inline bool is_op_machine(const ir_op *op)
-{
-       return op->flags & irop_flag_machine;
-}
-
-/** Returns non-zero if operation is a machine operand */
-static inline bool is_op_machine_operand(const ir_op *op)
-{
-       return op->flags & irop_flag_machine_op;
-}
-
 /** Returns non-zero if operation is CSE neutral */
 static inline bool is_op_cse_neutral(const ir_op *op)
 {
        return op->flags & irop_flag_cse_neutral;
 }
 
-/** Returns non-zero if operation is a machine user op number n */
-static inline bool is_op_machine_user(const ir_op *op, unsigned n)
-{
-       return op->flags & (irop_flag_user << n);
-}
-
 static inline unsigned get_op_code_(const ir_op *op)
 {
        return op->code;