]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
increment the optimization counter for DCE'd folds, also enable -O3 for compilation.
authorDale Weiler <killfieldengine@gmail.com>
Thu, 1 Aug 2013 14:24:10 +0000 (14:24 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Thu, 1 Aug 2013 14:24:10 +0000 (14:24 +0000)
Makefile
fold.c
gmqcc.h

index b2dc72daca33fefa941f3c4bbb978b26c7dffa29..3396ec68ff088a4e6f96e9405e5401e2196a91cc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ UNAME  ?= $(shell uname)
 CYGWIN  = $(findstring CYGWIN,  $(UNAME))
 MINGW   = $(findstring MINGW32, $(UNAME))
 
-CFLAGS  += -Wall -Wextra -Werror -fno-strict-aliasing $(OPTIONAL)
+CFLAGS  += -O3 -Wall -Wextra -Werror -fno-strict-aliasing $(OPTIONAL)
 ifneq ($(shell git describe --always 2>/dev/null),)
     CFLAGS += -DGMQCC_GITINFO="\"$(shell git describe --always)\""
 endif
diff --git a/fold.c b/fold.c
index 52bedaeae467a3a456256460d386f0dc87b19852..01e6cd0f41d5571c41d44176a37053f815c5c956 100644 (file)
--- a/fold.c
+++ b/fold.c
@@ -634,6 +634,7 @@ int fold_cond(ir_value *condval, ast_function *func, ast_ifthen *branch) {
          * is expanded into the current block for the function.
          */
         func->curblock = elide;
+        ++opts_optimizationcount[OPTIM_CONST_FOLD_DCE];
         return true;
     }
     return -1; /* nothing done */
diff --git a/gmqcc.h b/gmqcc.h
index 25eed13b8dab31e978f1ab25f31ac35a4f42f892..d0cd85edf6b6c62db8d611375bea93870150dd5c 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -745,7 +745,7 @@ GMQCC_WARN
 code_t   *code_init          (void);
 void      code_cleanup       (code_t *);
 uint32_t  code_genstring     (code_t *, const char *string);
-qcint_t     code_alloc_field   (code_t *, size_t qcsize);
+qcint_t   code_alloc_field   (code_t *, size_t qcsize);
 void      code_push_statement(code_t *, prog_section_statement_t *stmt, int linenum);
 void      code_pop_statement (code_t *);