- fixed warnings
[libfirm] / ir / ir / iropt_t.h
index cd2ea2f..fc62fbb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
  * PURPOSE.
  */
 
-/*
- * Project:     libFIRM
- * File name:   ir/ir/iropt_t.h
- * Purpose:     iropt --- optimizations intertwined with IR construction -- private header.
- * Author:      Martin Trapp, Christian Schaefer
- * Modified by: Goetz Lindenmaier, Michael Beck
- * Created:
- * CVS-ID:      $Id$
- * Copyright:   (c) 1998-2003 Universität Karlsruhe
- */
-
 /**
- * @file iropt_t.h
- *
- * Declarations for optimizations intertwined with IR construction.
- *
- * @author Martin Trapp, Christian Schaefer
+ * @file
+ * @brief    iropt --- optimizations intertwined with IR construction -- private header.
+ * @author   Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Michael Beck
+ * @version  $Id$
  */
-
-#ifndef _IROPT_T_H_
-#define _IROPT_T_H_
+#ifndef FIRM_IR_IROPT_T_H
+#define FIRM_IR_IROPT_T_H
 
 #include "iropt.h"
 #include "irnode_t.h"
@@ -53,7 +40,7 @@ ir_node *equivalent_node(ir_node *n);
  *
  * @param node  The IR-node
  */
-unsigned ir_node_hash(ir_node *node);
+unsigned ir_node_hash(const ir_node *node);
 
 /**
  * Creates a new value table used for storing CSE identities.
@@ -67,12 +54,12 @@ pset *new_identities(void);
  *
  * @param value_table  the identity set
  */
-void  del_identities(pset *value_table);
+void del_identities(pset *value_table);
 
 /**
  * Add a node to the identities value table.
  */
-void  add_identities(pset *value_table, ir_node *node);
+void add_identities(pset *value_table, ir_node *node);
 
 /**
  * Compare function for two nodes in the hash table. Gets two
@@ -99,10 +86,10 @@ ir_node *optimize_in_place_2(ir_node *n);
  */
 static INLINE tarval *
 value_of(ir_node *n) {
-  if ((n != NULL) && (get_irn_op(n) == op_Const))
-    return get_Const_tarval(n); /* might return tarval_bad */
-  else
-    return tarval_bad;
+       if ((n != NULL) && is_Const(n))
+               return get_Const_tarval(n); /* might return tarval_bad */
+       else
+               return tarval_bad;
 }
 
 /**
@@ -116,4 +103,4 @@ value_of(ir_node *n) {
  */
 ir_op_ops *firm_set_default_operations(ir_opcode code, ir_op_ops *ops);
 
-#endif /* _IROPT_T_H_ */
+#endif