Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* 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.

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...
commit 57866e05cc07d96f4dbfb1c9369ebae4bd1fa0c6 1 parent 1a34823
jsm28 authored committed
View
12 ChangeLog.csl
@@ -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>
View
4 gcc/common.opt
@@ -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
View
12 gcc/doc/invoke.texi
@@ -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
@@ -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
View
1  gcc/reload.c
@@ -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))
View
2  gcc/varasm.c
@@ -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. */

0 comments on commit 57866e0

Please sign in to comment.
Something went wrong with that request. Please try again.