[llvm-commits] [llvm-gcc-4.2] r79934 - in /llvm-gcc-4.2/trunk/gcc: doc/invoke.texi llvm-backend.cpp opts.c tree.c tree.h

Chris Lattner clattner at apple.com
Mon Aug 24 14:19:01 PDT 2009


On Aug 24, 2009, at 1:28 PM, Dale Johannesen wrote:

> Author: johannes
> Date: Mon Aug 24 15:28:12 2009
> New Revision: 79934
>
> URL: http://llvm.org/viewvc/llvm-project?rev=79934&view=rev
> Log:
> Revert 79556; Chris wants there to be no user-level
> knob for inlining level.  Document that the gcc
> options won't work.

Thank you Dale, I appreciate it,

-Chris

>
>
> Modified:
>    llvm-gcc-4.2/trunk/gcc/doc/invoke.texi
>    llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
>    llvm-gcc-4.2/trunk/gcc/opts.c
>    llvm-gcc-4.2/trunk/gcc/tree.c
>    llvm-gcc-4.2/trunk/gcc/tree.h
>
> Modified: llvm-gcc-4.2/trunk/gcc/doc/invoke.texi
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/doc/invoke.texi?rev=79934&r1=79933&r2=79934&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm-gcc-4.2/trunk/gcc/doc/invoke.texi (original)
> +++ llvm-gcc-4.2/trunk/gcc/doc/invoke.texi Mon Aug 24 15:28:12 2009
> @@ -5402,6 +5402,12 @@
> abstract measurement of function's size.  In no way does it  
> represent a count
> of assembly instructions and as such its exact meaning might change  
> from one
> release to an another.
> + at c LLVM LOCAL begin
> +This option has no effect in llvm-gcc.  The always_inline and  
> noinline
> +parameters are honored, but none of the other inlining parameters  
> have any
> +effect; there is no specific user control on the amount of inlining  
> done.  The
> +compiler will do less inlining at -O2 or -Os than at -O3.
> + at c LLVM LOCAL end
>
> @item -fkeep-inline-functions
> @opindex fkeep-inline-functions
>
> Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=79934&r1=79933&r2=79934&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
> +++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Mon Aug 24 15:28:12 2009
> @@ -349,28 +349,13 @@
> }
>
> // GuessAtInliningThreshold - Figure out a reasonable threshold to  
> pass llvm's
> -// inliner.  There are 12 user-settable gcc params that affect  
> inlining.  llvm
> -// (so far) only has one knob; the param that corresponds most  
> closely, and
> -// which we use, is max-inline-insns-auto (set by -finline-limit,  
> which is
> -// what most users actually use).  This maps only very  
> approximately to what
> -// llvm's inliner is doing, but it's the best we've got.
> +// inliner.  gcc has many options that control inlining, but we  
> have decided
> +// not to support anything like that for llvm-gcc.
> static unsigned GuessAtInliningThreshold() {
>   unsigned threshold = 200;
> -  // Get the default value for gcc's max-inline-insns-auto.  This  
> is the value
> -  // after all language and target dependent changes to the global  
> default are
> -  // applied, but before parsing the command line.
> -  unsigned default_miia = default_max_inline_insns_auto;
> -  // See if the actual value is the same as the default.
> -  unsigned miia = MAX_INLINE_INSNS_AUTO;
> -  if (miia == default_miia) {
> -    if (optimize_size || optimize < 3)
> -      // Reduce inline limit.
> -      threshold = 50;
> -  } else {
> -    // We have an overriding user-specified value.  Multiply by  
> 20/9, which is
> -    // the Magic Number converting 90 to 200.
> -    threshold = miia * 20 / 9;
> -  }
> +  if (optimize_size || optimize < 3)
> +    // Reduce inline limit.
> +    threshold = 50;
>   return threshold;
> }
>
>
> Modified: llvm-gcc-4.2/trunk/gcc/opts.c
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/opts.c?rev=79934&r1=79933&r2=79934&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm-gcc-4.2/trunk/gcc/opts.c (original)
> +++ llvm-gcc-4.2/trunk/gcc/opts.c Mon Aug 24 15:28:12 2009
> @@ -682,12 +682,6 @@
>   OPTIMIZATION_OPTIONS (optimize, optimize_size);
> #endif
>
> -  /* LLVM LOCAL begin hook up -finline-limit */
> -  /* Remember the value of MAX_INLINE_INSNS_AUTO after applying  
> target-dependent
> -     changes to the defaults, but before command line options are  
> parsed. */
> -  default_max_inline_insns_auto = MAX_INLINE_INSNS_AUTO;
> -  /* LLVM LOCAL end */
> -
>   /* APPLE LOCAL begin AV 3846092 */
>   /* We have apple local patch to disable -fstrict-aliasing when -O2  
> is used.
>      However do not disable it when -ftree-vectorize is used.  
> Clobber its value
>
> Modified: llvm-gcc-4.2/trunk/gcc/tree.c
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree.c?rev=79934&r1=79933&r2=79934&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm-gcc-4.2/trunk/gcc/tree.c (original)
> +++ llvm-gcc-4.2/trunk/gcc/tree.c Mon Aug 24 15:28:12 2009
> @@ -73,13 +73,6 @@
> tree generic_block_literal_struct_type;
> /* APPLE LOCAL end 6353006  */
>
> -/* LLVM LOCAL begin */
> -/* The value of MAX_INLINE_INSNS_AUTO after all target-dependent  
> changes
> -   are applied to the global default (which many targets do), but  
> before
> -   command line flags are handled. */
> -unsigned default_max_inline_insns_auto;
> -/* LLVM LOCAL end */
> -
> /* obstack.[ch] explicitly declined to prototype this.  */
> extern int _obstack_allocated_p (struct obstack *h, void *obj);
>
>
> Modified: llvm-gcc-4.2/trunk/gcc/tree.h
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree.h?rev=79934&r1=79933&r2=79934&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm-gcc-4.2/trunk/gcc/tree.h (original)
> +++ llvm-gcc-4.2/trunk/gcc/tree.h Mon Aug 24 15:28:12 2009
> @@ -4892,10 +4892,4 @@
>
> /* APPLE LOCAL end radar 6300081  */
>
> -/* LLVM LOCAL begin */
> -/* The value of MAX_INLINE_INSNS_AUTO after all target-dependent  
> changes
> -   are applied to the global default (which many targets do), but  
> before
> -   command line flags are handled. */
> -extern unsigned default_max_inline_insns_auto;
> -/* LLVM LOCAL end */
> #endif  /* GCC_TREE_H  */
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list