[llvm-commits] [llvm] r86695 - /llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp

Kenneth Uildriks kennethuil at gmail.com
Tue Nov 10 10:32:41 PST 2009


On Tue, Nov 10, 2009 at 12:24 PM, Daniel Dunbar <daniel at zuster.org> wrote:
> Author: ddunbar
> Date: Tue Nov 10 12:24:37 2009
> New Revision: 86695
>
> URL: http://llvm.org/viewvc/llvm-project?rev=86695&view=rev
> Log:
> Add a monstrous hack to improve X86ISelDAGToDAG compile time.
>  - Force NDEBUG on in any Release build. This drops the compile time to ~100s
>   from ~600s, in Release mode.
>
>  - This may just be a temporary workaround, I don't know the true nature of the
>   gcc-4.2 compile time performance problem.
>
> Modified:
>    llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
>
> Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=86695&r1=86694&r2=86695&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Nov 10 12:24:37 2009
> @@ -12,6 +12,14 @@
>  //
>  //===----------------------------------------------------------------------===//
>
> +// Force NDEBUG on in any optimized build on Darwin.
> +//
> +// FIXME: This is a huge hack, to work around ridiculously awful compile times
> +// on this file with gcc-4.2 on Darwin, in Release mode.
> +#if defined(__APPLE__) && defined(__OPTIMIZE__) && !defined(NDEBUG)
> +#define NDEBUG
> +#endif
> +
>  #define DEBUG_TYPE "x86-isel"
>  #include "X86.h"
>  #include "X86InstrBuilder.h"
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>

gcc 4.3.2 on Linux x86 and gcc 3.4.4 on cygwin also take an awfully
long time to compile that particularly long file.  Is there something
special about Darwin, or would that hack work safely on other
platforms?




More information about the llvm-commits mailing list