flag for strength reduction verbosity
[libfirm] / ir / tr / tpop_t.h
index c0a81f1..a24b5d7 100644 (file)
@@ -1,6 +1,15 @@
-/*   (C) 2001 by Universitaet Karlsruhe  */
+/*
+ * Project:     libFIRM
+ * File name:   ir/tr/tpop_t.h
+ * Purpose:     Opcode of types -- private header.
+ * Author:      Goetz Lindenmaier
+ * Modified by:
+ * Created:
+ * CVS-ID:      $Id$
+ * Copyright:   (c) 2001-2003 Universität Karlsruhe
+ * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ */
 
-/* $Id$ */
 
 # ifndef _TPOP_T_H_
 # define _TPOP_T_H_
@@ -37,7 +46,12 @@ struct tp_op {
  *   @return A new type opcode.
  *
  */
-tp_op * new_tpop (tp_opcode code, ident *name, size_t attr_size);
+tp_op *new_tpop (tp_opcode code, ident *name, size_t attr_size);
+
+/**
+ * Free a tpop datastructure.
+ */
+void free_tpop(tp_op* tpop);
 
 /**
  *   Initialize the tpop module.
@@ -50,6 +64,13 @@ tp_op * new_tpop (tp_opcode code, ident *name, size_t attr_size);
  */
 void init_tpop (void);
 
+/**
+ *  Finalize the topo module.
+ *
+ *  Frees all type opcodes.
+ */
+void finish_tpop(void);
+
 /**
  *   Returns the size of the attribute to this kind
  *   of type.
@@ -62,4 +83,28 @@ void init_tpop (void);
  */
 int get_tpop_attr_size (tp_op *op);
 
+
+/* ---------------- *
+ * inline functions *
+ * -----------------*/
+
+static INLINE tp_opcode
+__get_tpop_code(tp_op *op) {
+  return op->code;
+}
+
+static INLINE ident *
+__get_tpop_ident(tp_op *op){
+  return op->name;
+}
+
+static INLINE int
+__get_tpop_attr_size(tp_op *op) {
+  return op->attr_size;
+}
+
+#define get_tpop_code(op)      __get_tpop_code(op)
+#define get_tpop_ident(op)     __get_tpop_ident(op)
+#define get_tpop_attr_size(op) __get_tpop_attr_size(op)
+
 #endif /* _TPOP_T_H_ */