[llvm-commits] [dragonegg] r103400 - in /dragonegg/trunk: Makefile gcc_revision_tested_with llvm-backend.cpp
Duncan Sands
baldrick at free.fr
Mon May 10 03:54:39 PDT 2010
Author: baldrick
Date: Mon May 10 05:54:39 2010
New Revision: 103400
URL: http://llvm.org/viewvc/llvm-project?rev=103400&view=rev
Log:
New tested gcc-4.6 version. Supporting this version of gcc-4.6
requires knowing the targeted gcc version, since it has diverged
from gcc-4.5.
Modified:
dragonegg/trunk/Makefile
dragonegg/trunk/gcc_revision_tested_with
dragonegg/trunk/llvm-backend.cpp
Modified: dragonegg/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/Makefile?rev=103400&r1=103399&r2=103400&view=diff
==============================================================================
--- dragonegg/trunk/Makefile (original)
+++ dragonegg/trunk/Makefile Mon May 10 05:54:39 2010
@@ -27,6 +27,9 @@
endif
GCC_PLUGIN_DIR:=$(shell $(GCC) -print-file-name=plugin)
+GCC_VERSION:=$(shell $(GCC) -dumpversion)
+GCC_MAJOR=$(word 1, $(subst ., ,$(GCC_VERSION)))
+GCC_MINOR=$(word 2, $(subst ., ,$(GCC_VERSION)))
TARGET_TRIPLE:=$(shell $(GCC) -dumpmachine)
# NOTE: replace with an informative string when doing a release.
@@ -47,6 +50,7 @@
CPP_OPTIONS+=$(CPPFLAGS) $(shell $(LLVM_CONFIG) --cppflags) \
-MD -MP \
-DIN_GCC -DREVISION=\"$(REVISION)\" \
+ -DGCC_MAJOR=$(GCC_MAJOR) -DGCC_MINOR=$(GCC_MINOR) \
-DTARGET_NAME=\"$(TARGET_TRIPLE)\" \
-I$(SRC_DIR) -I$(GCC_PLUGIN_DIR)/include
Modified: dragonegg/trunk/gcc_revision_tested_with
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/gcc_revision_tested_with?rev=103400&r1=103399&r2=103400&view=diff
==============================================================================
--- dragonegg/trunk/gcc_revision_tested_with (original)
+++ dragonegg/trunk/gcc_revision_tested_with Mon May 10 05:54:39 2010
@@ -1 +1 @@
-158344
+159211
Modified: dragonegg/trunk/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-backend.cpp?rev=103400&r1=103399&r2=103400&view=diff
==============================================================================
--- dragonegg/trunk/llvm-backend.cpp (original)
+++ dragonegg/trunk/llvm-backend.cpp Mon May 10 05:54:39 2010
@@ -92,6 +92,10 @@
#include "llvm-cache.h"
}
+#if (GCC_MAJOR != 4)
+#error Unsupported GCC major version
+#endif
+
// Non-zero if bytecode from PCH is successfully read.
int flag_llvm_pch_read;
@@ -1892,7 +1896,11 @@
}
/// emit_functions - Turn all functions in the compilation unit into LLVM IR.
-static void emit_functions(cgraph_node_set set) {
+static void emit_functions(cgraph_node_set set
+#if (GCC_MINOR > 5)
+ , varpool_node_set vset ATTRIBUTE_UNUSED
+#endif
+ ) {
if (errorcount || sorrycount)
return; // Do not process broken code.
@@ -1947,15 +1955,24 @@
NULL, /* generate_summary */
emit_functions, /* write_summary */
NULL, /* read_summary */
+#if (GCC_MINOR > 5)
+ NULL, /* write_optimization_summary */
+ NULL, /* read_optimization_summary */
+#else
NULL, /* function_read_summary */
+#endif
NULL, /* stmt_fixup */
- 0, /* TODOs */
+ 0, /* function_transform_todo_flags_start */
NULL, /* function_transform */
NULL /* variable_transform */
};
/// emit_variables - Output GCC global variables to the LLVM IR.
-static void emit_variables(cgraph_node_set set) {
+static void emit_variables(cgraph_node_set set
+#if (GCC_MINOR > 5)
+ , varpool_node_set vset ATTRIBUTE_UNUSED
+#endif
+ ) {
if (errorcount || sorrycount)
return; // Do not process broken code.
@@ -1999,7 +2016,12 @@
NULL, /* generate_summary */
emit_variables, /* write_summary */
NULL, /* read_summary */
+#if (GCC_MINOR > 5)
+ NULL, /* write_optimization_summary */
+ NULL, /* read_optimization_summary */
+#else
NULL, /* function_read_summary */
+#endif
NULL, /* stmt_fixup */
0, /* function_transform_todo_flags_start */
NULL, /* function_transform */
@@ -2525,12 +2547,14 @@
pass_info.pos_op = PASS_POS_REPLACE;
register_callback (plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info);
+#if (GCC_MINOR < 6)
// Disable any other LTO passes.
pass_info.pass = &pass_ipa_null.pass;
pass_info.reference_pass_name = "lto_wpa_fixup";
pass_info.ref_pass_instance_number = 0;
pass_info.pos_op = PASS_POS_REPLACE;
register_callback (plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info);
+#endif
// Disable pass_lower_eh_dispatch, which runs after LLVM conversion.
pass_info.pass = &pass_gimple_null.pass;
More information about the llvm-commits
mailing list