[llvm-commits] [llvm-gcc-4.2] r48795 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Evan Cheng
evan.cheng at apple.com
Tue Mar 25 14:19:13 PDT 2008
Thanks. I expect the default inline limit to be dropped back down to
200 (or perhaps 300) again. gcc -Os inline limit is very small (30 I
think). We may want to set this to something like 100.
Evan
On Mar 25, 2008, at 2:03 PM, Devang Patel wrote:
> Author: dpatel
> Date: Tue Mar 25 16:03:41 2008
> New Revision: 48795
>
> URL: http://llvm.org/viewvc/llvm-project?rev=48795&view=rev
> Log:
> Reduce inlining threshold when optimizing for size.
>
> Modified:
> llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
>
> 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=48795&r1=48794&r2=48795&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
> +++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Tue Mar 25 16:03:41 2008
> @@ -128,6 +128,9 @@
> Args.push_back("--debug-pass=Structure");
> if (flag_debug_pass_arguments)
> Args.push_back("--debug-pass=Arguments");
> + if (optimize_size)
> + //Reduce inline limit. Default limit is 400.
> + Args.push_back("--inline-threshold=200");
>
> // If there are options that should be passed through to the LLVM
> backend
> // directly from the command line, do so now. This is mainly for
> debugging
> @@ -204,6 +207,7 @@
> void performLateBackendInitialization(void) {
> // The Ada front-end sets flag_exceptions only after processing
> the file.
> ExceptionHandling = flag_exceptions;
> + OptimizeForSize = optimize_size;
> }
>
> void llvm_lang_dependent_init(const char *Name) {
> @@ -423,6 +427,7 @@
> }
>
> // Normal mode, emit a .s file by running the code generator.
> + // Note, this also adds codegenerator level optimization passes.
> switch (TheTarget->addPassesToEmitFile(*PM, *AsmOutStream,
>
> TargetMachine::AssemblyFile,
> /*FAST*/optimize == 0)) {
>
>
> _______________________________________________
> 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