- BugFix: fixed wrong usage of classify_pointer()
[libfirm] / ir / ana / phiclass.c
index f9b4de3..421cef9 100644 (file)
  * @cvsid  $Id$
  * @date   09.08.2005
  */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
 
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
 
 #include "irnode.h"
 #include "debug.h"
@@ -53,12 +49,12 @@ typedef struct _irn_phi_class_t {
        ir_node ***phi_cls; /* the array of node pointers representing the class */
 } irn_phi_class_t;
 
-static INLINE ir_node ***_get_phi_class(ir_phase *ph, ir_node *irn) {
+static inline ir_node ***_get_phi_class(ir_phase *ph, ir_node *irn) {
        irn_phi_class_t *ipc = phase_get_or_set_irn_data(ph, irn);
        return ipc->phi_cls;
 }
 
-static INLINE void _set_phi_class(ir_phase *ph, ir_node *irn, ir_node ***cls) {
+static inline void _set_phi_class(ir_phase *ph, ir_node *irn, ir_node ***cls) {
        irn_phi_class_t *ipc = phase_get_or_set_irn_data(ph, irn);
        ipc->phi_cls = cls;
 }
@@ -217,7 +213,7 @@ pset *get_all_phi_classes(phi_classes_t *pc) {
  * @return The Phi class object for the @p irg.
  */
 phi_classes_t *phi_class_new_from_irg(ir_graph *irg, int pure_phi_classes) {
-       phi_classes_t *res = xmalloc(sizeof(*res));
+       phi_classes_t *res = XMALLOC(phi_classes_t);
 
        FIRM_DBG_REGISTER(res->dbg, "ir.ana.phiclass");
        phase_init(&res->ph, "phi_classes", irg, PHASE_DEFAULT_GROWTH, irn_phi_class_init, NULL);
@@ -236,7 +232,7 @@ phi_classes_t *phi_class_new_from_irg(ir_graph *irg, int pure_phi_classes) {
  * @return The Phis class object for @p all_phis.
  */
 phi_classes_t *phi_class_new_from_set(ir_graph *irg, ir_nodeset_t *all_phis, int pure_phi_classes) {
-       phi_classes_t *res = xmalloc(sizeof(*res));
+       phi_classes_t *res = XMALLOC(phi_classes_t);
 
        FIRM_DBG_REGISTER(res->dbg, "ir.ana.phiclass");
        phase_init(&res->ph, "phi_classes", irg, PHASE_DEFAULT_GROWTH, irn_phi_class_init, NULL);