[polly] r203952 - (Make) Build a single monolithic LLVMPolly.so

Andreas Simbuerger simbuerg at fim.uni-passau.de
Fri Mar 14 11:02:06 PDT 2014


Author: simbuerg
Date: Fri Mar 14 13:02:06 2014
New Revision: 203952

URL: http://llvm.org/viewvc/llvm-project?rev=203952&view=rev
Log:
(Make) Build a single monolithic LLVMPolly.so

This reverts the broken modularized build.

This builds the classic loadable module. The separation
of library and plugin is yet to be done in a future patch.

Modified:
    polly/trunk/lib/Makefile

Modified: polly/trunk/lib/Makefile
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Makefile?rev=203952&r1=203951&r2=203952&view=diff
==============================================================================
--- polly/trunk/lib/Makefile (original)
+++ polly/trunk/lib/Makefile Fri Mar 14 13:02:06 2014
@@ -8,102 +8,79 @@ LEVEL :=..
 LIBRARYNAME=LLVMPolly
 LOADABLE_MODULE = 1
 
-include $(LEVEL)/Makefile.config
+# TODO: Export symbols for RTTI or EH?
 
 CPP.Flags += $(POLLY_INC)
+LD.Flags += $(POLLY_LD) $(POLLY_LIB)
 
-DIRS = Exchange
-USEDLIBS = pollyexchange.a
-
-DIRS += Analysis
-USEDLIBS += pollyanalysis.a
-
-DIRS += CodeGen
-USEDLIBS += pollycodegen.a
-
-# This needs to  be added after the files that use it, otherwise some functions
-# from pollysupport are not available. They will be eliminated if they are
-# not used at the time of linking pollysupport.a
-DIRS += Support
-USEDLIBS += pollysupport.a
-
-DIRS += JSON
-USEDLIBS += pollyjson.a
+LIBS += $(POLLY_LD) $(POLLY_LIB)
 
-DIRS += Transform
-USEDLIBS += pollytransform.a
+include $(LEVEL)/Makefile.config
 
-# TODO: Export symbols for RTTI or EH?
+# Enable optional source files
+ifeq ($(CLOOG_FOUND), yes)
+CLOOG_FILES= CodeGen/Cloog.cpp \
+	     CodeGen/CodeGeneration.cpp
+endif
+
+ifeq ($(GPU_CODEGEN), yes)
+GPGPU_CODEGEN_FILES= CodeGen/PTXGenerator.cpp
+endif
+
+ifeq ($(PLUTO_FOUND), yes)
+POLLY_PLUTO_FILES= Transform/Pluto.cpp
+endif
+
+ifeq ($(OPENSCOP_FOUND), yes)
+POLLY_OPENSCOP_FILES= Exchange/OpenScopImporter.cpp \
+                      Exchange/OpenScopExporter.cpp
+endif
+
+ifeq ($(SCOPLIB_FOUND), yes)
+POLLY_SCOPLIB_FILES= Exchange/ScopLib.cpp \
+                     Exchange/ScopLibExporter.cpp \
+                     Exchange/ScopLibImporter.cpp \
+		     Transform/Pocc.cpp
+endif
+
+ISL_CODEGEN_FILES= CodeGen/IslAst.cpp \
+                   CodeGen/IslCodeGeneration.cpp
+
+POLLY_JSON_FILES= JSON/json_reader.cpp \
+		  JSON/json_value.cpp \
+		  JSON/json_writer.cpp
+
+SOURCES= Polly.cpp \
+	 Support/GICHelper.cpp \
+	 Support/SCEVValidator.cpp \
+	 Support/RegisterPasses.cpp \
+	 Support/ScopHelper.cpp \
+	 Analysis/Dependences.cpp \
+	 Analysis/ScopDetection.cpp \
+	 Analysis/ScopInfo.cpp \
+	 Analysis/ScopGraphPrinter.cpp \
+	 Analysis/ScopPass.cpp \
+	 Analysis/TempScopInfo.cpp \
+	 CodeGen/BlockGenerators.cpp \
+	 CodeGen/LoopGenerators.cpp \
+	 CodeGen/IRBuilder.cpp \
+	 CodeGen/Utils.cpp \
+	 Exchange/JSONExporter.cpp \
+	 Transform/Canonicalization.cpp \
+	 Transform/CodePreparation.cpp \
+	 Transform/DeadCodeElimination.cpp \
+	 Transform/IndependentBlocks.cpp \
+	 Transform/IndVarSimplify.cpp \
+	 Transform/ScheduleOptimizer.cpp \
+	 ${GPGPU_FILES} \
+	 ${ISL_CODEGEN_FILES} \
+         ${CLOOG_FILES} \
+	 ${POLLY_JSON_FILES} \
+	 ${POLLY_OPENSCOP_FILES} \
+	 ${POLLY_PLUTO_FILES} \
+	 ${POLLY_SCOPLIB_FILES}
 
 #
 # Include Makefile.common so we know what to do.
 #
 include $(LEVEL)/Makefile.common
