[llvm-commits] [llvm-gcc-4.2] r93625 - in /llvm-gcc-4.2/trunk/gcc: config/arm/arm.c config/bfin/bfin.c config/i386/i386.c llvm-backend.cpp
Evan Cheng
evan.cheng at apple.com
Tue Jan 19 18:28:04 PST 2010
Hi Bill,
Rather than having a target option, perhaps this should be a scheduling heuristic, i.e. -pre-RA-sched=source? The SDNode ordering bookkeeping looks pretty cheap so perhaps it should always be tracked. That way, it may be used as a late scheduling tie breaker even if -fno-schedule-insns is not specified.
Anyway --disable-scheduling isn't a right name. -fno-schedule-insns should disable pre- regalloc scheduling, we should hook up -fno-schedule-insns2 to disable post- regalloc scheduling.
Evan
On Jan 15, 2010, at 6:10 PM, Bill Wendling wrote:
> Author: void
> Date: Fri Jan 15 20:10:12 2010
> New Revision: 93625
>
> URL: http://llvm.org/viewvc/llvm-project?rev=93625&view=rev
> Log:
> Make the "-fno-schedule-insns" invoke the "--disable-scheduling" flag in
> LLVM. The scheduler is turned off in GCC for many many things. Ignore it when it
> turns these things off. We'll let LLVM determine what's the best strategy here.
>
> Modified:
> llvm-gcc-4.2/trunk/gcc/config/arm/arm.c
> llvm-gcc-4.2/trunk/gcc/config/bfin/bfin.c
> llvm-gcc-4.2/trunk/gcc/config/i386/i386.c
> llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
>
> Modified: llvm-gcc-4.2/trunk/gcc/config/arm/arm.c
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/arm.c?rev=93625&r1=93624&r2=93625&view=diff
>
> ==============================================================================
> --- llvm-gcc-4.2/trunk/gcc/config/arm/arm.c (original)
> +++ llvm-gcc-4.2/trunk/gcc/config/arm/arm.c Fri Jan 15 20:10:12 2010
> @@ -1716,11 +1716,15 @@
>
> /* For arm2/3 there is no need to do any scheduling if there is only
> a floating point emulator, or we are doing software floating-point. */
> + /* LLVM LOCAL begin */
> +#ifndef ENABLE_LLVM
> if ((TARGET_SOFT_FLOAT
> || arm_fpu_tune == FPUTYPE_FPA_EMU2
> || arm_fpu_tune == FPUTYPE_FPA_EMU3)
> && (tune_flags & FL_MODE32) == 0)
> flag_schedule_insns = flag_schedule_insns_after_reload = 0;
> +#endif
> + /* LLVM LOCAL end */
>
> if (target_thread_switch)
> {
> @@ -1783,11 +1787,15 @@
>
> /* APPLE LOCAL v7 support. Merge from mainline */
> /* ??? We might want scheduling for thumb2. */
> + /* LLVM LOCAL begin */
> +#ifndef ENABLE_LLVM
> if (TARGET_THUMB && flag_schedule_insns)
> {
> /* Don't warn since it's on by default in -O2. */
> flag_schedule_insns = 0;
> }
> +#endif
> + /* LLVM LOCAL end */
>
> if (optimize_size)
> {
> @@ -23725,10 +23733,14 @@
>
> /* For -O2 and beyond, turn off -fschedule-insns by default. It tends to
> make the problem with not enough registers even worse. */
> + /* LLVM LOCAL begin */
> +#ifndef ENABLE_LLVM
> #ifdef INSN_SCHEDULING
> if (level > 1)
> flag_schedule_insns = 0;
> #endif
> +#endif
> + /* LLVM LOCAL end */
>
> /* radar 4094534. */
> /* The Darwin libraries never set errno, so we might as well
>
> Modified: llvm-gcc-4.2/trunk/gcc/config/bfin/bfin.c
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/bfin/bfin.c?rev=93625&r1=93624&r2=93625&view=diff
>
> ==============================================================================
> --- llvm-gcc-4.2/trunk/gcc/config/bfin/bfin.c (original)
> +++ llvm-gcc-4.2/trunk/gcc/config/bfin/bfin.c Fri Jan 15 20:10:12 2010
> @@ -2004,7 +2004,11 @@
> if (flag_pic && !TARGET_FDPIC && !TARGET_ID_SHARED_LIBRARY)
> flag_pic = 0;
>
> + /* LLVM LOCAL begin */
> +#ifndef ENABLE_LLVM
> flag_schedule_insns = 0;
> +#endif
> + /* LLVM LOCAL end */
>
> init_machine_status = bfin_init_machine_status;
> }
>
> Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.c
> URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/i386.c?rev=93625&r1=93624&r2=93625&view=diff
>
> ==============================================================================
> --- llvm-gcc-4.2/trunk/gcc/config/i386/i386.c (original)
> +++ llvm-gcc-4.2/trunk/gcc/config/i386/i386.c Fri Jan 15 20:10:12 2010
> @@ -2226,8 +2226,12 @@
> /* When scheduling description is not available, disable scheduler pass
> so it won't slow down the compilation and make x87 code slower. */
> /* APPLE LOCAL 5591571 */
> + /* LLVM LOCAL begin */
> +#ifndef ENABLE_LLVM
> if (1 || !TARGET_SCHEDULE)
> flag_schedule_insns_after_reload = flag_schedule_insns = 0;
> +#endif
> + /* LLVM LOCAL end */
>
> /* APPLE LOCAL begin dynamic-no-pic */
> #if TARGET_MACHO
> @@ -2449,10 +2453,14 @@
> /* APPLE LOCAL end disable strict aliasing; breaks too much existing code. */
> /* For -O2 and beyond, turn off -fschedule-insns by default. It tends to
> make the problem with not enough registers even worse. */
> + /* LLVM LOCAL begin */
> +#ifndef ENABLE_LLVM
> #ifdef INSN_SCHEDULING
> if (level > 1)
> flag_schedule_insns = 0;
> #endif
> +#endif
> + /* LLVM LOCAL end */
>
> /* APPLE LOCAL begin pragma fenv */
> /* Trapping math is not needed by many users, and is expensive.
> @@ -2505,10 +2513,14 @@
> {
> /* For -O2 and beyond, turn off -fschedule-insns by default. It tends to
> make the problem with not enough registers even worse. */
> + /* LLVM LOCAL begin */
> +#ifndef ENABLE_LLVM
> #ifdef INSN_SCHEDULING
> if (level > 1)
> flag_schedule_insns = 0;
> #endif
> +#endif
> + /* LLVM LOCAL end */
>
> /* APPLE LOCAL begin pragma fenv */
> /* Trapping math is not needed by many users, and is expensive.
>
> 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=93625&r1=93624&r2=93625&view=diff
>
> ==============================================================================
> --- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
> +++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Fri Jan 15 20:10:12 2010
> @@ -406,6 +406,8 @@
> Args.push_back("--debug-pass=Arguments");
> if (flag_unwind_tables)
> Args.push_back("--unwind-tables");
> + if (!flag_schedule_insns)
> + Args.push_back("--disable-scheduling");
>
> // 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
>
>
> _______________________________________________
> 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