OSDN Git Service

2006-09-10 Andrew Pinski <pinskia@physics.uc.edu>
[pf3gnuchains/gcc-fork.git] / gcc / see.c
index f56c27b..d20cdf4 100644 (file)
--- a/gcc/see.c
+++ b/gcc/see.c
@@ -533,7 +533,7 @@ struct see_ref_s
   /* The insn of the ref.  */
   rtx insn;
   /* The merged insn that was formed from the reference's insn and extensions.
-     If all merges faile it remains NULL.  */
+     If all merges failed, it remains NULL.  */
   rtx merged_insn;
   /* The def extensions of the reference that were not merged with
      it.  */
@@ -674,6 +674,10 @@ see_get_extension_reg (rtx extension, bool return_dest_reg)
   rtx reg1 = NULL;
   rtx reg2 = NULL;
 
+  /* Parallel pattern for extension not supported for the moment.  */
+  if (GET_CODE (PATTERN (extension)) == PARALLEL)
+    return NULL;
+
   set = single_set (extension);
   if (!set)
     return NULL;
@@ -719,6 +723,10 @@ see_get_extension_data (rtx extension, enum machine_mode *source_mode)
   if (!extension || !INSN_P (extension))
     return UNKNOWN;
 
+  /* Parallel pattern for extension not supported for the moment.  */
+  if (GET_CODE (PATTERN (extension)) == PARALLEL)
+    return NOT_RELEVANT;
+
   set = single_set (extension);
   if (!set)
     return NOT_RELEVANT;
@@ -751,7 +759,7 @@ see_get_extension_data (rtx extension, enum machine_mode *source_mode)
    (the register r on both sides of the set is the same register).
    And recognize it.
    If the recognition failed, this is very bad, return NULL (This will abort
-   the entier optimization).
+   the entire optimization).
    Otherwise, return the generated instruction.  */
 
 static rtx
@@ -1323,9 +1331,8 @@ static void
 see_initialize_data_structures (void)
 {
   /* Build the df object. */
-  df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES |        DF_SUBREGS);
-  df_rd_add_problem (df);
-  /* df_ru_add_problem (df); */
+  df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES | DF_SUBREGS);
+  df_rd_add_problem (df, 0);
   df_chain_add_problem (df, DF_DU_CHAIN | DF_UD_CHAIN);
   df_analyze (df);
 
@@ -2135,7 +2142,7 @@ see_execute_LCM (void)
 /* In this function we set the register properties for the register that is
    defined and extended in the reference.
    The properties are defined in see_register_properties structure which is
-   allocated per basic bloack and per register.
+   allocated per basic block and per register.
    Later the extension is inserted into the see_pre_extension_hash for the next
    phase of the optimization.
 
@@ -2206,7 +2213,7 @@ see_set_prop_merged_def (void **slot, void *b)
 /* In this function we set the register properties for the register that is
    defined but not extended in the reference.
    The properties are defined in see_register_properties structure which is
-   allocated per basic bloack and per register.
+   allocated per basic block and per register.
    Later the extension is inserted into the see_pre_extension_hash for the next
    phase of the optimization.
 
@@ -2277,7 +2284,7 @@ see_set_prop_unmerged_def (void **slot, void *b)
 /* In this function we set the register properties for the register that is used
    in the reference.
    The properties are defined in see_register_properties structure which is
-   allocated per basic bloack and per register.
+   allocated per basic block and per register.
    When a redundant use extension is found it is removed from the hash of the
    reference.
    If the extension is non redundant it is inserted into the
@@ -2332,7 +2339,7 @@ see_set_prop_unmerged_use (void **slot, void *b)
       else if (curr_prop->last_def < 0
               && curr_prop->first_se_before_any_def >= 0)
        {
-         /* In this case the extension is localy redundant.  */
+         /* In this case the extension is locally redundant.  */
          htab_clear_slot (curr_ref_s->use_se_hash, (PTR *)slot);
          locally_redundant = true;
        }
@@ -2342,7 +2349,7 @@ see_set_prop_unmerged_use (void **slot, void *b)
       else if (curr_prop->last_def >= 0
               && curr_prop->first_se_after_last_def >= 0)
        {
-         /* In this case the extension is localy redundant.  */
+         /* In this case the extension is locally redundant.  */
          htab_clear_slot (curr_ref_s->use_se_hash, (PTR *)slot);
          locally_redundant = true;
        }
@@ -2695,7 +2702,7 @@ see_merge_one_use_extension (void **slot, void *b)
    ref:           set (dest_reg) (rhs)
    def_se: set (dest_extension_reg) (sign/zero_extend (source_extension_reg))
 
-   where dest_reg and source_extension_reg can both be subregs (togather)
+   where dest_reg and source_extension_reg can both be subregs (together)
    and (REGNO (dest_reg) == REGNO (source_extension_reg))
 
    The merge is done by generating, simplifying and recognizing the pattern:
@@ -3463,8 +3470,8 @@ see_analyze_one_def (rtx insn, enum machine_mode *source_mode,
         relevant.  Handling this extension as relevant would make things much
         more complicated.  */
       next_insn = NEXT_INSN (insn);
-      if (prev_insn
-         && INSN_P (prev_insn)
+      if (next_insn
+         && INSN_P (next_insn)
          && (see_get_extension_data (next_insn, &next_source_mode) !=
              NOT_RELEVANT))
        {