This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch to clarify that -O2 sets -fstrict-aliasing


I thought the documentation could be clarified that -O2 turns on
strict aliasing, so I committed the following to the main branch.  If
desired, I could commit it to the 3.10 branch as well.

2002-03-20  Michael Meissner  <meissner@redhat.com>

	* doc/invoke.texi (Optimize Options): Document that -O2 sets
	-fstrict-aliasing.

*** gcc/doc/invoke.texi.~1~	Wed Mar 13 19:11:21 2002
--- gcc/doc/invoke.texi	Wed Mar 20 17:17:57 2002
*************** perform loop unrolling or function inlin
*** 3170,3179 ****
  As compared to @option{-O}, this option increases both compilation time
  and the performance of the generated code.
  
! @option{-O2} turns on all optional optimizations except for loop unrolling,
! function inlining, and register renaming.  It also turns on the
! @option{-fforce-mem} option on all machines and frame pointer elimination
! on machines where doing so does not interfere with debugging.
  
  Please note the warning under @option{-fgcse} about
  invoking @option{-O2} on programs that use computed gotos.
--- 3170,3180 ----
  As compared to @option{-O}, this option increases both compilation time
  and the performance of the generated code.
  
! @option{-O2} turns on all optional optimizations except for loop
! unrolling, function inlining, and register renaming.  It also turns on
! the @option{-fforce-mem} and @option{-fstrict-aliasing} option on all
! machines and frame pointer elimination on machines where doing so does
! not interfere with debugging.
  
  Please note the warning under @option{-fgcse} about
  invoking @option{-O2} on programs that use computed gotos.
*************** should define a function that computes, 
*** 3715,3720 ****
--- 3716,3724 ----
  node, an alias set for the node.  Nodes in different alias sets are not
  allowed to alias.  For an example, see the C front-end function
  @code{c_get_alias_set}.
+ 
+ For all machines, optimization level 2 and higher enables this flag by
+ default.
  
  @item -falign-functions
  @itemx -falign-functions=@var{n}

-- 
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@the-meissners.org	fax:   +1 978-692-4482


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]