From: Daniel Dunbar Date: Tue, 10 Nov 2009 18:24:37 +0000 (+0000) Subject: Add a monstrous hack to improve X86ISelDAGToDAG compile time. X-Git-Tag: android-x86-6.0-r1~1003^2~13103 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5da58851e55beb97de0c88286c10431f9b5cd141;p=android-x86%2Fexternal-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86695 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index 80cf3866ab8..2608365e58b 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -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"