Use backtracking in find_original_value() for the flags emitter.
[libfirm] / ir / be / ia32 / bearch_ia32.c
index 7a50ed6..5923ae9 100644 (file)
@@ -486,7 +486,6 @@ static void ia32_abi_epilogue(void *self, ir_node *bl, ir_node **mem, pmap *reg_
        if (env->flags.try_omit_fp) {
                /* simply remove the stack frame here */
                curr_sp = be_new_IncSP(arch_env->sp, irg, bl, curr_sp, BE_STACK_FRAME_SIZE_SHRINK, 0);
-               add_irn_dep(curr_sp, *mem);
        } else {
                ir_mode *mode_bp = arch_env->bp->reg_class->mode;
 
@@ -630,9 +629,10 @@ static int ia32_get_op_estimated_cost(const ir_node *irn)
                        (we assume they are in cache), other memory operations cost 20
                        cycles.
                */
-               if(is_ia32_use_frame(irn) ||
-                               (is_ia32_NoReg_GP(get_irn_n(irn, 0)) &&
-                        is_ia32_NoReg_GP(get_irn_n(irn, 1)))) {
+               if (is_ia32_use_frame(irn) || (
+                       is_ia32_NoReg_GP(get_irn_n(irn, n_ia32_base)) &&
+                       is_ia32_NoReg_GP(get_irn_n(irn, n_ia32_index))
+                   )) {
                        cost += 5;
                } else {
                        cost += 20;
@@ -927,14 +927,7 @@ static void ia32_before_abi(void *self) {
        }
 }
 
-typedef enum transformer_t {
-       TRANSFORMER_DEFAULT,
-#ifdef FIRM_GRGEN_BE
-       TRANSFORMER_PBQP
-#endif
-} transformer_t;
-
-static transformer_t be_transformer = TRANSFORMER_DEFAULT;
+transformer_t be_transformer = TRANSFORMER_DEFAULT;
 
 /**
  * Transforms the standard firm graph into
@@ -977,7 +970,7 @@ static void ia32_prepare_graph(void *self) {
                        break;
 #endif
 
-               default: panic("Invalid transformer");
+               default: panic("invalid transformer");
        }
 
        /* do local optimizations (mainly CSE) */
@@ -1884,8 +1877,7 @@ static void ia32_get_call_abi(const void *self, ir_type *method_type,
                cc = cc_cdecl_set;
        } else {
                cc = get_method_calling_convention(method_type);
-               if (!(cc & cc_fixed)                                                     &&
-                   get_method_additional_properties(method_type) & mtp_property_private &&
+               if (get_method_additional_properties(method_type) & mtp_property_private &&
                    ia32_cg_config.optimize_cc) {
                        /* set the calling conventions to register parameter */
                        cc = (cc & ~cc_bits) | cc_reg_param;