-/**
- * Datastructure that holds central information about a program
- *
- * Preliminary documentation ;-)
- *
- * - main_irg: The ir graph that is the entry point to the program.
- * (Anything not reachable from here may be optimized away.
- * If we want to translate libraries or the like correctly
- * we must replace this by a list.)
- * - irg: List of all ir graphs in the program.
- * - type: A list containing all types known to the translated program.
- * Some types can have several entries in this list (as a result of
- * using exchange_types()).
- * - glob_type: The unique global type that is owner of all global entities.
- *
- */
-typedef struct ir_prog ir_prog;
+typedef enum ir_segment_t {
+ IR_SEGMENT_FIRST,
+ /** "normal" global data */
+ IR_SEGMENT_GLOBAL = IR_SEGMENT_FIRST,
+ /** thread local storage segment */
+ IR_SEGMENT_THREAD_LOCAL,
+ /**
+ * the constructors segment. Contains pointers to functions which are
+ * executed on module initialization (program start or when a library is
+ * dynamically loaded)
+ */
+ IR_SEGMENT_CONSTRUCTORS,
+ /** like constructors, but functions are executed on module exit */
+ IR_SEGMENT_DESTRUCTORS,
+
+ IR_SEGMENT_COUNT
+} ir_segment_t;