*** empty log message ***
[libfirm] / ir / ir / iropt.c
index 5b9aee2..ec56f83 100644 (file)
@@ -12,6 +12,9 @@
 # include "irvrfy.h"
 # include "tv.h"
 
+/* Make types visible to allow most efficient access */
+# include "entity_t.h"
+
 /* Trivial inlineable routine for copy propagation.
    Does follow Ids, needed to optimize inlined code. */
 static inline ir_node *
@@ -888,7 +891,7 @@ optimize (ir_node *n)
   tarval *tv;
   ir_node *old_n = n;
 
-  if (!get_optimize()) return NULL;
+  if ((!get_optimize()) && (get_irn_op(n) != op_Phi)) return n;
 
   /* if not optimize return n */
   if (n == NULL) {
@@ -937,7 +940,7 @@ optimize (ir_node *n)
   /* Remove nodes with dead (Bad) input. */
   n = gigo (n);
   /* Now we can verify the node, as it has no dead inputs any more. */
-  ir_vrfy(n);
+  irn_vrfy(n);
 
   /* Now we have a legal, useful node. Enter it in hash table for cse */
   if (get_opt_cse()) {
@@ -1012,7 +1015,7 @@ optimize_in_place (ir_node *n)
   /* Remove nodes with dead (Bad) input. */
   n = gigo (n);
   /* Now we can verify the node, as it has no dead inputs any more. */
-  ir_vrfy(n);
+  irn_vrfy(n);
 
   /* Now we have a legal, useful node. Enter it in hash table for cse */
   if (get_opt_cse()) {