remove loop_unrolling opt
authorMatthias Braun <matze@braunis.de>
Thu, 6 Mar 2008 17:20:01 +0000 (17:20 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 6 Mar 2008 17:20:01 +0000 (17:20 +0000)
[r18920]

diagnostic.c
driver/firm_cmdline.c
driver/firm_cmdline.h
driver/firm_opt.c
main.c
make_release.sh
symbol.h
symbol_t.h

index bbefc77..02008d9 100644 (file)
@@ -87,7 +87,6 @@ static void diagnosticvf(const char *const fmt, va_list ap)
                                        break;
                                }
 
-#ifndef PPTEST
                                case 'E': {
                                        const expression_t* const expr = va_arg(ap, const expression_t*);
                                        print_expression(expr);
@@ -109,7 +108,6 @@ static void diagnosticvf(const char *const fmt, va_list ap)
                                        print_type_ext(type, sym, NULL);
                                        break;
                                }
-#endif
 
                                case 'K': {
                                        const token_t* const token = va_arg(ap, const token_t*);
index 5bcb2ca..e06fc70 100644 (file)
@@ -24,7 +24,6 @@ struct a_firm_opt firm_opt = {
   /* gvn_pre         = */ FALSE,       /* currently buggy */
   /* cond_eval       = */ FALSE,
   /* if_conversion   = */ FALSE,
-  /* loop_unrolling  = */ FALSE,       /* currently buggy */
   /* func_calls      = */ TRUE,
   /* do_inline       = */ FALSE,
   /* auto_inline     = */ TRUE,
@@ -129,8 +128,6 @@ static const struct params {
   { X("no-cond-eval"),           &firm_opt.cond_eval,        0, "firm: disable partial condition evaluation optimization" },
   { X("if-conv"),                &firm_opt.if_conversion,    1, "firm: enable if-conversion optimization" },
   { X("no-if-conv"),             &firm_opt.if_conversion,    0, "firm: disable if-conversion optimization" },
-  { X("opt-loop-unrolling"),     &firm_opt.loop_unrolling,   1, "firm: enable loop-unrolling optimization" },
-  { X("no-opt-loop-unrolling"),  &firm_opt.loop_unrolling,   0, "firm: disable loop-unrolling optimization" },
   { X("opt-func-call"),          &firm_opt.func_calls,       1, "firm: enable function call optimization" },
   { X("no-opt-func-call"),       &firm_opt.func_calls,       0, "firm: disable function call optimization" },
   { X("reassociation"),          &firm_opt.reassoc,          1, "firm: enable reassociation" },
@@ -287,7 +284,6 @@ static void disable_opts(void) {
   firm_opt.gvn_pre         = FALSE;
   firm_opt.cond_eval       = FALSE;
   firm_opt.if_conversion   = FALSE;
-  firm_opt.loop_unrolling  = FALSE;
   firm_opt.func_calls      = FALSE;
   firm_opt.do_inline       = FALSE;
   firm_opt.auto_inline     = FALSE;
index 9cb0a06..d6816bb 100644 (file)
@@ -37,7 +37,6 @@ struct a_firm_opt {
                                  and partial redundancy elimination */
   a_byte   cond_eval;       /**< enable condition evaluation */
   a_byte   if_conversion;   /**< enable if-conversion */
-  a_byte   loop_unrolling;  /**< enable automatic loop unrolling */
   a_byte   func_calls;      /**< enable function call optimization */
   a_byte   do_inline;       /**< do automatic inlining */
   a_byte   auto_inline;     /**< current automatic inlining state */
index f0cddeb..1cf0253 100644 (file)
@@ -457,14 +457,6 @@ static void do_firm_optimizations(const char *input_filename, int firm_const_exi
       irg_verify(irg, VRFY_ENFORCE_SSA);
     }
 
-    if (firm_opt.loop_unrolling) {
-      timer_push(TV_LOOP_UNROLL);
-        optimize_loop_unrolling(irg);
-      timer_pop();
-      DUMP_ONE_C(firm_dump.ir_graph && firm_dump.all_phases, irg, "loop");
-      CHECK_ONE(firm_opt.check_all, irg);
-       }
-
     if (firm_opt.load_store) {
       timer_push(TV_LOAD_STORE);
         optimize_load_store(irg);
diff --git a/main.c b/main.c
index 2794b90..c2e0bf0 100644 (file)
--- a/main.c
+++ b/main.c
@@ -415,7 +415,6 @@ int main(int argc, char **argv)
                /* fallthrough */
        case 2:
                firm_option("inline");
-               firm_option("no-strength-red");
                firm_option("deconv");
                firm_be_option("omitfp");
                break;
index 3d766ea..157b503 100755 (executable)
@@ -2,7 +2,7 @@
 
 #set -x
 WORKDIR="release"
-VERSION="0.9"
+VERSION="0.9.1"
 RELEASEDIR="cparser-$VERSION"
 FULLRELEASEDIR="$WORKDIR/$RELEASEDIR"
 RELEASEFILE="cparser-$VERSION.tar.bz2"
index 3122158..5ffd4d8 100644 (file)
--- a/symbol.h
+++ b/symbol.h
@@ -20,7 +20,7 @@
 #ifndef SYMBOL_H
 #define SYMBOL_H
 
-typedef struct symbol_t       symbol_t;
-typedef struct pp_definition  pp_definition;
+typedef struct symbol_t         symbol_t;
+typedef struct pp_definition_t  pp_definition_t;
 
 #endif
index 44b9900..df2f226 100644 (file)
 #define SYMBOL_T_H
 
 #include <stdbool.h>
+#include "symbol.h"
 #include "ast.h"
 #include "token_t.h"
 
-struct pp_definition {
+struct pp_definition_t {
+       symbol_t          *symbol;
        source_position_t  source_position;
-       bool               expanding;
+       pp_definition_t   *parent_expansion;
+       size_t             expand_pos;
+       size_t             list_len;
        token_t            replacement_list[];
 };
 
 struct symbol_t {
-       const char     *string;
-       unsigned short  ID;
-       unsigned short  pp_ID;
-       declaration_t  *declaration;
-       pp_definition  *pp_define;
+       const char       *string;
+       unsigned short    ID;
+       unsigned short    pp_ID;
+       declaration_t    *declaration;
+       pp_definition_t  *pp_definition;
 };
 
 #endif