Skip to content

Commit

Permalink
* gcc/common.opt (fconstant-pools): New.
Browse files Browse the repository at this point in the history
	* gcc/doc/invoke.texi (-fno-constant-pools): Document.
	* gcc/flags.h (flag_constant_pools): New.
	* gcc/opts.c (common_handle_option): Handle OPT_fconstant_pools.
	* gcc/toplev.c (flag_constant_pools): New.
	* gcc/varasm.c (force_const_mem): Return NULL_RTX for
	-fno-constant-pools.
	* gcc/reload.c (find_reloads): Do not try reloading a constant
	from a constant pool if -fno-constant-pools.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/csl-sol210-3_4-branch@100032 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
jsm28 authored and richlowe committed May 14, 2011
1 parent 1a34823 commit 57866e0
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
12 changes: 12 additions & 0 deletions ChangeLog.csl
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2005-05-20 Joseph S. Myers <joseph@codesourcery.com>

* gcc/common.opt (fconstant-pools): New.
* gcc/doc/invoke.texi (-fno-constant-pools): Document.
* gcc/flags.h (flag_constant_pools): New.
* gcc/opts.c (common_handle_option): Handle OPT_fconstant_pools.
* gcc/toplev.c (flag_constant_pools): New.
* gcc/varasm.c (force_const_mem): Return NULL_RTX for
-fno-constant-pools.
* gcc/reload.c (find_reloads): Do not try reloading a constant
from a constant pool if -fno-constant-pools.

2005-05-05 Michael Pogue <michael.pogue@sun.com>
Joseph S. Myers <joseph@codesourcery.com>

Expand Down
4 changes: 4 additions & 0 deletions gcc/common.opt
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,10 @@ fconserve-stack
Common Var(flag_conserve_stack) Optimization
Do not perform optimizations increasing noticeably stack usage

fconstant-pools
Common Report Var(flag_constant_pools) Init(1)
Put constants in pools in read-only memory if convenient

fcprop-registers
Common Report Var(flag_cprop_registers) Optimization
Perform a register copy-propagation optimization pass
Expand Down
12 changes: 11 additions & 1 deletion gcc/doc/invoke.texi
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ See S/390 and zSeries Options.
-finstrument-functions-exclude-file-list=@var{file},@var{file},@dots{} @gol
-fno-common -fno-ident @gol
-fpcc-struct-return -fpic -fPIC -fpie -fPIE @gol
-fno-jump-tables @gol
-fno-jump-tables -fno-constant-pools @gol
-frecord-gcc-switches @gol
-freg-struct-return -fshort-enums @gol
-fshort-double -fshort-wchar @gol
Expand Down Expand Up @@ -15927,6 +15927,16 @@ building code which forms part of a dynamic linker and cannot
reference the address of a jump table. On some targets, jump tables
do not require a GOT and this option is not needed.

@item -fno-constant-pools
@opindex fno-constant-pools
Do not put constants other than user-declared constant variables in
pools in read-only memory even if this requires constants to be built
up in registers and spilled to the stack. This option is of use in
conjunction with @option{-fpic} or @option{-fPIC} for building code
which forms part of a dynamic linker and cannot reference the address
of a constant pool. It may not work reliably for all code or on all
targets.

@item -ffixed-@var{reg}
@opindex ffixed
Treat the register named @var{reg} as a fixed register; generated code
Expand Down
1 change: 1 addition & 0 deletions gcc/reload.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ a register with any other reload. */
/* True if X is a constant that can be forced into the constant pool. */
#define CONST_POOL_OK_P(X) \
(CONSTANT_P (X) \
&& flag_constant_pools \
&& GET_CODE (X) != HIGH \
&& !targetm.cannot_force_const_mem (X))

Expand Down
2 changes: 1 addition & 1 deletion gcc/varasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3555,7 +3555,7 @@ force_const_mem (enum machine_mode mode, rtx x)
void **slot;

/* If we're not allowed to drop X into the constant pool, don't. */
if (targetm.cannot_force_const_mem (x))
if (!flag_constant_pools || (*targetm.cannot_force_const_mem) (x))
return NULL_RTX;

/* Record that this function has used a constant pool entry. */
Expand Down

0 comments on commit 57866e0

Please sign in to comment.