Clean up turn_back_am(), panic on unknown arity.
[libfirm] / include / libfirm / typerep.h
index c6008c3..fdc8880 100644 (file)
@@ -143,11 +143,14 @@ typedef enum {
                                               GCC: __attribute__((naked)). */
        mtp_property_malloc    = 0x00000020, /**< This method returns newly allocate memory.
                                               GCC: __attribute__((malloc)). */
-       mtp_property_intrinsic = 0x00000040, /**< This method is intrinsic. It is expected that
+       mtp_property_weak      = 0x00000040, /**< This method is weak. It is expected that
+                                              GCC: __attribute__((weak)). */
+       mtp_property_intrinsic = 0x00000080, /**< This method is intrinsic. It is expected that
                                               a lowering phase will remove all calls to it. */
-       mtp_property_runtime   = 0x00000080, /**< This method represents a runtime routine. */
-       mtp_property_private   = 0x00000100, /**< All method invocations are known, the backend is free to
+       mtp_property_runtime   = 0x00000100, /**< This method represents a runtime routine. */
+       mtp_property_private   = 0x00000200, /**< All method invocations are known, the backend is free to
                                               optimize the call in any possible way. */
+       mtp_property_has_loop  = 0x00000400, /**< Set, if this method contains one possible endless loop. */
        mtp_property_inherited = (1<<31)     /**< Internal. Used only in irg's, means property is
                                               inherited from type. */
 } mtp_additional_property;
@@ -400,10 +403,13 @@ void set_entity_backend_marked(ir_entity *ent, int flag);
  * Bitfield type indicating the way an entity is used.
  */
 typedef enum {
-       ir_usage_address_taken    = 1 << 0,
-       ir_usage_write            = 1 << 1,
-       ir_usage_read             = 1 << 2,
-       ir_usage_reinterpret_cast = 1 << 3,
+       ir_usage_none             = 0,      /**< This entity is unused. */
+       ir_usage_address_taken    = 1 << 0, /**< The address of this entity was taken. */
+       ir_usage_write            = 1 << 1, /**< The entity was written to. */
+       ir_usage_read             = 1 << 2, /**< The entity was read. */
+       ir_usage_reinterpret_cast = 1 << 3, /**< The entity was read but with a wrong mode
+                                                (an implicit reinterpret cast) */
+       /** Unknown access */
        ir_usage_unknown
                = ir_usage_address_taken | ir_usage_write | ir_usage_read
                | ir_usage_reinterpret_cast
@@ -666,10 +672,10 @@ int equal_entity(ir_entity *ent1, ir_entity *ent2);
 long get_entity_nr(const ir_entity *ent);
 
 /** Returns the entities visited count. */
-unsigned long get_entity_visited(ir_entity *ent);
+ir_visited_t get_entity_visited(ir_entity *ent);
 
 /** Sets the entities visited count. */
-void set_entity_visited(ir_entity *ent, unsigned long num);
+void set_entity_visited(ir_entity *ent, ir_visited_t num);
 
 /** Sets visited field in entity to entity_visited. */
 void mark_entity_visited(ir_entity *ent);
@@ -1404,9 +1410,9 @@ unsigned get_type_alignment_bytes(ir_type *tp);
 void set_type_alignment_bytes(ir_type *tp, unsigned align);
 
 /** Returns the visited count of a type. */
-unsigned long get_type_visited(const ir_type *tp);
+ir_visited_t get_type_visited(const ir_type *tp);
 /** Sets the visited count of a type to num. */
-void set_type_visited(ir_type *tp, unsigned long num);
+void set_type_visited(ir_type *tp, ir_visited_t num);
 /** Sets visited field in type to type_visited. */
 void mark_type_visited(ir_type *tp);
 /** Returns non-zero if the type is already visited */
@@ -1431,9 +1437,9 @@ void set_type_link(ir_type *tp, void *l);
  *
  * @see  typewalk
  */
-void          set_master_type_visited(unsigned long val);
-unsigned long get_master_type_visited(void);
-void          inc_master_type_visited(void);
+void         set_master_type_visited(ir_visited_t val);
+ir_visited_t get_master_type_visited(void);
+void         inc_master_type_visited(void);
 
 /**
  * Sets the debug information of a type.