Commit graph

97 commits

Author SHA1 Message Date
Dale Weiler
092067482f added -fdefault-eraseable which is the same as adding [[eraseable]] to all definitions
instead the opposite behavior can be controlled with [[noerase]] attribute
2018-05-09 21:18:37 -04:00
Dale Weiler
def1a26b12 Add -Wunused-component like -Wunused-variable but warns about unused components of vector 2016-11-24 14:52:57 +00:00
Dale Weiler
a7b45ea14d More cleanup 2015-01-13 21:46:52 -05:00
Dale Weiler
b5ac2745d6 Remove license headers. The LICENSE file is sufficent 2015-01-13 21:38:40 -05:00
Dale Weiler
a77797d6a6 Remove spelling corrector 2015-01-13 19:48:57 -05:00
Wolfgang Bumiller
3df51c5979 adding -fsplit-vector-parameters, todo: float-lookup should get optimized as commented 2014-10-18 13:49:13 +02:00
Dale Weiler
2208136403 Implement support for indirect macro expansions in the preprocessor. This closes #36 2014-09-27 01:48:03 -04:00
Dale Weiler
53e9ed0d96 Merge branch 'arithmetic_exceptions' into cooking
Conflicts:
	doc/gmqcc.1
	gmqcc.ini.example
	opts.def
	parser.c
2014-05-25 03:01:47 -04:00
Dale Weiler
bbeb2517c0 Arithmetic exception flag and a plethora of tests. 2014-05-24 10:38:02 -04:00
Dale Weiler
6424ebaf98 Perliminary work on arithmetic exception handling in the constant evaluator. We can safely check for arithmetic underflow, overflow, divison by zero and inexactness now. Inexactness of expressions are propagated through the AST such that using an inexact value in a comparison will trigger a warning with -Winexact-compares. 2014-05-24 09:53:38 -04:00
Wolfgang Bumiller
8dafdfc5e2 use INSTR_STATE by default, add -femulate-state to switch to emulation, and -state-fps=NUM to set its emulation FPS 2014-04-08 14:34:55 +02:00
Wolfgang Bumiller
4ff68e07e8 Adding coverage support:
The -coverage option causes all values have AST_FLAG_BLOCK_COVERAGE
set by default.
The coverage attribute can be used to control coverage:
It takes an optional list of coverage types, currently only "block"
and "none" is recognized.
[[coverage]] defaults to [[coverage(block)]].
Use [[coverage(none)]] or [[coverage()]] to disable.
2014-01-07 14:36:00 +01:00
Dale Weiler
a934e0fe4b Happy new year! 2014-01-01 06:24:16 -05:00
Dale Weiler
6a44b72db3 Mask ftepp math constants with a compiler flag 2013-12-01 10:45:43 -05:00
Dale Weiler
292c8150b4 Resolve undefined functions to compiler builtins if they exist. 2013-11-23 06:57:40 -05:00
Dale Weiler
90824c2093 Add seperate warning flag for directive in macro. 2013-09-30 15:59:36 -04:00
Dale Weiler
73eca0848c Fix QuakeWorld compilation by treating assignment to constants as a warning when -std=qcc. 2013-09-24 07:31:53 -04:00
Dale Weiler
94e477e466 Added -progsrc commandline switch to specify progs.src files of different names. Cleaned up xonotic export script, fixed check-doc on linux systems by disabling mandoc check. 2013-09-12 17:06:20 -04:00
Rudolf Polzer
f4f805f4c9 New options: -ftypeless-stores and -fsort-operands
These flags reduce entropy, but not size, of the generated assembly
code. This helps compressability of the files.

Additionally, -ftypeless-stores might SLIGHTLY improve engine
performance due to less instructions being used (so branch prediction
might work better). Probably cannot be measured though.

Signed-off-by: Rudolf Polzer <divverent@xonotic.org>
2013-08-27 09:55:00 +02:00
Dale Weiler
91c7209146 Track constant folds in opts_optimization list .. this could be handled better I assume. 2013-08-15 03:45:50 +00:00
Dale Weiler
6f749d61b1 Added -Oconst-fold-dce (dead code elimination optimization for when constant expressions form the basis of the dead code, i.e if else with constant expression). Fixed deps and added documentation. Cleaned up folds for ir_value (can now use the same macros as the ast_value ones). 2013-08-01 07:07:59 +00:00
Dale Weiler
e6c1d66c35 Merge branch 'master' into cooking
Conflicts:
	opts.def