-
-LIBS += $(POLLY_LD) $(POLLY_LIB)
-
-$(LibDir)/libpollyanalysis.a : $(LibDir)/.dir $(PROJ_OBJ_DIR)/Analysis/$(BuildMode)/.dir \
-                               $(PROJ_SRC_DIR)/Analysis/*
-	$(Verb) if [ -d $(PROJ_SRC_DIR)/Analysis ]; then\
-    if ([ ! -f Analysis/Makefile ] || \
-        command test Analysis/Makefile -ot $(PROJ_SRC_DIR)/Analysis/Makefile ); then \
-      $(MKDIR) Analysis; \
-      $(CP) $(PROJ_SRC_DIR)/Analysis/Makefile Analysis/Makefile; \
-    fi; \
-    ($(MAKE) -C Analysis $@ ) || exit 1; \
-  fi
-
-$(LibDir)/libpollycodegen.a : $(LibDir)/.dir $(PROJ_OBJ_DIR)/CodeGen/$(BuildMode)/.dir \
-                               $(PROJ_SRC_DIR)/CodeGen/*
-	$(Verb) if [ -d $(PROJ_SRC_DIR)/CodeGen ]; then\
-    if ([ ! -f CodeGen/Makefile ] || \
-        command test CodeGen/Makefile -ot $(PROJ_SRC_DIR)/CodeGen/Makefile ); then \
-      $(MKDIR) CodeGen; \
-      $(CP) $(PROJ_SRC_DIR)/CodeGen/Makefile CodeGen/Makefile; \
-    fi; \
-    ($(MAKE) -C CodeGen $@ ) || exit 1; \
-  fi
-
-$(LibDir)/libpollyexchange.a : $(LibDir)/.dir $(PROJ_OBJ_DIR)/Exchange/$(BuildMode)/.dir \
-                               $(PROJ_SRC_DIR)/Exchange/*
-	$(Verb) if [ -d $(PROJ_SRC_DIR)/Exchange ]; then\
-    if ([ ! -f Exchange/Makefile ] || \
-        command test Exchange/Makefile -ot $(PROJ_SRC_DIR)/Exchange/Makefile ); then \
-      $(MKDIR) Exchange; \
-      $(CP) $(PROJ_SRC_DIR)/Exchange/Makefile Exchange/Makefile; \
-    fi; \
-    ($(MAKE) -C Exchange $@ ) || exit 1; \
-  fi
-
-$(LibDir)/libpollysupport.a : $(LibDir)/.dir $(PROJ_OBJ_DIR)/Support/$(BuildMode)/.dir \
-                              $(PROJ_SRC_DIR)/Support/*
-	$(Verb) if [ -d $(PROJ_SRC_DIR)/Support ]; then\
-    if ([ ! -f Support/Makefile ] || \
-        command test Support/Makefile -ot $(PROJ_SRC_DIR)/Support/Makefile ); then \
-      $(MKDIR) Support; \
-      $(CP) $(PROJ_SRC_DIR)/Support/Makefile Support/Makefile; \
-    fi; \
-    ($(MAKE) -C Support $@ ) || exit 1; \
-  fi
-
-$(LibDir)/libpollyjson.a : $(LibDir)/.dir $(PROJ_OBJ_DIR)/JSON/$(BuildMode)/.dir \
-                              $(PROJ_SRC_DIR)/JSON/*
-	$(Verb) if [ -d $(PROJ_SRC_DIR)/JSON ]; then\
-    if ([ ! -f JSON/Makefile ] || \
-        command test JSON/Makefile -ot $(PROJ_SRC_DIR)/JSON/Makefile ); then \
-      $(MKDIR) JSON; \
-      $(CP) $(PROJ_SRC_DIR)/JSON/Makefile JSON/Makefile; \
-    fi; \
-    ($(MAKE) -C JSON $@ ) || exit 1; \
-  fi
-
-$(LibDir)/libpollytransform.a : $(LibDir)/.dir $(PROJ_OBJ_DIR)/Transform/$(BuildMode)/.dir \
-                              $(PROJ_SRC_DIR)/Transform/*
-	$(Verb) if [ -d $(PROJ_SRC_DIR)/Transform ]; then\
-    if ([ ! -f Transform/Makefile ] || \
-        command test Transform/Makefile -ot $(PROJ_SRC_DIR)/Transform/Makefile ); then \
-      $(MKDIR) Transform; \
-      $(CP) $(PROJ_SRC_DIR)/Transform/Makefile Transform/Makefile; \
-    fi; \
-    ($(MAKE) -C Transform $@ ) || exit 1; \
-  fi
\ No newline at end of file





More information about the llvm-commits mailing list