Commit 740f35a0 by Daniel Berlin Committed by Daniel Berlin

invoke.texi: Add description of max-gcse-passes param.


2001-06-26  Daniel Berlin  <dan@cgsoftware.com>

	* doc/invoke.texi: Add description of max-gcse-passes param.

	* gcse.c (gcse_main): Use MAX_GCSE_PASSES instead of MAX_PASSES.
	(MAX_PASSES): Remove now unneeded macro.

	* params.h (MAX_GCSE_PASSES): New macro, to get parameter value of
	max-gcse-passes param.

	* params.def (PARAM_MAX_GCSE_PASSES): New parameter, controlling
	maximum number of GCSE passes to run. Defaults to 1 (which is what
	MAX_PASSES in gcse.c used to be).

From-SVN: r43610
parent e63fc7bd
2001-06-26 Daniel Berlin <dan@cgsoftware.com>
* doc/invoke.texi: Add description of max-gcse-passes param.
* gcse.c (gcse_main): Use MAX_GCSE_PASSES instead of MAX_PASSES.
(MAX_PASSES): Remove now unneeded macro.
* params.h (MAX_GCSE_PASSES): New macro, to get parameter value of
max-gcse-passes param.
* params.def (PARAM_MAX_GCSE_PASSES): New parameter, controlling
maximum number of GCSE passes to run. Defaults to 1 (which is what
MAX_PASSES in gcse.c used to be).
2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk> 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
* system.h (TARGET_ESC): Move to ... * system.h (TARGET_ESC): Move to ...
......
...@@ -3784,6 +3784,9 @@ order to perform the global common subexpression elimination ...@@ -3784,6 +3784,9 @@ order to perform the global common subexpression elimination
optimization. If more memory than specified is required, the optimization. If more memory than specified is required, the
optimization will not be done. optimization will not be done.
@item max-gcse-passes
The maximum number of passes of GCSE to run.
@item max-inline-insns @item max-inline-insns
If an function contains more than this many instructions, it If an function contains more than this many instructions, it
will not be inlined. This option is precisely equivalent to will not be inlined. This option is precisely equivalent to
......
...@@ -166,9 +166,6 @@ Boston, MA 02111-1307, USA. */ ...@@ -166,9 +166,6 @@ Boston, MA 02111-1307, USA. */
#define obstack_chunk_alloc gmalloc #define obstack_chunk_alloc gmalloc
#define obstack_chunk_free free #define obstack_chunk_free free
/* Maximum number of passes to perform. */
#define MAX_PASSES 1
/* Propagate flow information through back edges and thus enable PRE's /* Propagate flow information through back edges and thus enable PRE's
moving loop invariant calculations out of loops. moving loop invariant calculations out of loops.
...@@ -232,7 +229,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -232,7 +229,7 @@ Boston, MA 02111-1307, USA. */
substitutions. substitutions.
PRE is quite expensive in complicated functions because the DFA can take PRE is quite expensive in complicated functions because the DFA can take
awhile to converge. Hence we only perform one pass. Macro MAX_PASSES can awhile to converge. Hence we only perform one pass. The parameter max-gcse-passes can
be modified if one wants to experiment. be modified if one wants to experiment.
********************** **********************
...@@ -810,7 +807,7 @@ gcse_main (f, file) ...@@ -810,7 +807,7 @@ gcse_main (f, file)
max_pass_bytes = 0; max_pass_bytes = 0;
gcse_obstack_bottom = gcse_alloc (1); gcse_obstack_bottom = gcse_alloc (1);
changed = 1; changed = 1;
while (changed && pass < MAX_PASSES) while (changed && pass < MAX_GCSE_PASSES)
{ {
changed = 0; changed = 0;
if (file) if (file)
......
...@@ -74,7 +74,11 @@ DEFPARAM(PARAM_MAX_GCSE_MEMORY, ...@@ -74,7 +74,11 @@ DEFPARAM(PARAM_MAX_GCSE_MEMORY,
"max-gcse-memory", "max-gcse-memory",
"The maximum amount of memory to be allocated by GCSE", "The maximum amount of memory to be allocated by GCSE",
50 * 1024 * 1024) 50 * 1024 * 1024)
/* The number of repetitions of copy/const prop and PRE to run. */
DEFPARAM(PARAM_MAX_GCSE_PASSES,
"max-gcse-passes",
"The maximum number of passes to make when doing GCSE",
1)
/* /*
Local variables: Local variables:
mode:c mode:c
......
...@@ -92,5 +92,6 @@ typedef enum compiler_param ...@@ -92,5 +92,6 @@ typedef enum compiler_param
PARAM_VALUE (PARAM_MAX_DELAY_SLOT_LIVE_SEARCH) PARAM_VALUE (PARAM_MAX_DELAY_SLOT_LIVE_SEARCH)
#define MAX_GCSE_MEMORY \ #define MAX_GCSE_MEMORY \
((size_t) PARAM_VALUE (PARAM_MAX_GCSE_MEMORY)) ((size_t) PARAM_VALUE (PARAM_MAX_GCSE_MEMORY))
#define MAX_GCSE_PASSES \
PARAM_VALUE (PARAM_MAX_GCSE_PASSES)
#endif /* ! GCC_PARAMS_H */ #endif /* ! GCC_PARAMS_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment