[llvm-commits] [llvm-gcc-4.2] r54231 - in /llvm-gcc-4.2/trunk/gcc: c-opts.c flags.h llvm-backend.cpp
Bill Wendling
isanbard at gmail.com
Wed Jul 30 12:43:25 PDT 2008
Author: void
Date: Wed Jul 30 14:43:25 2008
New Revision: 54231
URL: http://llvm.org/viewvc/llvm-project?rev=54231&view=rev
Log:
Don't use C-specific headers in llvm files
Modified:
llvm-gcc-4.2/trunk/gcc/c-opts.c
llvm-gcc-4.2/trunk/gcc/flags.h
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
Modified: llvm-gcc-4.2/trunk/gcc/c-opts.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-opts.c?rev=54231&r1=54230&r2=54231&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-opts.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-opts.c Wed Jul 30 14:43:25 2008
@@ -660,6 +660,9 @@
case OPT_fbuiltin:
flag_no_builtin = !value;
+#ifdef LLVM
+ flag_no_simplify_libcalls = !value;
+#endif
break;
case OPT_fbuiltin_:
@@ -685,6 +688,9 @@
case OPT_fhosted:
flag_hosted = value;
flag_no_builtin = !value;
+#ifdef LLVM
+ flag_no_simplify_libcalls = !value;
+#endif
/* warn_main will be 2 if set by -Wall, 1 if set by -Wmain */
if (!value && warn_main == 2)
warn_main = 0;
Modified: llvm-gcc-4.2/trunk/gcc/flags.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/flags.h?rev=54231&r1=54230&r2=54231&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/flags.h (original)
+++ llvm-gcc-4.2/trunk/gcc/flags.h Wed Jul 30 14:43:25 2008
@@ -391,6 +391,7 @@
/* LLVM LOCAL begin */
#ifdef ENABLE_LLVM
extern int flag_llvm_pch_read;
+extern int flag_no_simplify_libcalls;
#endif
/* LLVM LOCAL end */
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=54231&r1=54230&r2=54231&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Wed Jul 30 14:43:25 2008
@@ -70,12 +70,14 @@
#include "tree-inline.h"
#include "langhooks.h"
#include "cgraph.h"
-#include "c-common.h"
}
// Non-zero if bytecode from PCH is successfully read.
int flag_llvm_pch_read;
+// Non-zero if libcalls should not be simplified.
+int flag_no_simplify_libcalls;
+
// Global state for the LLVM backend.
Module *TheModule = 0;
DebugInfo *TheDebugInfo = 0;
@@ -381,7 +383,7 @@
PM->add(createFunctionInliningPass()); // Inline small functions
if (optimize > 2)
PM->add(createArgumentPromotionPass()); // Scalarize uninlined fn args
- if (!flag_no_builtin)
+ if (!flag_no_simplify_libcalls)
PM->add(createSimplifyLibCallsPass()); // Library Call Optimizations
PM->add(createInstructionCombiningPass()); // Cleanup for scalarrepl.
PM->add(createJumpThreadingPass()); // Thread jumps.
More information about the llvm-commits
mailing list