remove opt_ldst_only_null_ptr_exception
[libfirm] / ir / ir / iropt.c
index 2cce139..ec61a82 100644 (file)
@@ -43,7 +43,6 @@
 #include "irhooks.h"
 #include "irarch.h"
 #include "hashptr.h"
-#include "opt_polymorphy.h"
 #include "irtools.h"
 #include "irhooks.h"
 #include "array_t.h"
@@ -4066,27 +4065,25 @@ static ir_node *transform_node_Minus(ir_node *n)
  */
 static ir_node *transform_node_Proj_Load(ir_node *proj)
 {
-       if (get_opt_ldst_only_null_ptr_exceptions()) {
-               if (get_irn_mode(proj) == mode_X) {
-                       ir_node *load = get_Proj_pred(proj);
+       if (get_irn_mode(proj) == mode_X) {
+               ir_node *load = get_Proj_pred(proj);
 
-                       /* get the Load address */
-                       const ir_node *addr = get_Load_ptr(load);
-                       const ir_node *confirm;
+               /* get the Load address */
+               const ir_node *addr = get_Load_ptr(load);
+               const ir_node *confirm;
 
-                       if (value_not_null(addr, &confirm)) {
-                               if (confirm == NULL) {
-                                       /* this node may float if it did not depend on a Confirm */
-                                       set_irn_pinned(load, op_pin_state_floats);
-                               }
-                               if (get_Proj_proj(proj) == pn_Load_X_except) {
-                                       ir_graph *irg = get_irn_irg(proj);
-                                       DBG_OPT_EXC_REM(proj);
-                                       return new_r_Bad(irg, mode_X);
-                               } else {
-                                       ir_node *blk = get_nodes_block(load);
-                                       return new_r_Jmp(blk);
-                               }
+               if (value_not_null(addr, &confirm)) {
+                       if (confirm == NULL) {
+                               /* this node may float if it did not depend on a Confirm */
+                               set_irn_pinned(load, op_pin_state_floats);
+                       }
+                       if (get_Proj_proj(proj) == pn_Load_X_except) {
+                               ir_graph *irg = get_irn_irg(proj);
+                               DBG_OPT_EXC_REM(proj);
+                               return new_r_Bad(irg, mode_X);
+                       } else {
+                               ir_node *blk = get_nodes_block(load);
+                               return new_r_Jmp(blk);
                        }
                }
        }
@@ -4098,27 +4095,25 @@ static ir_node *transform_node_Proj_Load(ir_node *proj)
  */
 static ir_node *transform_node_Proj_Store(ir_node *proj)
 {
-       if (get_opt_ldst_only_null_ptr_exceptions()) {
-               if (get_irn_mode(proj) == mode_X) {
-                       ir_node *store = get_Proj_pred(proj);
+       if (get_irn_mode(proj) == mode_X) {
+               ir_node *store = get_Proj_pred(proj);
 
-                       /* get the load/store address */
-                       const ir_node *addr = get_Store_ptr(store);
-                       const ir_node *confirm;
+               /* get the load/store address */
+               const ir_node *addr = get_Store_ptr(store);
+               const ir_node *confirm;
 
-                       if (value_not_null(addr, &confirm)) {
-                               if (confirm == NULL) {
-                                       /* this node may float if it did not depend on a Confirm */
-                                       set_irn_pinned(store, op_pin_state_floats);
-                               }
-                               if (get_Proj_proj(proj) == pn_Store_X_except) {
-                                       ir_graph *irg = get_irn_irg(proj);
-                                       DBG_OPT_EXC_REM(proj);
-                                       return new_r_Bad(irg, mode_X);
-                               } else {
-                                       ir_node *blk = get_nodes_block(store);
-                                       return new_r_Jmp(blk);
-                               }
+               if (value_not_null(addr, &confirm)) {
+                       if (confirm == NULL) {
+                               /* this node may float if it did not depend on a Confirm */
+                               set_irn_pinned(store, op_pin_state_floats);
+                       }
+                       if (get_Proj_proj(proj) == pn_Store_X_except) {
+                               ir_graph *irg = get_irn_irg(proj);
+                               DBG_OPT_EXC_REM(proj);
+                               return new_r_Bad(irg, mode_X);
+                       } else {
+                               ir_node *blk = get_nodes_block(store);
+                               return new_r_Jmp(blk);
                        }
                }
        }
@@ -6372,7 +6367,6 @@ void firm_set_default_transform_node(ir_opcode code, ir_op_ops *ops)
        CASE(Phi);
        CASE(Proj);
        CASE(Rotl);
-       CASE(Sel);
        CASE(Shl);
        CASE(Shr);
        CASE(Shrs);
@@ -6634,7 +6628,8 @@ static int node_cmp_attr_Builtin(const ir_node *a, const ir_node *b)
 /** Compares the attributes of two ASM nodes. */
 static int node_cmp_attr_ASM(const ir_node *a, const ir_node *b)
 {
-       int i, n;
+       size_t n;
+       size_t i;
        const ir_asm_constraint *ca;
        const ir_asm_constraint *cb;
        ident **cla, **clb;