never set the startblock to bad (even without the self-referencing loop)
[libfirm] / ir / ir / irop_t.h
index aa67a72..11ec792 100644 (file)
@@ -20,7 +20,7 @@
 
 /** The type of an ir_op. */
 struct ir_op {
-  opcode code;            /**< The unique opcode of the op. */
+  ir_opcode code;         /**< The unique opcode of the op. */
   ident *name;            /**< The name of the op. */
   size_t attr_size;       /**< Space needed in memory for private attributes. */
   op_pin_state op_pin_state_pinned; /**< How to deal with the node in CSE, PRE. */
@@ -56,7 +56,7 @@ void default_copy_attr(const ir_node *old_node, ir_node *new_node);
  * Returns the attribute size of nodes of this opcode.
  * @note Use not encouraged, internal feature.
  */
-static INLINE int get_op_attr_size (const ir_op *op) {
+static INLINE size_t get_op_attr_size (const ir_op *op) {
   return op->attr_size;
 }
 
@@ -101,11 +101,21 @@ static INLINE int is_op_constlike(const ir_op *op) {
   return op->flags & irop_flag_constlike;
 }
 
+/** Returns non-zero if operation must always be optimized */
+static INLINE int is_op_always_opt(const ir_op *op) {
+  return op->flags & irop_flag_always_opt;
+}
+
 /** Returns non-zero if operation is a keep-like op */
 static INLINE int is_op_keep(const ir_op *op) {
   return op->flags & irop_flag_keep;
 }
 
+/** Returns non-zero if operation must always be placed in the start block. */
+static INLINE int 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 int is_op_machine(const ir_op *op) {
   return op->flags & irop_flag_machine;
@@ -121,7 +131,7 @@ static INLINE int is_op_machine_user(const ir_op *op, unsigned n) {
   return op->flags & (irop_flag_user << n);
 }
 
-static INLINE opcode _get_op_code(const ir_op *op) {
+static INLINE ir_opcode _get_op_code(const ir_op *op) {
   return op->code;
 }