Commit 82c0180d by Joseph Myers Committed by Joseph Myers

common.opt (fjump-tables): New.

	* common.opt (fjump-tables): New.
	* doc/invoke.texi (-fno-jump-tables): Document.
	* stmt.c (expand_end_case_type): Do not emit jump tables unless
	flag_jump_tables.

From-SVN: r100457
parent 68d8b934
2005-06-01 Joseph S. Myers <joseph@codesourcery.com>
* common.opt (fjump-tables): New.
* doc/invoke.texi (-fno-jump-tables): Document.
* stmt.c (expand_end_case_type): Do not emit jump tables unless
flag_jump_tables.
2005-06-01 Richard Earnshaw <richard.earnshaw@arm.com> 2005-06-01 Richard Earnshaw <richard.earnshaw@arm.com>
* arm.md (bunordered, bordered, bungt, bunlt, bunge, bunle, buneq) * arm.md (bunordered, bordered, bungt, bunlt, bunge, bunle, buneq)
......
...@@ -488,6 +488,10 @@ fivopts ...@@ -488,6 +488,10 @@ fivopts
Common Report Var(flag_ivopts) Init(1) Common Report Var(flag_ivopts) Init(1)
Optimize induction variables on trees Optimize induction variables on trees
fjump-tables
Common Var(flag_jump_tables) Init(1)
Use jump tables for sufficiently large switch statements
fkeep-inline-functions fkeep-inline-functions
Common Report Var(flag_keep_inline_functions) Common Report Var(flag_keep_inline_functions)
Generate code for functions even if they are fully inlined Generate code for functions even if they are fully inlined
......
...@@ -732,6 +732,7 @@ See S/390 and zSeries Options. ...@@ -732,6 +732,7 @@ See S/390 and zSeries Options.
-finhibit-size-directive -finstrument-functions @gol -finhibit-size-directive -finstrument-functions @gol
-fno-common -fno-ident @gol -fno-common -fno-ident @gol
-fpcc-struct-return -fpic -fPIC -fpie -fPIE @gol -fpcc-struct-return -fpic -fPIC -fpie -fPIE @gol
-fno-jump-tables @gol
-freg-struct-return -fshared-data -fshort-enums @gol -freg-struct-return -fshared-data -fshort-enums @gol
-fshort-double -fshort-wchar @gol -fshort-double -fshort-wchar @gol
-fverbose-asm -fpack-struct[=@var{n}] -fstack-check @gol -fverbose-asm -fpack-struct[=@var{n}] -fstack-check @gol
...@@ -12582,6 +12583,15 @@ generated position independent code can be only linked into executables. ...@@ -12582,6 +12583,15 @@ generated position independent code can be only linked into executables.
Usually these options are used when @option{-pie} GCC option will be Usually these options are used when @option{-pie} GCC option will be
used during linking. used during linking.
@item -fno-jump-tables
@opindex fno-jump-tables
Do not use jump tables for switch statements even where it would be
more efficient than other code generation strategies. 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 jump table. On some targets, jump tables
do not require a GOT and this option is not needed.
@item -ffixed-@var{reg} @item -ffixed-@var{reg}
@opindex ffixed @opindex ffixed
Treat the register named @var{reg} as a fixed register; generated code Treat the register named @var{reg} as a fixed register; generated code
......
...@@ -2458,6 +2458,7 @@ expand_case (tree exp) ...@@ -2458,6 +2458,7 @@ expand_case (tree exp)
#ifndef ASM_OUTPUT_ADDR_DIFF_ELT #ifndef ASM_OUTPUT_ADDR_DIFF_ELT
|| flag_pic || flag_pic
#endif #endif
|| !flag_jump_tables
|| TREE_CONSTANT (index_expr) || TREE_CONSTANT (index_expr)
/* If neither casesi or tablejump is available, we can /* If neither casesi or tablejump is available, we can
only go this way. */ only go this way. */
......
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