2013-06-17 20:14:26 +00:00
Dale Weiler
23cb7f4e09 Fix some bugs 2013-06-17 20:11:37 +00:00
Wolfgang Bumiller
179da9241c working on vararg piping: detecting several error cases, adding -Wunsafe-types and -funsafe-varargs 2013-06-15 09:46:44 +02:00
Dale Weiler
121e080697 Guart statistics by option. 2013-06-02 00:07:54 +00:00
Dale Weiler
6d6a2efada Experimental support for implicit return assignments. This closes #107. To enable return assignment support use -freturn-assignments. This allows you to do the following in QC code. T name() { return = expr_eval_T; return; /* returns expr_eval_T */ }. It allows for concise code and to rid locals in functions. It also saves a tremendous amount of space since only types of certian globals need to be allocated for returns. 2013-05-29 11:13:42 +00:00
Dale Weiler
68ca2c4962 Pushing the -fexpressions-for-builtins stuff and the modff for catching fractional-part builtin numbers. 2013-04-25 17:08:02 +00:00
Dale Weiler
f2b21158d8 Rewrote memory tracking, now prints highest water mark (most used memory at a given time during compile). Changes all byte representation to MB representation. Added ability to print the contents of the leaked memory to the console when -debug is on (infact the lost messages only print during -debug), -memchk simply reports the memory info at the end (it is also printed when -debug). You can set the memory dump columns with -memdumpcols=# where # is the number of columns you want (default is 16) 2013-04-15 20:54:53 +00:00
Wolfgang Bumiller
ce8b595ff2 Yes, that's what you are SUPPOSED to do in this case: ERROR, not default to crap 2013-02-04 00:20:41 +01:00
Wolfgang Bumiller
46892daa3a Reverting this awful unmaintainable mess of option description system 2013-02-04 00:19:56 +01:00
Dale Weiler
ebd6a1ae95 Document the options in the opts.def file 2013-01-30 06:04:34 +00:00
Dale Weiler
d201cfe6b4 Work in progress options cleanup. 2013-01-30 05:24:30 +00:00
Dale Weiler
6c4c373089 Print off the documentation when -[f/W/O]help, also fixed some of the descriptions for flags. 2013-01-30 04:22:13 +00:00
Dale Weiler
480b2fc7b6 Added documentation to all options inside the binary itself. These will be used later for "man/nroff -man"-like documentation on OSs that lack "man" and the concept of system wide documentation. Also it will be nice to add -Wsome_warning help (to get some help about a specific warning/error, etc). 2013-01-30 02:56:58 +00:00
Dale Weiler
76614b311e s/WARN_PREPROCESSOR/WARN_CPP/g (to stay somewhat compatible with gcc/clang warnings for the preprocessor) 2013-01-30 01:32:10 +00:00
Dale Weiler
d61172598e Removed -Wcpp (not needed any more) 2013-01-30 01:26:51 +00:00
Wolfgang Bumiller
ad7059156a now moving -Ocall-stores to -O3 2013-01-25 16:25:59 +01:00
Wolfgang Bumiller
3c8ce7c866 moving -Ocall-stores to -O4 until the vehicle issue is solved 2013-01-25 16:03:16 +01:00
Wolfgang Bumiller
d12e6e15c9 -flegacy-vector-maths, enabled by default 2013-01-14 11:15:06 +01:00
Wolfgang Bumiller
e0504ce482 This undef was missing there... 2013-01-13 17:37:09 +01:00
Wolfgang Bumiller
3652a122ed Removed -fenhanced-diagnostics - it's now --correct, which makes sense since it doesn't affect the compilation process itself 2013-01-12 17:10:07 +01:00
Wolfgang Bumiller
4df6d1e028 guarding vararg code by -fvariadic-args 2013-01-12 16:28:04 +01:00
Wolfgang Bumiller
4f7113116d -Wall now does not set -Wuninitialized-global 2013-01-09 20:39:17 +01:00
Wolfgang Bumiller
7d4340469e So it wasn't _reall_ the optimization... it just made it easier. -Olocal-temps -> -O3 2013-01-08 21:23:38 +01:00
Wolfgang Bumiller
4c05230cb3 Seems like there's still a problem with it - -Olocal-temps back up to -O4 2013-01-07 20:27:50 +01:00
Wolfgang Bumiller
debfe136a5 Moving -Olocal-temps back to -O3 2013-01-07 14:55:42 +01:00
Wolfgang Bumiller
cbb91c2026 moving -Olocal-temps to -O4 until the issues are solved 2013-01-07 12:58:56 +01:00
Dale Weiler
793547a132 Implemented -f[no]enhanced-diagnostics, to enable/disable the usage of enhanced diagnostics. 2013-01-04 12:07:42 +00:00
Dale Weiler
29db4a44ed Happy new years! 2013-01-01 05:08:55 +00:00
Wolfgang Bumiller
d47da25b82 Changing -Wtoo-few-parameters to -Winvalid-parameter-count; removing hardcoded COMPILER_GMQCC code which makes invalid parameter counts an error and instead make -std=gmqcc imply -Werror-invalid-parameter-count 2012-12-31 12:29:25 +01:00