From reid at x10sys.com Mon Oct 25 03:18:57 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 25 Oct 2004 03:18:57 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200410250818.DAA25235@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.124 -> 1.125 --- Log message: Add a check for the tar program. --- Diffs of the changes: (+1 -0) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.124 llvm/autoconf/configure.ac:1.125 --- llvm/autoconf/configure.ac:1.124 Thu Oct 14 13:59:09 2004 +++ llvm/autoconf/configure.ac Mon Oct 25 03:18:47 2004 @@ -203,6 +203,7 @@ AC_PROG_FLEX AC_PROG_BISON AC_PROG_LIBTOOL +AC_PATH_PROG(TAR,[tar],[gtar]) dnl Checks for tools we can get away with not having: AC_PATH_PROG(DOT,[dot],[true dot]) From reid at x10sys.com Mon Oct 25 03:18:58 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 25 Oct 2004 03:18:58 -0500 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200410250818.DAA25238@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.130 -> 1.131 --- Log message: Add a check for the tar program. --- Diffs of the changes: (+42 -1) Index: llvm/configure diff -u llvm/configure:1.130 llvm/configure:1.131 --- llvm/configure:1.130 Thu Oct 14 13:59:42 2004 +++ llvm/configure Mon Oct 25 03:18:47 2004 @@ -473,7 +473,7 @@ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS subdirs INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVMGCCDIR ARCH CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC CPP ifGNUmake LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL DOT ETAGS ETAGSFLAGS PYTHON QMTEST HAVE_ZLIB HAVE_BZIP2 ENDIAN ALLOCA MMAP_FILE ENABLE_OPTIMIZED JIT LLVMCC1 LLVMCC1PLUS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLVM_IN! FODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS subdirs INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OS LLVMGCCDIR ARCH CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC CPP ifGNUmake LEX LEXLIB LEX_OUTPUT_ROOT FLEX YACC BISON EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL TAR DOT ETAGS ETAGSFLAGS PYTHON QMTEST HAVE_ZLIB HAVE_BZIP2 ENDIAN ALLOCA MMAP_FILE ENABLE_OPTIMIZED JIT LLVMCC1 LLVMCC1PLUS SHLIBEXT LLVM_PREFIX LLVM_BINDIR LLVM_LIBDIR LLVM_DATADIR LLVM_DOCSDIR LLVM_ETCDIR LLVM_INCLUDEDIR LLV! M_INFODIR LLVM_MANDIR LLVM_CONFIGTIME LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -18952,6 +18952,46 @@ +# Extract the first word of "tar", so it can be a program name with args. +set dummy tar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_TAR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $TAR in + [\\/]* | ?:[\\/]*) + ac_cv_path_TAR="$TAR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_TAR" && ac_cv_path_TAR="gtar" + ;; +esac +fi +TAR=$ac_cv_path_TAR + +if test -n "$TAR"; then + echo "$as_me:$LINENO: result: $TAR" >&5 +echo "${ECHO_T}$TAR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 @@ -25181,6 +25221,7 @@ s, at FFLAGS@,$FFLAGS,;t t s, at ac_ct_F77@,$ac_ct_F77,;t t s, at LIBTOOL@,$LIBTOOL,;t t +s, at TAR@,$TAR,;t t s, at DOT@,$DOT,;t t s, at ETAGS@,$ETAGS,;t t s, at ETAGSFLAGS@,$ETAGSFLAGS,;t t From reid at x10sys.com Mon Oct 25 03:21:19 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 25 Oct 2004 03:21:19 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/mkinstalldirs Message-ID: <200410250821.DAA25330@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: mkinstalldirs updated: 1.2 -> 1.3 --- Log message: Teach mkinstalldirs how to shut up about making directories. --- Diffs of the changes: (+1 -1) Index: llvm/autoconf/mkinstalldirs diff -u llvm/autoconf/mkinstalldirs:1.2 llvm/autoconf/mkinstalldirs:1.3 --- llvm/autoconf/mkinstalldirs:1.2 Sun Oct 10 14:09:33 2004 +++ llvm/autoconf/mkinstalldirs Mon Oct 25 03:21:09 2004 @@ -75,7 +75,7 @@ case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - echo "mkdir -p -- $*" + # echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not From reid at x10sys.com Mon Oct 25 03:27:48 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 25 Oct 2004 03:27:48 -0500 Subject: [llvm-commits] CVS: llvm/utils/Makefile Message-ID: <200410250827.DAA25470@zion.cs.uiuc.edu> Changes in directory llvm/utils: Makefile updated: 1.6 -> 1.7 --- Log message: New Makefile Features: * "dist" target now builds tar.gz, tar.bz2, and zip files suitable for distribution. "dist" can only be run from $(BUILD_OBJ_ROOT) and implies a "check". * made the preconditions not do a recursive make and ensured that they are executed sequentially. * made the messages output by the makefile be prefixed with "llvm" and the make level (e.g. llvm[1]: ) in the same way that make does so that the messages are uniform and more readable. * Fixed the tags target so that tags depends on TAGS which contains the rules to build a file named TAGS * Implemented the EXTRA_DIST feature in a few directories to make sure it works. --- Diffs of the changes: (+5 -0) Index: llvm/utils/Makefile diff -u llvm/utils/Makefile:1.6 llvm/utils/Makefile:1.7 --- llvm/utils/Makefile:1.6 Tue Apr 13 15:59:24 2004 +++ llvm/utils/Makefile Mon Oct 25 03:27:37 2004 @@ -10,5 +10,10 @@ LEVEL = .. DIRS = Burg TableGen fpcmp +EXTRA_DIST = check-each-file codegen-diff countloc.sh cvsupdate emacs \ + getsrcs.sh llvmdo llvmgrep llvm-native-gcc llvm-native-gxx \ + makellvm NightlyTest.gnuplot NightlyTest.pl \ + NightlyTestTemplate.html profile.pl RegressionFinder.pl vim + include $(LEVEL)/Makefile.common From reid at x10sys.com Mon Oct 25 03:27:48 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 25 Oct 2004 03:27:48 -0500 Subject: [llvm-commits] CVS: llvm/Makefile Makefile.config.in Makefile.rules Message-ID: <200410250827.DAA25477@zion.cs.uiuc.edu> Changes in directory llvm: Makefile updated: 1.31 -> 1.32 Makefile.config.in updated: 1.34 -> 1.35 Makefile.rules updated: 1.210 -> 1.211 --- Log message: New Makefile Features: * "dist" target now builds tar.gz, tar.bz2, and zip files suitable for distribution. "dist" can only be run from $(BUILD_OBJ_ROOT) and implies a "check". * made the preconditions not do a recursive make and ensured that they are executed sequentially. * made the messages output by the makefile be prefixed with "llvm" and the make level (e.g. llvm[1]: ) in the same way that make does so that the messages are uniform and more readable. * Fixed the tags target so that tags depends on TAGS which contains the rules to build a file named TAGS * Implemented the EXTRA_DIST feature in a few directories to make sure it works. --- Diffs of the changes: (+207 -67) Index: llvm/Makefile diff -u llvm/Makefile:1.31 llvm/Makefile:1.32 --- llvm/Makefile:1.31 Sun Oct 24 03:20:10 2004 +++ llvm/Makefile Mon Oct 25 03:27:37 2004 @@ -9,13 +9,24 @@ LEVEL = . DIRS = lib/System lib/Support utils lib tools + ifneq ($(MAKECMDGOALS),tools-only) DIRS += runtime OPTIONAL_DIRS = examples projects endif +EXTRA_DIST := llvm.spec include configure \ + autoconf/AutoRegen.sh autoconf/LICENSE.TXT autoconf/README.TXT \ + autoconf/aclocal.m4 autoconf/config.guess autoconf/config.sub \ + autoconf/configure.ac autoconf/depcomp autoconf/install-sh \ + autoconf/ltmain.sh autoconf/missing autoconf/mkinstalldirs \ + autoconf/m4 include $(LEVEL)/Makefile.common +dist-hook:: + @$(ECHO) Eliminating CVS directories from distribution + $(VERB) rm -rf `find $(TopDistDir) -type d -name CVS -print` + test :: all cd test; $(MAKE) Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.34 llvm/Makefile.config.in:1.35 --- llvm/Makefile.config.in:1.34 Fri Oct 22 16:01:44 2004 +++ llvm/Makefile.config.in Mon Oct 25 03:27:37 2004 @@ -40,23 +40,28 @@ # Path to the library archiver program. AR_PATH = @AR@ -# The pathnames of the Flex and Bison programs, respectively. -YACC = @YACC@ -BISON = @BISON@ -FLEX = @LEX@ +# The pathnames of the programs we require to build +YACC = @YACC@ +BISON = @BISON@ +FLEX = @LEX@ +TAR = @TAR@ +INSTALL = @INSTALL@ +DOT = @DOT@ +ETAGS = @ETAGS@ +ETAGSFLAGS = @ETAGSFLAGS@ -# Paths to miscellaneous programs. +# Paths to miscellaneous programs we assume are present RPWD = pwd SED = sed RM = rm -ECHO = echo +ECHO = echo "llvm["$(MAKELEVEL)"]:" MKDIR = @abs_top_srcdir@/autoconf/mkinstalldirs +INSTALL_SH = $(BUILD_SRC_ROOT)/autoconf/install-sh DATE = date MV = mv -INSTALL = @INSTALL@ -DOT = @DOT@ -ETAGS = @ETAGS@ -ETAGSFLAGS = @ETAGSFLAGS@ +GZIP = gzip +ZIP = zip +BZIP2 = bzip2 # Determine the target for which LLVM should generate code. LLVMGCCARCH := @target@/3.4-llvm @@ -173,4 +178,5 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_DATA = @INSTALL_DATA@ +LLVM_TARBALL_NAME = @PACKAGE_NAME at -@PACKAGE_VERSION@ Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.210 llvm/Makefile.rules:1.211 --- llvm/Makefile.rules:1.210 Sun Oct 24 03:21:04 2004 +++ llvm/Makefile.rules Mon Oct 25 03:27:37 2004 @@ -26,8 +26,9 @@ #-------------------------------------------------------------------- RECURSIVE_TARGETS := all clean check install uninstall LOCAL_TARGETS := all-local clean-local check-local install-local printvars\ - uninstall-local + uninstall-local TOPLEV_TARGETS := dist dist-check dist-clean tags +USER_TARGETS := $(RECURSIVE_TARGETS) $(LOCAL_TARGETS) $(TOPLEV_TARGETS) INTERNAL_TARGETS := preconditions \ install-config-dir install-shared-library install-bytecode-library \ install-archive-library install-relinked-library install-tool \ @@ -37,25 +38,22 @@ #-------------------------------------------------------------------- # Mark all of these targets as phony to avoid implicit rule search #-------------------------------------------------------------------- -.PHONY: $(RECURSIVE_TARGETS) $(LOCAL_TARGETS) $(TOP_TARGETS) $(INTERNAL_TARGETS) +.PHONY: $(USER_TARGETS) $(INTERNAL_TARGETS) #-------------------------------------------------------------------- # Make sure all the user-target rules are double colon rules and that # the preconditions are run first. #-------------------------------------------------------------------- +$(USER_TARGETS) :: preconditions + all :: all-local check:: check-local clean:: clean-local install :: install-local uninstall :: uninstall-local - -all-local :: preconditions -clean-local :: preconditions check-local :: all-local install-local :: all-local -printvars :: preconditions -uninstall-local :: preconditions ############################################################################### # SUFFIXES: Reset the list of suffixes we know how to build @@ -132,6 +130,9 @@ VERB := @ LIBTOOL += --silent AR += >/dev/null 2>/dev/null + CONFIGUREFLAGS += >$(BUILD_OBJ_DIR)/configure.out 2>&1 +else + CONFIGUREFLAGS := endif # By default, strip symbol information from executable @@ -162,12 +163,12 @@ LDFLAGS += -L$(LIBDIR) -L$(LLVMLIBDIR) CPPFLAGS += -I$(BUILD_OBJ_DIR) \ - -I$(BUILD_SRC_DIR) \ - -I$(BUILD_SRC_ROOT)/include \ - -I$(BUILD_OBJ_ROOT)/include \ - -I$(LLVM_OBJ_ROOT)/include \ - -I$(LLVM_SRC_ROOT)/include \ - -D_GNU_SOURCE -D__STDC_LIMIT_MACROS + -I$(BUILD_SRC_DIR) \ + -I$(BUILD_SRC_ROOT)/include \ + -I$(BUILD_OBJ_ROOT)/include \ + -I$(LLVM_OBJ_ROOT)/include \ + -I$(LLVM_SRC_ROOT)/include \ + -D_GNU_SOURCE -D__STDC_LIMIT_MACROS Compile.C = $(CC) $(CPPFLAGS) $(CompileCommonOpts) -c $(CFLAGS) Compile.CXX = $(CXX) $(CPPFLAGS) $(CompileCommonOpts) $(CXXFLAGS) -c @@ -176,7 +177,7 @@ BCCompile.CXX = $(LLVMGXX) $(CPPFLAGS) $(CompileCommonOpts) $(CXXFLAGS) -c BCCompile.C = $(LLVMGCC) $(CPPFLAGS) $(CompileCommonOpts) $(CFLAGS) -c Link = $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(CPPFLAGS) \ - $(CompileCommonOpts) $(LDFLAGS) $(STRIP) + $(CompileCommonOpts) $(LDFLAGS) $(STRIP) Relink = $(LIBTOOL) --tag=CXX --mode=link $(CXX) BCLinkLib = $(LLVMGCC) -shared -nostdlib Burg = $(BURG) -I $(BUILD_SRC_DIR) @@ -193,8 +194,8 @@ #---------------------------------------------------------- ifndef SOURCES SOURCES := $(notdir $(wildcard $(BUILD_SRC_DIR)/*.cpp \ - $(BUILD_SRC_DIR)/*.cc $(BUILD_SRC_DIR)/*.c $(BUILD_SRC_DIR)/*.y \ - $(BUILD_SRC_DIR)/*.l)) + $(BUILD_SRC_DIR)/*.cc $(BUILD_SRC_DIR)/*.c $(BUILD_SRC_DIR)/*.y \ + $(BUILD_SRC_DIR)/*.l)) endif ifdef BUILT_SOURCES @@ -218,14 +219,16 @@ # Handle the DIRS options for sequential construction #--------------------------------------------------------- +SUBDIRS := ifdef DIRS +SUBDIRS += $(DIRS) $(RECURSIVE_TARGETS):: $(VERB) for dir in $(DIRS); do \ if [ ! -f $$dir/Makefile ]; then \ $(MKDIR) $$dir; \ cp $(BUILD_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ fi; \ - ($(MAKE) -C $$dir $@ $(MFLAGS)) || exit 1; \ + ($(MAKE) -C $$dir $@ ) || exit 1; \ done endif @@ -240,7 +243,7 @@ $(MKDIR) $$dir; \ cp $(BUILD_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ fi; \ - ($(MAKE) -C $$dir $@ $(MFLAGS)) || exit 0; \ + ($(MAKE) -C $$dir $@ ) || exit 0; \ done endif @@ -249,6 +252,7 @@ #--------------------------------------------------------- ifdef PARALLEL_DIRS +SUBDIRS += $(PARALLEL_DIRS) # Unfortunately, this list must be maintained if new # recursive targets are added. all :: $(addsuffix /.makeall , $(PARALLEL_DIRS)) @@ -264,7 +268,7 @@ $(MKDIR) $(@D); \ cp $(BUILD_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \ fi; \ - $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@) $(MFLAGS) + $(MAKE) -C $(@D) $(subst $(@D)/.make,,$@) endif #--------------------------------------------------------- @@ -272,6 +276,9 @@ # or may not exist. #--------------------------------------------------------- ifdef OPTIONAL_DIRS + +SUBDIRS += $(OPTIONAL_DIRS) + $(RECURSIVE_TARGETS):: $(VERB) for dir in $(OPTIONAL_DIRS); do \ if [ -d $(BUILD_SRC_DIR)/$$dir ]; then\ @@ -279,7 +286,7 @@ $(MKDIR) $$dir; \ cp $(BUILD_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ fi; \ - ($(MAKE) -C$$dir $@ $(MFLAGS)) || exit 1; \ + ($(MAKE) -C$$dir $@ ) || exit 1; \ fi \ done endif @@ -302,7 +309,7 @@ uninstall-config-dir: $(VERB)$(ECHO) Uninstalling Configuration Files From $(sysconfdir) $(VERB)for file in $(CONFIG_FILES); do \ - $(RM) -f $(sysconfdir)/$${file} ; \ + $(RM) -f $(sysconfdir)/$${file} ; \ done $(sysconfdir): @@ -564,13 +571,13 @@ @$(ECHO) "Compiling $(CONFIGURATION) $*.cpp For Shared Library" $(VERB) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(OBJDIR)/$*.LACXXd $< -o $@ ; \ then $(MV) -f "$(OBJDIR)/$*.LACXXd" "$(OBJDIR)/$*.d"; \ - else $(RM) -f "$(OBJDIR)/$*.LACXXd"; exit 1; fi + else $(RM) -f "$(OBJDIR)/$*.LACXXd"; exit 1; fi $(OBJDIR)/%.lo $(OBJDIR)/%.o: %.c $(OBJDIR)/.dir @$(ECHO) "Compiling $(CONFIGURATION) $*.c For Shared Library" $(VERB) if $(LTCompile.C) -MD -MT $@ -MP -MF $(OBJDIR)/$*.LACd $< -o $@ ; \ then $(MV) -f "$(OBJDIR)/$*.LACd" "$(OBJDIR)/$*.d"; \ - else $(RM) -f "$(OBJDIR)/$*.LACd"; exit 1; fi + else $(RM) -f "$(OBJDIR)/$*.LACd"; exit 1; fi else @@ -578,13 +585,13 @@ @$(ECHO) "Compiling $(CONFIGURATION) $*.cpp For Archive" $(VERB) if $(Compile.CXX) -MD -MT $@ -MP -MF $(OBJDIR)/$*.CXXd $< -o $@ ; \ then $(MV) -f "$(OBJDIR)/$*.CXXd" "$(OBJDIR)/$*.d"; \ - else $(RM) -f "$(OBJDIR)/$*.CXXd"; exit 1; fi + else $(RM) -f "$(OBJDIR)/$*.CXXd"; exit 1; fi $(OBJDIR)/%.o: %.c $(OBJDIR)/.dir @$(ECHO) "Compiling $(CONFIGURATION) $*.c For Archive" $(VERB) if $(Compile.C) -MD -MT $@ -MP -MF $(OBJDIR)/$*.Cd $< -o $@ ; \ then $(MV) -f "$(OBJDIR)/$*.Cd" "$(OBJDIR)/$*.d"; \ - else $(RM) -f "$(OBJDIR)/$*.Cd"; exit 1; fi + else $(RM) -f "$(OBJDIR)/$*.Cd"; exit 1; fi endif @@ -593,13 +600,13 @@ @$(ECHO) "Compiling $(CONFIGURATION) $*.cpp to bytecode" $(VERB) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(OBJDIR)/$*.BCCXXd" $< -o $@ ; \ then $(MV) -f "$(OBJDIR)/$*.BCCXXd" "$(OBJDIR)/$*.d"; \ - else $(RM) -f "$(OBJDIR)/$*.BCCXXd"; exit 1; fi + else $(RM) -f "$(OBJDIR)/$*.BCCXXd"; exit 1; fi $(OBJDIR)/%.bc: %.c $(OBJDIR)/.dir @$(ECHO) "Compiling $(CONFIGURATION) $*.c to bytecode" $(VERB) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(OBJDIR)/$*.BCCd" $< -o $@ ; \ then $(MV) -f "$(OBJDIR)/$*.BCCd" "$(OBJDIR)/$*.d"; \ - else $(RM) -f "$(OBJDIR)/$*.BCCd"; exit 1; fi + else $(RM) -f "$(OBJDIR)/$*.BCCd"; exit 1; fi else @@ -802,9 +809,10 @@ #------------------------------------------------------------------------ # List of the preconditions #------------------------------------------------------------------------ + preconditions: $(CONFIG_STATUS) $(MAKE_CONFIG) $(OBJMKFILE) -all all-local check check-local dist dist-check install:: $(BUILT_SOURCES) +$(filter-out clean clean-local,USER_TARGETS):: $(BUILT_SOURCES) clean-local:: ifneq ($(strip $(BUILT_SOURCES)),) @@ -816,18 +824,15 @@ #------------------------------------------------------------------------ .PRECIOUS: $(CONFIG_STATUS) $(CONFIG_STATUS): $(CONFIGURE) - @$(ECHO) Reconfiguring with $@ - $(VERB) $(CONFIG_STATUS) --recheck + @$(ECHO) Reconfiguring with $< + $(VERB) $(CONFIG_STATUS) --recheck $(CONFIGUREFLAGS) #------------------------------------------------------------------------ # Make sure the configuration makefile is up to date #------------------------------------------------------------------------ -$(MAKE_CONFIG): $(MAKE_CONFIG_IN) +$(MAKE_CONFIG): $(MAKE_CONFIG_IN) $(CONFIG_STATUS) @$(ECHO) Regenerating $@ $(VERB) cd $(LLVM_OBJ_ROOT) ; $(CONFIG_STATUS) Makefile.config - $(VERB) $(MAKE) $(MFLAGS) $(MAKECMDGOALS) - @exit 0; - #------------------------------------------------------------------------ # If the Makefile in the source tree has been updated, copy it over into the @@ -836,29 +841,153 @@ ifneq ($(OBJMKFILE),$(SRCMKFILE)) .PRECIOUS: $(OBJMKFILE) $(OBJMKFILE): $(SRCMKFILE) - @$(ECHO) "Updating Makefile from : $(dir $<)" + @$(ECHO) "Updating Makefile from: $(dir $<)" $(VERB) $(MKDIR) $(@D) $(VERB) cp -f $< $@ - $(VERB) $(MAKE) $(MFLAGS) $(MAKECMDGOALS) - @exit 0; endif ############################################################################### -# TOP LEVEL - targets only to apply at the top level directory +# Handle construction of a distribution tarball ############################################################################### -ifeq ($(LEVEL),.) +.PHONY: dist dist-chck dist-clean distdir dist-gzip dist-bzip2 dist-zip -#------------------------------------------------------------------------ -# Handle construction of a distribution -dist:: preconditions - @$(ECHO) Target dist is not implemented yet +ifeq ($(BUILD_SRC_DIR),$(BUILD_OBJ_DIR)) -dist-check:: preconditions dist - @$(ECHO) Target dist-check is not implemented yet +dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip :: + @$(ECHO) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR + +else + +ifeq ($(LLVM_TARBALL_NAME),) +$(error LLVM_TARBALL_NAME is empty) +endif + +ifneq ($(LEVEL),.) + +dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip :: + @$(ECHO) ERROR: You must run $@ from $(BUILD_OBJ_ROOT) + +DistTopCheck := + +else -dist-clean:: preconditions - @$(ECHO) Target dist-clean is not implemented yet +DistTopCheck := check + +dist-gzip: distdir + @$(ECHO) Packing gzipped distribution tar file. + $(VERB) $(TAR) chf - "$(TopDistDir)" | gzip -c > "$(DistTarGZip)" + +dist-bzip2: distdir + @$(ECHO) Packing bzipped distribution tar file. + $(VERB) $(TAR) chf - $(DistName) | $(BZIP2) -c >$(DistTarBZ2) + +dist-zip: distdir + @$(ECHO) Packing zipped distribution file. + $(VERB) rm -f $(DistZip) + $(VERB) $(ZIP) -rq $(DistZip) $(DistName) + +dist :: distdir + @$(ECHO) Packing gzipped distribution tar file. + $(VERB) $(TAR) chf - $(DistName) | $(GZIP) -c >$(DistTarGZip) + @$(ECHO) Packing bzipped distribution tar file. + $(VERB) $(TAR) chf - $(DistName) | $(BZIP2) -c >$(DistTarBZ2) + @$(ECHO) Packing zipped distribution file. + $(VERB) rm -f $(DistZip) + $(VERB) $(ZIP) -rq $(DistZip) $(DistName) + @$(ECHO) ===== DISTRIBUTION PACKAGING SUCESSFUL ===== + +dist-check:: dist + +dist-clean:: + @$(ECHO) Cleaning distribution files + $(VERB) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) + +endif + +DistName := $(LLVM_TARBALL_NAME) +DistDir := $(BUILD_OBJ_ROOT)/$(DistName) +TopDistDir := $(DistDir) +DistTarGZip := $(BUILD_OBJ_ROOT)/$(DistName).tar.gz +DistZip := $(BUILD_OBJ_ROOT)/$(DistName).zip +DistTarBZ2 := $(BUILD_OBJ_ROOT)/$(DistName).tar.bz2 +DistAlways := CREDITS.TXT LICENSE.TXT README.txt README AUTHORS COPYING \ + ChangeLog INSTALL NEWS Makefile Makefile.common Makefile.rules \ + Makefile.config.in +DistSources := $(filter-out projects,$(SOURCES) $(EXTRA_DIST)) +DistSubDirs := $(filter-out projects,$(SUBDIRS)) +DistFiles := $(DistAlways) $(DistSources) +RmDistDir := { test ! -d $(DistDir) || { \ + find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf $(DistDir); }; } + +distdir : $(DistTopCheck) $(DistSources) + @$(ECHO) Building Distribution Directory $(DistDir) + $(VERB) $(RmDistDir) + $(VERB) $(MKDIR) $(DistDir) + $(VERB) srcdirstrip=`echo "$(BUILD_SRC_DIR)" | sed 's|.|.|g'`; \ + srcrootstrip=`echo "$(BUILD_SRC_ROOT)" | sed 's|.|.|g'`; \ + for file in $(DistFiles) ; do \ + case "$$file" in \ + $(BUILD_SRC_DIR)/*) file=`echo "$$file" | sed "s#^$$srcdirstrip/##"`;; \ + $(BUILD_SRC_ROOT)/*) file=`echo "$$file" | sed "s#^$srcrootstrip/#$(BUILD_OBJ_ROOT)/#"`;; \ + esac; \ + if test -f "$$file" || test -d "$$file" ; then \ + from_dir=. ; \ + else \ + from_dir=$(BUILD_SRC_DIR); \ + fi; \ + to_dir=`echo "$$file" | sed -e 's#/[^/]*$$##'`; \ + if test "$$to_dir" != "$$file" && test "$$to_dir" != "."; then \ + to_dir="$(DistDir)/$$dir"; \ + $(MKDIR) "$$to_dir" ; \ + else \ + to_dir="$(DistDir)"; \ + fi; \ + mid_dir=`echo "$$file" | sed -n -e 's#^\(.*\)/[^/]*$$#\1#p'`; \ + if test -n "$$mid_dir" ; then \ + $(MKDIR) "$$to_dir/$$mid_dir" ; \ + fi ; \ + if test -d "$$from_dir/$$file"; then \ + if test -d "$(BUILD_SRC_DIR)/$$file" && \ + test "$$from_dir" != "$(BUILD_SRC_DIR)" ; then \ + cp -pR "$(BUILD_SRC_DIR)/$$file" "$$to_dir" || exit 1; \ + fi; \ + cp -pR $$from_dir/$$file $$to_dir || exit 1; \ + elif test -f "$$from_dir/$$file" ; then \ + cp -p "$$from_dir/$$file" "$(DistDir)/$$file" || exit 1; \ + elif test -L "$$from_dir/$$file" ; then \ + cp -pd "$$from_dir/$$file" $(DistDir)/$$file || exit 1; \ + elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \ + $(ECHO) "===== WARNING: Distribution Source $$from_dir/$$file Not Found!" ; \ + elif test "$(VERB)" != '@' ; then \ + $(ECHO) "Skipping non-existent $$from_dir/$$file" ; \ + fi; \ + done + $(VERB) for subdir in $(SUBDIRS) ; do \ + if test "$$subdir" \!= "." ; then \ + test -d "$(DistDir)/$$subdir" || $(MKDIR) "$(DistDir)/$$subdir" || exit 1; \ + new_distdir="$(DistDir)/$$subdir" ; \ + ( cd $$subdir && $(MAKE) DistDir="$$new_distdir" distdir ) || exit 1; \ + fi; \ + done + $(VERB) $(MAKE) DistDir="$(DistDir)" dist-hook + -$(VERB) find $(DistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \ + || chmod -R a+r $(DistDir) + +dist-hook:: + + +endif + +############################################################################### +# TOP LEVEL - targets only to apply at the top level directory +############################################################################### + +ifeq ($(LEVEL),.) #------------------------------------------------------------------------ # Install support for project's include files: @@ -885,17 +1014,11 @@ #------------------------------------------------------------------------ # Build tags database for Emacs/Xemacs: #------------------------------------------------------------------------ -TAGS: tags +tags:: TAGS -tags:: +TAGS: find include lib tools examples -name '*.cpp' -o -name '*.h' | $(ETAGS) $(ETAGSFLAGS) - -dist-clean:: clean - $(VERB) $(RM) -rf $(LEVEL)/Makefile.config \ - $(LEVEL)/include/llvm/Config/config.h \ - $(LEVEL)/autoconf/autom4te.cache \ - $(LEVEL)/config.log \ - $(LEVEL)/TAGS endif ############################################################################### @@ -924,6 +1047,6 @@ # deleted his unix kernel. pony:: @wget -q \ - http://search.cpan.org/src/ASAVIGE/Acme-EyeDrops-1.40/lib/Acme/EyeDrops/pony2.eye \ - -O /tmp/resistor.pony + http://search.cpan.org/src/ASAVIGE/Acme-EyeDrops-1.40/lib/Acme/EyeDrops/pony2.eye \ + -O /tmp/resistor.pony @cat /tmp/resistor.pony From brukman at cs.uiuc.edu Mon Oct 25 09:52:15 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon, 25 Oct 2004 09:52:15 -0500 Subject: [llvm-commits] CVS: llvm-test/Makefile.common Message-ID: <200410251452.JAA15985@choi.cs.uiuc.edu> Changes in directory llvm-test: Makefile.common updated: 1.2 -> 1.3 --- Log message: Adjust the inclusion of Makefile.rules so that we always get it from the source tree (instead of the object tree, where it may not be). This gets SRCDIR != OBJDIR working again. --- Diffs of the changes: (+1 -1) Index: llvm-test/Makefile.common diff -u llvm-test/Makefile.common:1.2 llvm-test/Makefile.common:1.3 --- llvm-test/Makefile.common:1.2 Fri Oct 22 10:58:13 2004 +++ llvm-test/Makefile.common Mon Oct 25 09:52:01 2004 @@ -16,4 +16,4 @@ # # Include LLVM's Master Makefile. # -include $(LEVEL)/Makefile.rules +include $(BUILD_SRC_ROOT)/Makefile.rules From criswell at cs.uiuc.edu Mon Oct 25 13:30:23 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon, 25 Oct 2004 13:30:23 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200410251830.NAA12604@choi.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.205 -> 1.206 --- Log message: Modified switch generation so that only the phi values associated with the destination basic block are copied. --- Diffs of the changes: (+2 -1) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.205 llvm/lib/Target/CBackend/Writer.cpp:1.206 --- llvm/lib/Target/CBackend/Writer.cpp:1.205 Wed Oct 20 09:38:39 2004 +++ llvm/lib/Target/CBackend/Writer.cpp Mon Oct 25 13:30:09 2004 @@ -1194,11 +1194,11 @@ } void CWriter::visitSwitchInst(SwitchInst &SI) { - printPHICopiesForSuccessors(SI.getParent(), 0); Out << " switch ("; writeOperand(SI.getOperand(0)); Out << ") {\n default:\n"; + printPHICopiesForSuccessor (SI.getParent(), SI.getDefaultDest(), 2); printBranchToBlock(SI.getParent(), SI.getDefaultDest(), 2); Out << ";\n"; for (unsigned i = 2, e = SI.getNumOperands(); i != e; i += 2) { @@ -1206,6 +1206,7 @@ writeOperand(SI.getOperand(i)); Out << ":\n"; BasicBlock *Succ = cast(SI.getOperand(i+1)); + printPHICopiesForSuccessor (SI.getParent(), Succ, 2); printBranchToBlock(SI.getParent(), Succ, 2); if (Succ == SI.getParent()->getNext()) Out << " break;\n"; From lattner at cs.uiuc.edu Mon Oct 25 13:38:19 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 13:38:19 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Config/alloca.h Message-ID: <200410251838.NAA08428@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Config: alloca.h updated: 1.6 -> 1.7 --- Log message: Patch to support MSVC correctly, contributed by Morten Ofstad! --- Diffs of the changes: (+2 -1) Index: llvm/include/llvm/Config/alloca.h diff -u llvm/include/llvm/Config/alloca.h:1.6 llvm/include/llvm/Config/alloca.h:1.7 --- llvm/include/llvm/Config/alloca.h:1.6 Wed Sep 22 10:28:32 2004 +++ llvm/include/llvm/Config/alloca.h Mon Oct 25 13:38:05 2004 @@ -24,7 +24,8 @@ * (notably FreeBSD) defined alloca() there. */ #ifdef _MSC_VER -/* noop on Visual C++ */ +#include +#define alloca _alloca #elif defined(HAVE_ALLOCA_H) #include #elif defined(__MINGW_H) && defined(HAVE_MALLOC_H) From lattner at cs.uiuc.edu Mon Oct 25 13:39:32 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 13:39:32 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/DataTypes.h.in Message-ID: <200410251839.NAA08450@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: DataTypes.h.in updated: 1.13 -> 1.14 --- Log message: Patch to support MSVC better, contributed by Morten Ofstad --- Diffs of the changes: (+3 -0) Index: llvm/include/llvm/Support/DataTypes.h.in diff -u llvm/include/llvm/Support/DataTypes.h.in:1.13 llvm/include/llvm/Support/DataTypes.h.in:1.14 --- llvm/include/llvm/Support/DataTypes.h.in:1.13 Mon Oct 18 17:14:48 2004 +++ llvm/include/llvm/Support/DataTypes.h.in Mon Oct 25 13:39:18 2004 @@ -84,6 +84,9 @@ #if !defined(INT64_MAX) # define INT64_MAX 9223372036854775807LL #endif +#if !defined(INT64_MIN) +# define INT64_MIN ((-INT64_MAX)-1) +#endif #if !defined(UINT64_MAX) # define UINT64_MAX 0xffffffffffffffffULL #endif From lattner at cs.uiuc.edu Mon Oct 25 13:40:22 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 13:40:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp Message-ID: <200410251840.NAA08466@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: ScalarEvolution.cpp updated: 1.27 -> 1.28 --- Log message: Patch to support MSVC, contributed by Morten Ofstad --- Diffs of the changes: (+1 -1) Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.27 llvm/lib/Analysis/ScalarEvolution.cpp:1.28 --- llvm/lib/Analysis/ScalarEvolution.cpp:1.27 Mon Oct 11 20:49:27 2004 +++ llvm/lib/Analysis/ScalarEvolution.cpp Mon Oct 25 13:40:08 2004 @@ -1984,7 +1984,7 @@ cast(ConstantExpr::getCast(SqrtTerm, SqrtTerm->getType()->getUnsignedVersion())); uint64_t SqrtValV = SqrtVal->getValue(); - uint64_t SqrtValV2 = (uint64_t)sqrt(SqrtValV); + uint64_t SqrtValV2 = (uint64_t)sqrt((double)SqrtValV); // The square root might not be precise for arbitrary 64-bit integer // values. Do some sanity checks to ensure it's correct. if (SqrtValV2*SqrtValV2 > SqrtValV || From lattner at cs.uiuc.edu Mon Oct 25 13:41:00 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 13:41:00 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200410251841.NAA08478@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.130 -> 1.131 --- Log message: Patch to support MSVC better, contributed by Morten Ofstad --- Diffs of the changes: (+1 -1) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.130 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.131 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.130 Fri Oct 1 18:15:35 2004 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Mon Oct 25 13:40:47 2004 @@ -156,7 +156,7 @@ LiveInterval &RegInt = getInterval(reg); RegInt.weight += - (mop.isUse() + mop.isDef()) * pow(10.0F, loopDepth); + (mop.isUse() + mop.isDef()) * pow(10.0F, (int)loopDepth); } } ++mii; From criswell at cs.uiuc.edu Mon Oct 25 13:42:04 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon, 25 Oct 2004 13:42:04 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Writer.cpp Message-ID: <200410251842.NAA16311@choi.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Writer.cpp updated: 1.206 -> 1.207 --- Log message: Removed dead method, printPHICopiesForSuccessors(). --- Diffs of the changes: (+0 -21) Index: llvm/lib/Target/CBackend/Writer.cpp diff -u llvm/lib/Target/CBackend/Writer.cpp:1.206 llvm/lib/Target/CBackend/Writer.cpp:1.207 --- llvm/lib/Target/CBackend/Writer.cpp:1.206 Mon Oct 25 13:30:09 2004 +++ llvm/lib/Target/CBackend/Writer.cpp Mon Oct 25 13:41:50 2004 @@ -206,8 +206,6 @@ bool isGotoCodeNecessary(BasicBlock *From, BasicBlock *To); void printPHICopiesForSuccessor(BasicBlock *CurBlock, BasicBlock *Successor, unsigned Indent); - void printPHICopiesForSuccessors(BasicBlock *CurBlock, - unsigned Indent); void printBranchToBlock(BasicBlock *CurBlock, BasicBlock *SuccBlock, unsigned Indent); void printIndexingExpression(Value *Ptr, gep_type_iterator I, @@ -1249,25 +1247,6 @@ } } - -void CWriter::printPHICopiesForSuccessors(BasicBlock *CurBlock, - unsigned Indent) { - for (succ_iterator SI = succ_begin(CurBlock), E = succ_end(CurBlock); - SI != E; ++SI) - for (BasicBlock::iterator I = SI->begin(); isa(I); ++I) { - PHINode *PN = cast(I); - // Now we have to do the printing. - Value *IV = PN->getIncomingValueForBlock(CurBlock); - if (!isa(IV)) { - Out << std::string(Indent, ' '); - Out << " " << Mang->getValueName(I) << "__PHI_TEMPORARY = "; - writeOperand(IV); - Out << "; /* for PHI node */\n"; - } - } -} - - void CWriter::printBranchToBlock(BasicBlock *CurBB, BasicBlock *Succ, unsigned Indent) { if (isGotoCodeNecessary(CurBB, Succ)) { From lattner at cs.uiuc.edu Mon Oct 25 13:44:28 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 13:44:28 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp Message-ID: <200410251844.NAA08759@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveVariables.cpp updated: 1.44 -> 1.45 --- Log message: Do not use variable sized arrays in C++, they are non-portable. Patch contributed by Morten Ofstad --- Diffs of the changes: (+5 -5) Index: llvm/lib/CodeGen/LiveVariables.cpp diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.44 llvm/lib/CodeGen/LiveVariables.cpp:1.45 --- llvm/lib/CodeGen/LiveVariables.cpp:1.44 Wed Sep 1 17:55:35 2004 +++ llvm/lib/CodeGen/LiveVariables.cpp Mon Oct 25 13:44:14 2004 @@ -33,6 +33,7 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/Config/alloca.h" using namespace llvm; static RegisterAnalysis X("livevars", "Live Variable Analysis"); @@ -155,11 +156,10 @@ // physical register. This is a purely local property, because all physical // register references as presumed dead across basic blocks. // - MachineInstr *PhysRegInfoA[RegInfo->getNumRegs()]; - bool PhysRegUsedA[RegInfo->getNumRegs()]; - std::fill(PhysRegInfoA, PhysRegInfoA+RegInfo->getNumRegs(), (MachineInstr*)0); - PhysRegInfo = PhysRegInfoA; - PhysRegUsed = PhysRegUsedA; + PhysRegInfo = (MachineInstr**)alloca(sizeof(MachineInstr*) * + RegInfo->getNumRegs()); + PhysRegUsed = (bool*)alloca(sizeof(bool)*RegInfo->getNumRegs()); + std::fill(PhysRegInfo, PhysRegInfo+RegInfo->getNumRegs(), (MachineInstr*)0); /// Get some space for a respectable number of registers... VirtRegInfo.resize(64); From lattner at cs.uiuc.edu Mon Oct 25 13:45:27 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 13:45:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/PRE.cpp Message-ID: <200410251845.NAA09086@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: PRE.cpp updated: 1.11 -> 1.12 --- Log message: Fix compatibility with MSVC, patch by Morten Ofstad --- Diffs of the changes: (+1 -0) Index: llvm/lib/Transforms/Scalar/PRE.cpp diff -u llvm/lib/Transforms/Scalar/PRE.cpp:1.11 llvm/lib/Transforms/Scalar/PRE.cpp:1.12 --- llvm/lib/Transforms/Scalar/PRE.cpp:1.11 Wed Sep 1 17:55:36 2004 +++ llvm/lib/Transforms/Scalar/PRE.cpp Mon Oct 25 13:45:16 2004 @@ -34,6 +34,7 @@ #include "llvm/ADT/PostOrderIterator.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/hash_set" +#include "llvm/ADT/hash_map" using namespace llvm; namespace { From lattner at cs.uiuc.edu Mon Oct 25 13:46:16 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 13:46:16 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/IsNAN.cpp Message-ID: <200410251846.NAA09129@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Support: IsNAN.cpp updated: 1.2 -> 1.3 --- Log message: Patch to support MSVC, contributed by Morten Ofstad --- Diffs of the changes: (+3 -0) Index: llvm/lib/Support/IsNAN.cpp diff -u llvm/lib/Support/IsNAN.cpp:1.2 llvm/lib/Support/IsNAN.cpp:1.3 --- llvm/lib/Support/IsNAN.cpp:1.2 Wed Sep 1 17:55:35 2004 +++ llvm/lib/Support/IsNAN.cpp Mon Oct 25 13:46:05 2004 @@ -19,6 +19,9 @@ #elif HAVE_STD_ISNAN_IN_CMATH # include using std::isnan; +#elif defined(_MSC_VER) +#include +#define isnan _isnan #else # error "Don't know how to get isnan()" #endif From lattner at cs.uiuc.edu Mon Oct 25 13:47:21 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 13:47:21 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/IsInf.cpp Message-ID: <200410251847.NAA09505@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Support: IsInf.cpp updated: 1.3 -> 1.4 --- Log message: Patch to support MSVC, contributed by Morten Ofstad --- Diffs of the changes: (+3 -0) Index: llvm/lib/Support/IsInf.cpp diff -u llvm/lib/Support/IsInf.cpp:1.3 llvm/lib/Support/IsInf.cpp:1.4 --- llvm/lib/Support/IsInf.cpp:1.3 Wed Sep 1 17:55:35 2004 +++ llvm/lib/Support/IsInf.cpp Mon Oct 25 13:47:10 2004 @@ -24,6 +24,9 @@ // apparently this has been a problem with Solaris for years. # include static int isinf(double x) { return !finite(x) && x==x; } +#elif defined(_MSC_VER) +#include +#define isinf(X) (!_finite(X)) #else # error "Don't know how to get isinf()" #endif From lattner at cs.uiuc.edu Mon Oct 25 14:04:16 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 14:04:16 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetSchedInfo.cpp Message-ID: <200410251904.OAA13016@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetSchedInfo.cpp updated: 1.20 -> 1.21 --- Log message: Remove dead assert --- Diffs of the changes: (+0 -3) Index: llvm/lib/Target/TargetSchedInfo.cpp diff -u llvm/lib/Target/TargetSchedInfo.cpp:1.20 llvm/lib/Target/TargetSchedInfo.cpp:1.21 --- llvm/lib/Target/TargetSchedInfo.cpp:1.20 Mon Sep 27 21:53:15 2004 +++ llvm/lib/Target/TargetSchedInfo.cpp Mon Oct 25 14:04:01 2004 @@ -170,9 +170,6 @@ issueGaps.resize(numOpCodes); conflictLists.resize(numOpCodes); - assert(numOpCodes < (1 << MAX_OPCODE_SIZE) - 1 - && "numOpCodes invalid for implementation of class OpCodePair!"); - // First, compute issue gaps between pairs of classes based on common // resources usages for each class, because most instruction pairs will // usually behave the same as their class. From lattner at cs.uiuc.edu Mon Oct 25 14:07:57 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 14:07:57 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetSchedInfo.h Message-ID: <200410251907.OAA15830@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetSchedInfo.h updated: 1.30 -> 1.31 --- Log message: Remove a dead class. Thanks to Morten Ofstad for pointing this out. --- Diffs of the changes: (+0 -26) Index: llvm/include/llvm/Target/TargetSchedInfo.h diff -u llvm/include/llvm/Target/TargetSchedInfo.h:1.30 llvm/include/llvm/Target/TargetSchedInfo.h:1.31 --- llvm/include/llvm/Target/TargetSchedInfo.h:1.30 Wed Sep 1 17:55:35 2004 +++ llvm/include/llvm/Target/TargetSchedInfo.h Mon Oct 25 14:07:43 2004 @@ -25,32 +25,6 @@ typedef long long cycles_t; static const cycles_t HUGE_LATENCY = ~((long long) 1 << (sizeof(cycles_t)-2)); static const cycles_t INVALID_LATENCY = -HUGE_LATENCY; -static const unsigned MAX_OPCODE_SIZE = 16; - -class OpCodePair { -public: - long val; // make long by concatenating two opcodes - OpCodePair(MachineOpCode op1, MachineOpCode op2) - : val((op1 < 0 || op2 < 0)? - -1 : (long)((((unsigned) op1) << MAX_OPCODE_SIZE) | (unsigned) op2)) {} - bool operator==(const OpCodePair& op) const { - return val == op.val; - } -private: - OpCodePair(); // disable for now -}; - -} // End llvm namespace - -namespace HASH_NAMESPACE { - template <> struct hash { - size_t operator()(const llvm::OpCodePair& pair) const { - return hash()(pair.val); - } - }; -} // End HASH_NAMESPACE (a macro) namespace - -namespace llvm { //--------------------------------------------------------------------------- // class MachineResource From lattner at cs.uiuc.edu Mon Oct 25 14:09:54 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 14:09:54 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvmc/Configuration.h Message-ID: <200410251909.OAA17509@apoc.cs.uiuc.edu> Changes in directory llvm/tools/llvmc: Configuration.h updated: 1.5 -> 1.6 --- Log message: Remove template args that are the same as the default --- Diffs of the changes: (+1 -2) Index: llvm/tools/llvmc/Configuration.h diff -u llvm/tools/llvmc/Configuration.h:1.5 llvm/tools/llvmc/Configuration.h:1.6 --- llvm/tools/llvmc/Configuration.h:1.5 Wed Sep 1 17:55:40 2004 +++ llvm/tools/llvmc/Configuration.h Mon Oct 25 14:09:41 2004 @@ -51,8 +51,7 @@ /// @{ private: /// @brief This type is used internally to hold the configuration data. - typedef hash_map,std::equal_to > ConfigDataMap; + typedef hash_map ConfigDataMap; ConfigDataMap Configurations; ///< The cache of configurations sys::Path configDir; /// @} From lattner at cs.uiuc.edu Mon Oct 25 14:28:17 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 14:28:17 -0500 Subject: [llvm-commits] CVS: llvm/docs/MakefileGuide.html Message-ID: <200410251928.OAA17570@apoc.cs.uiuc.edu> Changes in directory llvm/docs: MakefileGuide.html updated: 1.2 -> 1.3 --- Log message: Fix spellos --- Diffs of the changes: (+9 -9) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.2 llvm/docs/MakefileGuide.html:1.3 --- llvm/docs/MakefileGuide.html:1.2 Sun Oct 24 03:48:59 2004 +++ llvm/docs/MakefileGuide.html Mon Oct 25 14:28:03 2004 @@ -17,7 +17,7 @@
  • Makefile
  • Makefile.common
  • Makefile.config
  • -
  • Makefil.rules
  • +
  • Makefile.rules
  • Comments
  • @@ -60,10 +60,10 @@

    This document provides usage information about the LLVM makefile system. While loosely patterned after the BSD makefile system, LLVM has taken - a deparature from BSD in order to implement additional features needed by LLVM. + a departure from BSD in order to implement additional features needed by LLVM.

    Although makefile systems such as automake were attempted at one point, it - has become clear that the variations requried by LLVM from any Makefle norm + has become clear that the variations required by LLVM from any Makefile norm are too many to strictly use a more limited tool. Consequently, LLVM requires simply GNU Make 3.79, a widely portably makefile processor. LLVM unabashedly makes heavy use of the features of GNU Make so the dependency on GNU Make is @@ -172,7 +172,7 @@

    This section describes each of the targets that can be built using the LLVM Makefile system. Any target can be invoked from any directory but not all are - applicabe to a given directory (e.g. "dist" and "install" will always operate + applicable to a given directory (e.g. "dist" and "install" will always operate as if invoked from the top level directory).

    @@ -262,7 +262,7 @@

    This target cleans the build directory, recursively removing all things that the Makefile builds. Despite once or twice attempting to remove /*, the - cleaning rules have been made gaurded so they shouldn't go awry.

    + cleaning rules have been made guarded so they shouldn't go awry.

    @@ -334,7 +334,7 @@

    This target is the opposite of the install target. It removes the header, library and executable files from the installation directories. Note - that the directories themselves are not removed because it is not gauranteed + that the directories themselves are not removed because it is not guaranteed that LLVM is the only thing installing there (e.g. --prefix=/usr).

    @@ -365,7 +365,7 @@ - + @@ -458,7 +458,7 @@ - + @@ -506,7 +506,7 @@ Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/10/24 08:48:59 $ + Last modified: $Date: 2004/10/25 19:28:03 $ From lattner at cs.uiuc.edu Mon Oct 25 14:37:59 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 14:37:59 -0500 Subject: [llvm-commits] CVS: llvm/docs/MakefileGuide.html Message-ID: <200410251937.OAA17636@apoc.cs.uiuc.edu> Changes in directory llvm/docs: MakefileGuide.html updated: 1.3 -> 1.4 --- Log message: Make a sentence easier to parse --- Diffs of the changes: (+3 -3) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.3 llvm/docs/MakefileGuide.html:1.4 --- llvm/docs/MakefileGuide.html:1.3 Mon Oct 25 14:28:03 2004 +++ llvm/docs/MakefileGuide.html Mon Oct 25 14:37:46 2004 @@ -63,8 +63,8 @@ a departure from BSD in order to implement additional features needed by LLVM.

    Although makefile systems such as automake were attempted at one point, it - has become clear that the variations required by LLVM from any Makefile norm - are too many to strictly use a more limited tool. Consequently, LLVM requires + has become clear that the differences between the LLVM way of doing things and + the Makefile norm are too great to use a more limited tool. Consequently, LLVM requires simply GNU Make 3.79, a widely portably makefile processor. LLVM unabashedly makes heavy use of the features of GNU Make so the dependency on GNU Make is firm. If you're not familiar with make, it is recommended that you @@ -506,7 +506,7 @@ Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/10/25 19:28:03 $ + Last modified: $Date: 2004/10/25 19:37:46 $ From lattner at cs.uiuc.edu Mon Oct 25 14:39:59 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 14:39:59 -0500 Subject: [llvm-commits] CVS: llvm/docs/index.html Message-ID: <200410251939.OAA17669@apoc.cs.uiuc.edu> Changes in directory llvm/docs: index.html updated: 1.31 -> 1.32 --- Log message: add a link to the makefile guide, eliminate redundant link to coding stds --- Diffs of the changes: (+5 -5) Index: llvm/docs/index.html diff -u llvm/docs/index.html:1.31 llvm/docs/index.html:1.32 --- llvm/docs/index.html:1.31 Sun Sep 19 18:15:47 2004 +++ llvm/docs/index.html Mon Oct 25 14:39:46 2004 @@ -96,10 +96,13 @@ code to be located outside (or inside) the llvm/ tree, while using LLVM header files and libraries. +

  • LLVM Makefile Guide - Describes how the +LLVM makefiles work and how to use them.
  • +
  • CommandLine library Reference Manual - Provides information on using the command line parsing library.
  • -
  • Recommended LLVM Coding standards - +
  • LLVM Coding standards - Details the LLVM coding standards and provides useful information on writing efficient C++ code.
  • @@ -110,9 +113,6 @@
  • Extending LLVM - Look here to see how to add instructions and intrinsics to LLVM.
  • -
  • Coding Standards - Guidelines for -hacking LLVM source.
  • -
  • Doxygen generated documentation ( classes)
  • @@ -205,6 +205,6 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!">LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/09/19 23:15:47 $ + Last modified: $Date: 2004/10/25 19:39:46 $ From reid at x10sys.com Mon Oct 25 14:55:04 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 25 Oct 2004 12:55:04 -0700 Subject: [llvm-commits] CVS: llvm/docs/index.html In-Reply-To: <200410251939.OAA17669@apoc.cs.uiuc.edu> References: <200410251939.OAA17669@apoc.cs.uiuc.edu> Message-ID: <417D5A18.8050204@x10sys.com> I wasn't going to do this until the doc was a little more ready. Chris Lattner wrote: > Changes in directory llvm/docs: > > index.html updated: 1.31 -> 1.32 > --- > Log message: > > add a link to the makefile guide, eliminate redundant link to coding stds > > > --- > Diffs of the changes: (+5 -5) > > Index: llvm/docs/index.html > diff -u llvm/docs/index.html:1.31 llvm/docs/index.html:1.32 > --- llvm/docs/index.html:1.31 Sun Sep 19 18:15:47 2004 > +++ llvm/docs/index.html Mon Oct 25 14:39:46 2004 > @@ -96,10 +96,13 @@ > code to be located outside (or inside) the llvm/ tree, while using LLVM > header files and libraries. > > +
  • LLVM Makefile Guide - Describes how the > +LLVM makefiles work and how to use them.
  • > + >
  • CommandLine library Reference Manual - > Provides information on using the command line parsing library.
  • > > -
  • Recommended LLVM Coding standards - > +
  • LLVM Coding standards - > Details the LLVM coding standards and provides useful information on writing > efficient C++ code.
  • > > @@ -110,9 +113,6 @@ >
  • Extending LLVM - Look here to see how > to add instructions and intrinsics to LLVM.
  • > > -
  • Coding Standards - Guidelines for > -hacking LLVM source.
  • > - >
  • Doxygen generated > documentation ( > classes)
  • > @@ -205,6 +205,6 @@ > src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> > > LLVM Compiler Infrastructure
    > - Last modified: $Date: 2004/09/19 23:15:47 $ > + Last modified: $Date: 2004/10/25 19:39:46 $ > > > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvm-commits > From sabre at nondot.org Mon Oct 25 15:15:33 2004 From: sabre at nondot.org (Chris Lattner) Date: Mon, 25 Oct 2004 15:15:33 -0500 (CDT) Subject: [llvm-commits] CVS: llvm/docs/index.html In-Reply-To: <417D5A18.8050204@x10sys.com> Message-ID: On Mon, 25 Oct 2004, Reid Spencer wrote: > I wasn't going to do this until the doc was a little more ready. Okay, if you want, I'll drop the link. However, I think there is already quite a bit of content, and it does say it's a work in progress :) -chris > Chris Lattner wrote: > > > Changes in directory llvm/docs: > > > > index.html updated: 1.31 -> 1.32 > > --- > > Log message: > > > > add a link to the makefile guide, eliminate redundant link to coding stds > > > > > > --- > > Diffs of the changes: (+5 -5) > > > > Index: llvm/docs/index.html > > diff -u llvm/docs/index.html:1.31 llvm/docs/index.html:1.32 > > --- llvm/docs/index.html:1.31 Sun Sep 19 18:15:47 2004 > > +++ llvm/docs/index.html Mon Oct 25 14:39:46 2004 > > @@ -96,10 +96,13 @@ > > code to be located outside (or inside) the llvm/ tree, while using LLVM > > header files and libraries. > > > > +
  • LLVM Makefile Guide - Describes how the > > +LLVM makefiles work and how to use them.
  • > > + > >
  • CommandLine library Reference Manual - > > Provides information on using the command line parsing library.
  • > > > > -
  • Recommended LLVM Coding standards - > > +
  • LLVM Coding standards - > > Details the LLVM coding standards and provides useful information on writing > > efficient C++ code.
  • > > > > @@ -110,9 +113,6 @@ > >
  • Extending LLVM - Look here to see how > > to add instructions and intrinsics to LLVM.
  • > > > > -
  • Coding Standards - Guidelines for > > -hacking LLVM source.
  • > > - > >
  • Doxygen generated > > documentation ( > > classes)
  • > > @@ -205,6 +205,6 @@ > > src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"> > > > > LLVM Compiler Infrastructure
    > > - Last modified: $Date: 2004/09/19 23:15:47 $ > > + Last modified: $Date: 2004/10/25 19:39:46 $ > > > > > > > > > > > > _______________________________________________ > > llvm-commits mailing list > > llvm-commits at cs.uiuc.edu > > http://mail.cs.uiuc.edu/mailman/listinfo/llvm-commits > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvm-commits > -Chris -- http://llvm.org/ http://nondot.org/sabre/ From gaeke at cs.uiuc.edu Mon Oct 25 15:21:50 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon, 25 Oct 2004 15:21:50 -0500 (CDT) Subject: [llvm-commits] CVS: llvm-test/Makefile.f2c Message-ID: <200410252021.PAA18532@seraph.cs.uiuc.edu> Changes in directory llvm-test: Makefile.f2c updated: 1.3 -> 1.4 --- Log message: Use a better-behaved and more-recent f2c. Eliminate >&, which does not work in Makefile shell scripts, which are executed by some flavor of Bourne shell. --- Diffs of the changes: (+2 -2) Index: llvm-test/Makefile.f2c diff -u llvm-test/Makefile.f2c:1.3 llvm-test/Makefile.f2c:1.4 --- llvm-test/Makefile.f2c:1.3 Fri Oct 15 15:45:18 2004 +++ llvm-test/Makefile.f2c Mon Oct 25 15:21:35 2004 @@ -16,7 +16,7 @@ F2C_DIR = /home/vadve/shared/localtools/x86 else ifeq ($(ARCH),Sparc) - F2C_DIR = /usr/dcs/software/unsupported + F2C_DIR = /home/vadve/shared/localtools/sparc endif endif @@ -28,7 +28,7 @@ rm -f $(Source:%.f=%.c) %.c: %.f - $(F2C) $< >& /dev/null + $(F2C) $< > /dev/null 2>&1 CPPFLAGS = -I$(F2C_INC) LDFLAGS += -L$(F2C_LIB) -lf2c From lattner at cs.uiuc.edu Mon Oct 25 15:27:00 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 15:27:00 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Olden/bisort/bitonic.c Message-ID: <200410252027.PAA13691@apoc.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Olden/bisort: bitonic.c updated: 1.4 -> 1.5 --- Log message: Reduce the output file generated by each configuration from 14M to 55K. --- Diffs of the changes: (+3 -1) Index: llvm-test/MultiSource/Benchmarks/Olden/bisort/bitonic.c diff -u llvm-test/MultiSource/Benchmarks/Olden/bisort/bitonic.c:1.4 llvm-test/MultiSource/Benchmarks/Olden/bisort/bitonic.c:1.5 --- llvm-test/MultiSource/Benchmarks/Olden/bisort/bitonic.c:1.4 Thu Jul 11 13:10:10 2002 +++ llvm-test/MultiSource/Benchmarks/Olden/bisort/bitonic.c Mon Oct 25 15:26:46 2004 @@ -32,7 +32,9 @@ l = h->left; r = h->right; InOrder(l); - printf("%d @ 0x%x\n",h->value, 0); + static unsigned char counter = 0; + if (counter++ == 0) /* reduce IO */ + printf("%d @ 0x%x\n",h->value, 0); InOrder(r); } } From lattner at cs.uiuc.edu Mon Oct 25 15:36:08 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 15:36:08 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/broken_light.h light.cpp main.cpp vehicle.cpp Message-ID: <200410252036.PAA14325@apoc.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C++/city: broken_light.h updated: 1.2 -> 1.3 light.cpp updated: 1.1 -> 1.2 main.cpp updated: 1.5 -> 1.6 vehicle.cpp updated: 1.2 -> 1.3 --- Log message: Reduce the size of the out-* files from 1.37M to 1K for each configuration --- Diffs of the changes: (+6 -6) Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/broken_light.h diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/broken_light.h:1.2 llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/broken_light.h:1.3 --- llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/broken_light.h:1.2 Mon Oct 4 16:08:35 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/broken_light.h Mon Oct 25 15:35:57 2004 @@ -19,7 +19,7 @@ inline int broken_light::next_state() { - cout << "next state called\n"; + //cout << "next state called\n"; if ((random() % 4) == 1) return (current_state); else Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/light.cpp diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/light.cpp:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/light.cpp:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/light.cpp:1.1 Mon Oct 4 15:01:13 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/light.cpp Mon Oct 25 15:35:57 2004 @@ -10,7 +10,7 @@ { current_state = this->next_state(); - cout << "current state = "<< current_state << '\n'; + //cout << "current state = "<< current_state << '\n'; time_remaining_in_current_state = time_in_state[current_state]; } } Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/main.cpp diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/main.cpp:1.5 llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/main.cpp:1.6 --- llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/main.cpp:1.5 Mon Oct 4 19:30:21 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/main.cpp Mon Oct 25 15:35:57 2004 @@ -73,7 +73,7 @@ for(i = 0; i < 100000; i++) { - cout << l << "\n"; + //cout << l << "\n"; l.tick(); } @@ -96,8 +96,8 @@ for(i=0; i< 100000; i++) { - cout << '\n' << i << ' ' << c << '\n'; + //cout << '\n' << i << ' ' << c << '\n'; c.tick(); } - cout << i << ' ' << c << '\n'; + //cout << i << ' ' << c << '\n'; } Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/vehicle.cpp diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/vehicle.cpp:1.2 llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/vehicle.cpp:1.3 --- llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/vehicle.cpp:1.2 Mon Oct 4 16:19:30 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C++/city/vehicle.cpp Mon Oct 25 15:35:57 2004 @@ -80,7 +80,7 @@ if (used == 0) { - cout << "vehicle::select_move "<< *this << " has no where to go!\n"; + //cout << "vehicle::select_move "<< *this << " has no where to go!\n"; return(NO_DIRECTION); } else From lattner at cs.uiuc.edu Mon Oct 25 15:53:54 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 15:53:54 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp Message-ID: <200410252053.PAA14774@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PowerPCTargetMachine.cpp updated: 1.35 -> 1.36 --- Log message: Disable the JIT until it can sorta kinda work. --- Diffs of the changes: (+1 -0) Index: llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp diff -u llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.35 llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.36 --- llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.35 Sun Oct 10 11:26:13 2004 +++ llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp Mon Oct 25 15:53:41 2004 @@ -58,6 +58,7 @@ {} unsigned PowerPCTargetMachine::getJITMatchQuality() { + return 0; #if defined(__POWERPC__) || defined (__ppc__) || defined(_POWER) return 10; #else From lattner at cs.uiuc.edu Mon Oct 25 17:13:16 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 17:13:16 -0500 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200410252213.RAA15033@apoc.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.245 -> 1.246 --- Log message: Bug fixed --- Diffs of the changes: (+3 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.245 llvm/docs/ReleaseNotes.html:1.246 --- llvm/docs/ReleaseNotes.html:1.245 Sat Oct 16 14:13:58 2004 +++ llvm/docs/ReleaseNotes.html Mon Oct 25 17:13:02 2004 @@ -173,6 +173,8 @@ broken in LLVM 1.3
  • [bcwriter] Empty compaction tables defined
  • +
  • [X86] llc output for functions w/certain + names tickles GNU 'as' bugs
  • Bugs in the C/C++ front-end:

    @@ -624,7 +626,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/10/16 19:13:58 $ + Last modified: $Date: 2004/10/25 22:13:02 $ From lattner at cs.uiuc.edu Mon Oct 25 17:14:40 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 17:14:40 -0500 Subject: [llvm-commits] CVS: llvm-www/releases/1.3/docs/ReleaseNotes.html Message-ID: <200410252214.RAA15051@apoc.cs.uiuc.edu> Changes in directory llvm-www/releases/1.3/docs: ReleaseNotes.html updated: 1.8 -> 1.9 --- Log message: Bug "found" --- Diffs of the changes: (+4 -2) Index: llvm-www/releases/1.3/docs/ReleaseNotes.html diff -u llvm-www/releases/1.3/docs/ReleaseNotes.html:1.8 llvm-www/releases/1.3/docs/ReleaseNotes.html:1.9 --- llvm-www/releases/1.3/docs/ReleaseNotes.html:1.8 Mon Oct 4 19:23:28 2004 +++ llvm-www/releases/1.3/docs/ReleaseNotes.html Mon Oct 25 17:14:29 2004 @@ -710,8 +710,10 @@ @@ -789,7 +791,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/10/05 00:23:28 $ + Last modified: $Date: 2004/10/25 22:14:29 $ From lattner at cs.uiuc.edu Mon Oct 25 21:58:24 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 21:58:24 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410260258.VAA15965@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.211 -> 1.212 --- Log message: Give a useful hint --- Diffs of the changes: (+1 -1) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.211 llvm/Makefile.rules:1.212 --- llvm/Makefile.rules:1.211 Mon Oct 25 03:27:37 2004 +++ llvm/Makefile.rules Mon Oct 25 21:58:10 2004 @@ -860,7 +860,7 @@ else ifeq ($(LLVM_TARBALL_NAME),) -$(error LLVM_TARBALL_NAME is empty) +$(error LLVM_TARBALL_NAME is empty. Please rerun configure) endif ifneq ($(LEVEL),.) From reid at x10sys.com Mon Oct 25 22:12:22 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 25 Oct 2004 22:12:22 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Makefile Message-ID: <200410260312.WAA08163@zion.cs.uiuc.edu> Changes in directory llvm/lib/System: Makefile updated: 1.4 -> 1.5 --- Log message: Add EXTRA_DIST for additional files to be distributed. --- Diffs of the changes: (+2 -0) Index: llvm/lib/System/Makefile diff -u llvm/lib/System/Makefile:1.4 llvm/lib/System/Makefile:1.5 --- llvm/lib/System/Makefile:1.4 Wed Aug 25 01:23:45 2004 +++ llvm/lib/System/Makefile Mon Oct 25 22:12:11 2004 @@ -10,4 +10,6 @@ LIBRARYNAME = LLVMsystem BUILD_ARCHIVE = 1 +EXTRA_DIST = AIX Cygwin Darwin FreeBSD Interix Linux SunOS Unix Win32 + include $(LEVEL)/Makefile.common From reid at x10sys.com Mon Oct 25 22:12:22 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 25 Oct 2004 22:12:22 -0500 Subject: [llvm-commits] CVS: llvm/runtime/GC/Makefile Message-ID: <200410260312.WAA08166@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GC: Makefile updated: 1.2 -> 1.3 --- Log message: Add EXTRA_DIST for additional files to be distributed. --- Diffs of the changes: (+1 -0) Index: llvm/runtime/GC/Makefile diff -u llvm/runtime/GC/Makefile:1.2 llvm/runtime/GC/Makefile:1.3 --- llvm/runtime/GC/Makefile:1.2 Mon Aug 9 15:23:44 2004 +++ llvm/runtime/GC/Makefile Mon Oct 25 22:12:11 2004 @@ -9,6 +9,7 @@ LEVEL = ../.. PARALLEL_DIRS := SemiSpace +EXTRA_DIST := gc_exported_symbols.lst include $(LEVEL)/Makefile.common # Install target for libraries: Copy into $LLVMGCCDIR/bytecode-libs From reid at x10sys.com Mon Oct 25 22:12:22 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 25 Oct 2004 22:12:22 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvmc/Makefile Message-ID: <200410260312.WAA08167@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvmc: Makefile updated: 1.6 -> 1.7 --- Log message: Add EXTRA_DIST for additional files to be distributed. --- Diffs of the changes: (+1 -0) Index: llvm/tools/llvmc/Makefile diff -u llvm/tools/llvmc/Makefile:1.6 llvm/tools/llvmc/Makefile:1.7 --- llvm/tools/llvmc/Makefile:1.6 Sun Aug 29 14:26:56 2004 +++ llvm/tools/llvmc/Makefile Mon Oct 25 22:12:11 2004 @@ -10,5 +10,6 @@ TOOLNAME = llvmc USEDLIBS = bcreader vmcore support.a LLVMsystem.a CONFIG_FILES = st ll +EXTRA_DIST = st ll include $(LEVEL)/Makefile.common From reid at x10sys.com Mon Oct 25 22:12:22 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 25 Oct 2004 22:12:22 -0500 Subject: [llvm-commits] CVS: llvm/utils/Burg/Makefile Message-ID: <200410260312.WAA08168@zion.cs.uiuc.edu> Changes in directory llvm/utils/Burg: Makefile updated: 1.27 -> 1.28 --- Log message: Add EXTRA_DIST for additional files to be distributed. --- Diffs of the changes: (+2 -0) Index: llvm/utils/Burg/Makefile diff -u llvm/utils/Burg/Makefile:1.27 llvm/utils/Burg/Makefile:1.28 --- llvm/utils/Burg/Makefile:1.27 Fri Oct 22 18:05:46 2004 +++ llvm/utils/Burg/Makefile Mon Oct 25 22:12:11 2004 @@ -10,6 +10,8 @@ TOOLNAME = burg BUILT_SOURCES = gram.tab.c +EXTRA_DIST = gram.yc gram.tab.c gram.tab.h sample.gr + include $(LEVEL)/Makefile.common gram.tab.c gram.tab.h: gram.yc From reid at x10sys.com Mon Oct 25 22:12:22 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 25 Oct 2004 22:12:22 -0500 Subject: [llvm-commits] CVS: llvm/tools/Makefile Message-ID: <200410260312.WAA08175@zion.cs.uiuc.edu> Changes in directory llvm/tools: Makefile updated: 1.32 -> 1.33 --- Log message: Add EXTRA_DIST for additional files to be distributed. --- Diffs of the changes: (+2 -0) Index: llvm/tools/Makefile diff -u llvm/tools/Makefile:1.32 llvm/tools/Makefile:1.33 --- llvm/tools/Makefile:1.32 Sun Sep 12 20:18:30 2004 +++ llvm/tools/Makefile Mon Oct 25 22:12:11 2004 @@ -12,6 +12,8 @@ llvm-stub analyze extract bugpoint llvm-nm llvm-prof llvm-db \ llvm-ar llvm-bcanalyzer llee +EXTRA_DIST := Makefile.JIT + include $(LEVEL)/Makefile.config ifeq ($(ARCH), Sparc) From reid at x10sys.com Mon Oct 25 22:12:23 2004 From: reid at x10sys.com (Reid Spencer) Date: Mon, 25 Oct 2004 22:12:23 -0500 Subject: [llvm-commits] CVS: llvm/runtime/libprofile/Makefile Message-ID: <200410260312.WAA08178@zion.cs.uiuc.edu> Changes in directory llvm/runtime/libprofile: Makefile updated: 1.1 -> 1.2 --- Log message: Add EXTRA_DIST for additional files to be distributed. --- Diffs of the changes: (+2 -1) Index: llvm/runtime/libprofile/Makefile diff -u llvm/runtime/libprofile/Makefile:1.1 llvm/runtime/libprofile/Makefile:1.2 --- llvm/runtime/libprofile/Makefile:1.1 Tue Oct 28 12:56:51 2003 +++ llvm/runtime/libprofile/Makefile Mon Oct 25 22:12:11 2004 @@ -11,7 +11,8 @@ SHARED_LIBRARY=1 #DONT_BUILD_RELINKED=1 LIBRARYNAME=profile_rt -EXPORTED_SYMBOL_FILE = $(SourceDir)/exported_symbols.lst +EXTRA_DIST = exported_symbols.lst +EXPORTED_SYMBOL_FILE = $(BUILD_SRC_DIR)/exported_symbols.lst include $(LEVEL)/Makefile.common From natebegeman at mac.com Mon Oct 25 22:48:36 2004 From: natebegeman at mac.com (Nate Begeman) Date: Mon, 25 Oct 2004 22:48:36 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Message-ID: <200410260348.WAA08791@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32ISelSimple.cpp updated: 1.98 -> 1.99 --- Log message: Fix treecc. Also fix a latent bug in emitBinaryConstOperation that would allow and const, 0 to be incorrectly codegen'd into a rlwinm instruction. --- Diffs of the changes: (+46 -64) Index: llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp diff -u llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.98 llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.99 --- llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp:1.98 Sun Oct 24 05:33:30 2004 +++ llvm/lib/Target/PowerPC/PPC32ISelSimple.cpp Mon Oct 25 22:48:25 2004 @@ -341,17 +341,13 @@ /// emitBitfieldInsert - return true if we were able to fold the sequence of /// instructions into a bitfield insert (rlwimi). - bool emitBitfieldInsert(MachineBasicBlock *MBB, - MachineBasicBlock::iterator IP, - User *OpUser, unsigned DestReg); + bool emitBitfieldInsert(User *OpUser, unsigned DestReg); /// emitBitfieldExtract - return true if we were able to fold the sequence /// of instructions into a bitfield extract (rlwinm). bool emitBitfieldExtract(MachineBasicBlock *MBB, MachineBasicBlock::iterator IP, - BinaryOperator *AndI, Value *Op, - unsigned Amount, bool isLeftShift, - unsigned DestReg); + User *OpUser, unsigned DestReg); /// emitBinaryConstOperation - Used by several functions to emit simple /// arithmetic and logical operations with constants on a register rather @@ -410,7 +406,8 @@ void emitShiftOperation(MachineBasicBlock *MBB, MachineBasicBlock::iterator IP, Value *Op, Value *ShiftAmount, bool isLeftShift, - const Type *ResultTy, unsigned DestReg); + const Type *ResultTy, ShiftInst *SI, + unsigned DestReg); /// emitSelectOperation - Common code shared between visitSelectInst and the /// constant expression support. @@ -2234,9 +2231,7 @@ /// 2. or and, shl 6. or and, (shl-and) /// 3. or shr, and 7. or (shr-and), and /// 4. or and, shr 8. or and, (shr-and) -bool PPC32ISel::emitBitfieldInsert(MachineBasicBlock *MBB, - MachineBasicBlock::iterator IP, - User *OpUser, unsigned DestReg) { +bool PPC32ISel::emitBitfieldInsert(User *OpUser, unsigned DestReg) { // Instructions to skip if we match any of the patterns Instruction *Op0User, *Op1User = 0, *OptAndI = 0, *OrI = 0; unsigned TgtMask, InsMask, Amount = 0; @@ -2288,45 +2283,39 @@ /// rotate left word immediate then and with mask (rlwinm) instruction. bool PPC32ISel::emitBitfieldExtract(MachineBasicBlock *MBB, MachineBasicBlock::iterator IP, - BinaryOperator *BO, Value *Op, - unsigned Amount, bool isLeftShift, - unsigned DestReg) { + User *OpUser, unsigned DestReg) { return false; - if (BO && BO->getOpcode() == Instruction::And) { - // Since the powerpc shift instructions are really rotate left, subtract 32 - // to simulate a right shift. - unsigned Rotate = (isLeftShift) ? Amount : 32 - Amount; - - if (ConstantInt *CI = dyn_cast(BO->getOperand(1))) { - unsigned Imm = CI->getRawValue(), MB, ME; - // In the case of a left shift or unsigned right shift, be sure to clear - // any bits that would have been zeroes shifted in from the left or right. - // Usually instcombine will do this for us, but there's no guarantee the - // optimization has been performed already. - // - // Also, take this opportunity to check for the algebraic right shift case - // where the mask would overlap sign bits shifted in from the left. We do - // not want to perform the optimization in that case since we could clear - // bits that should be set. Think of int (x >> 17) & 0x0000FFFF; - unsigned mask = 0xFFFFFFFF; - if (isLeftShift) - Imm &= (mask << Amount); - else if (!isLeftShift && !Op->getType()->isSigned()) - Imm &= (mask >> Amount); - else if (((mask << Rotate) & Imm) != 0) - return false; - - if (isRunOfOnes(Imm, MB, ME)) { - unsigned SrcReg = getReg(Op, MBB, IP); - BuildMI(*MBB, IP, PPC::RLWINM, 4, DestReg).addReg(SrcReg) - .addImm(Rotate).addImm(MB).addImm(ME); - BO->replaceAllUsesWith(Op->use_back()); - SkipList.push_back(BO); - return true; - } - } + /* + // Instructions to skip if we match any of the patterns + Instruction *Op0User, *Op1User = 0; + unsigned ShiftMask, AndMask, Amount = 0; + bool matched = false; + + // We require OpUser to be an instruction to continue + Op0User = dyn_cast(OpUser); + if (0 == Op0User) + return false; + + if (isExtractShiftHalf) + if (isExtractAndHalf) + matched = true; + + if (matched == false && isExtractAndHalf) + if (isExtractShiftHalf) + matched = true; + + if (matched == false) + return false; + + if (isRunOfOnes(Imm, MB, ME)) { + unsigned SrcReg = getReg(Op, MBB, IP); + BuildMI(*MBB, IP, PPC::RLWINM, 4, DestReg).addReg(SrcReg).addImm(Rotate) + .addImm(MB).addImm(ME); + Op1User->replaceAllUsesWith(Op0User); + SkipList.push_back(BO); + return true; } - return false; + */ } /// emitBinaryConstOperation - Implement simple binary operators for integral @@ -2361,7 +2350,7 @@ } } - if (Opcode == 2) { + if (Opcode == 2 && !CI->isNullValue()) { unsigned MB, ME, mask = CI->getRawValue(); if (isRunOfOnes(mask, MB, ME)) { BuildMI(*MBB, IP, PPC::RLWINM, 4, DestReg).addReg(Op0Reg).addImm(0) @@ -2467,7 +2456,7 @@ // Special case: op Reg, if (ConstantInt *CI = dyn_cast(Op1)) if (Class != cLong) { - if (emitBitfieldInsert(MBB, IP, BO, DestReg)) + if (emitBitfieldInsert(BO, DestReg)) return; unsigned Op0r = getReg(Op0, MBB, IP); @@ -2575,7 +2564,7 @@ // If the element size is exactly a power of 2, use a shift to get it. if (unsigned Shift = ExactLog2(CI->getRawValue())) { ConstantUInt *ShiftCI = ConstantUInt::get(Type::UByteTy, Shift); - emitShiftOperation(MBB, IP, Op0, ShiftCI, true, Op0->getType(), DestReg); + emitShiftOperation(MBB, IP, Op0, ShiftCI, true, Op0->getType(), 0, DestReg); return; } @@ -2770,7 +2759,7 @@ MachineBasicBlock::iterator IP = BB->end(); emitShiftOperation(BB, IP, I.getOperand(0), I.getOperand(1), I.getOpcode() == Instruction::Shl, I.getType(), - getReg(I)); + &I, getReg(I)); } /// emitShiftOperation - Common code shared between visitShiftInst and @@ -2779,8 +2768,8 @@ void PPC32ISel::emitShiftOperation(MachineBasicBlock *MBB, MachineBasicBlock::iterator IP, Value *Op, Value *ShiftAmount, - bool isLeftShift, const Type *ResultTy, - unsigned DestReg) { + bool isLeftShift, const Type *ResultTy, + ShiftInst *SI, unsigned DestReg) { bool isSigned = ResultTy->isSigned (); unsigned Class = getClass (ResultTy); @@ -2926,16 +2915,8 @@ // If this is a shift with one use, and that use is an And instruction, // then attempt to emit a bitfield operation. - User *U = Op->use_back(); - if (U->hasOneUse()) { - BinaryOperator *BO = dyn_cast(*(U->use_begin())); - if (BO) { - if (emitBitfieldInsert(MBB, IP, U, DestReg)) - return; - if (emitBitfieldExtract(MBB, IP, BO, Op, Amount, isLeftShift, DestReg)) - return; - } - } + if (SI && emitBitfieldInsert(SI, DestReg)) + return; unsigned SrcReg = getReg (Op, MBB, IP); if (isLeftShift) { @@ -3325,7 +3306,8 @@ unsigned CallReg = makeAnotherReg(DestTy); unsigned ShiftedReg = makeAnotherReg(SrcTy); ConstantSInt *Const1 = ConstantSInt::get(Type::IntTy, 1); - emitShiftOperation(BB, BB->end(), Src, Const1, false, SrcTy, ShiftedReg); + emitShiftOperation(BB, BB->end(), Src, Const1, false, SrcTy, 0, + ShiftedReg); SetArgs.push_back(ValueRecord(ShiftedReg, SrcTy)); TheCall = BuildMI(PPC::CALLpcrel, 1).addGlobalAddress(floatFn, true); doCall(ValueRecord(CallReg, DestTy), TheCall, SetArgs, false); From natebegeman at mac.com Mon Oct 25 23:11:03 2004 From: natebegeman at mac.com (Nate Begeman) Date: Mon, 25 Oct 2004 23:11:03 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/README.txt Message-ID: <200410260411.XAA09387@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: README.txt updated: 1.19 -> 1.20 --- Log message: Update to-do list --- Diffs of the changes: (+2 -1) Index: llvm/lib/Target/PowerPC/README.txt diff -u llvm/lib/Target/PowerPC/README.txt:1.19 llvm/lib/Target/PowerPC/README.txt:1.20 --- llvm/lib/Target/PowerPC/README.txt:1.19 Sat Sep 4 00:00:00 2004 +++ llvm/lib/Target/PowerPC/README.txt Mon Oct 25 23:10:53 2004 @@ -1,7 +1,8 @@ TODO: * implement not-R0 register GPR class -* fix rlwimi generation to be use-and-def * implement scheduling info +* implement do-loop pass +* implement do-loop -> bdnz transform * implement powerpc-64 for darwin * implement powerpc-64 for aix * use stfiwx in float->int From lattner at cs.uiuc.edu Mon Oct 25 23:51:43 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 23:51:43 -0500 Subject: [llvm-commits] CVS: llvm-test/External/Makefile Message-ID: <200410260451.XAA19650@apoc.cs.uiuc.edu> Changes in directory llvm-test/External: Makefile updated: 1.17 -> 1.18 --- Log message: Really disable these directories --- Diffs of the changes: (+3 -3) Index: llvm-test/External/Makefile diff -u llvm-test/External/Makefile:1.17 llvm-test/External/Makefile:1.18 --- llvm-test/External/Makefile:1.17 Sat Oct 23 18:44:43 2004 +++ llvm-test/External/Makefile Mon Oct 25 23:51:30 2004 @@ -11,16 +11,16 @@ PARALLEL_DIRS := SPEC Povray Namd ifndef USE_POVRAY -PARALLEL_DIRS := $(filter-out Povray/, $(PARALLEL_DIRS)) +PARALLEL_DIRS := $(filter-out Povray, $(PARALLEL_DIRS)) endif ifndef USE_NAMD -PARALLEL_DIRS := $(filter-out Namd/, $(PARALLEL_DIRS)) +PARALLEL_DIRS := $(filter-out Namd, $(PARALLEL_DIRS)) endif # Sparc can't handle Namd: infinite loop, cause unknown ifeq ($(ARCH),Sparc) -PARALLEL_DIRS := $(filter-out Namd/, $(PARALLEL_DIRS)) +PARALLEL_DIRS := $(filter-out Namd, $(PARALLEL_DIRS)) endif include Makefile.external From lattner at cs.uiuc.edu Mon Oct 25 23:52:02 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon, 25 Oct 2004 23:52:02 -0500 Subject: [llvm-commits] CVS: llvm-test/External/SPEC/Makefile Message-ID: <200410260452.XAA19661@apoc.cs.uiuc.edu> Changes in directory llvm-test/External/SPEC: Makefile updated: 1.17 -> 1.18 --- Log message: Really filter these out --- Diffs of the changes: (+4 -4) Index: llvm-test/External/SPEC/Makefile diff -u llvm-test/External/SPEC/Makefile:1.17 llvm-test/External/SPEC/Makefile:1.18 --- llvm-test/External/SPEC/Makefile:1.17 Thu Oct 7 16:54:18 2004 +++ llvm-test/External/SPEC/Makefile Mon Oct 25 23:51:51 2004 @@ -6,13 +6,13 @@ # Remove SPEC95 and SPEC2000 per the user's configuration # ifndef USE_SPEC2000 -PARALLEL_DIRS := $(filter-out CFP2000/, $(PARALLEL_DIRS)) -PARALLEL_DIRS := $(filter-out CINT2000/, $(PARALLEL_DIRS)) +PARALLEL_DIRS := $(filter-out CFP2000, $(PARALLEL_DIRS)) +PARALLEL_DIRS := $(filter-out CINT2000, $(PARALLEL_DIRS)) endif ifndef USE_SPEC95 -PARALLEL_DIRS := $(filter-out CFP95/, $(PARALLEL_DIRS)) -PARALLEL_DIRS := $(filter-out CINT95/, $(PARALLEL_DIRS)) +PARALLEL_DIRS := $(filter-out CFP95, $(PARALLEL_DIRS)) +PARALLEL_DIRS := $(filter-out CINT95, $(PARALLEL_DIRS)) endif include $(LEVEL)/Makefile.programs From lattner at cs.uiuc.edu Tue Oct 26 00:29:32 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 00:29:32 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Message-ID: <200410260529.AAA32657@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.131 -> 1.132 --- Log message: Reduce usage of MRegisterInfo::getRegClass --- Diffs of the changes: (+6 -5) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.131 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.132 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.131 Mon Oct 25 13:40:47 2004 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Tue Oct 26 00:29:18 2004 @@ -658,15 +658,16 @@ /// classes. The registers may be either phys or virt regs. bool LiveIntervals::differingRegisterClasses(unsigned RegA, unsigned RegB) const { - const TargetRegisterClass *RegClass; // Get the register classes for the first reg. - if (MRegisterInfo::isVirtualRegister(RegA)) - RegClass = mf_->getSSARegMap()->getRegClass(RegA); - else - RegClass = mri_->getRegClass(RegA); + if (MRegisterInfo::isPhysicalRegister(RegA)) { + assert(MRegisterInfo::isVirtualRegister(RegB) && + "Shouldn't consider two physregs!"); + return !mf_->getSSARegMap()->getRegClass(RegB)->contains(RegA); + } // Compare against the regclass for the second reg. + const TargetRegisterClass *RegClass = mf_->getSSARegMap()->getRegClass(RegA); if (MRegisterInfo::isVirtualRegister(RegB)) return RegClass != mf_->getSSARegMap()->getRegClass(RegB); else From lattner at cs.uiuc.edu Tue Oct 26 00:35:27 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 00:35:27 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/ExecutionEngine.cpp Message-ID: <200410260535.AAA03312@apoc.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine: ExecutionEngine.cpp updated: 1.60 -> 1.61 --- Log message: Fix the interpreter crash that Michael McCracken found --- Diffs of the changes: (+1 -0) Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp diff -u llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.60 llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.61 --- llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.60 Sat Oct 16 13:19:26 2004 +++ llvm/lib/ExecutionEngine/ExecutionEngine.cpp Tue Oct 26 00:35:14 2004 @@ -170,6 +170,7 @@ /// GenericValue ExecutionEngine::getConstantValue(const Constant *C) { GenericValue Result; + if (isa(C)) return Result; if (ConstantExpr *CE = const_cast(dyn_cast(C))) { switch (CE->getOpcode()) { From natebegeman at mac.com Tue Oct 26 00:40:56 2004 From: natebegeman at mac.com (Nate Begeman) Date: Tue, 26 Oct 2004 00:40:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32RegisterInfo.cpp PPC64RegisterInfo.cpp Message-ID: <200410260540.AAA11050@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PPC32RegisterInfo.cpp updated: 1.6 -> 1.7 PPC64RegisterInfo.cpp updated: 1.6 -> 1.7 --- Log message: Eliminate usage of MRegisterInfo::getRegClass(physreg) --- Diffs of the changes: (+18 -9) Index: llvm/lib/Target/PowerPC/PPC32RegisterInfo.cpp diff -u llvm/lib/Target/PowerPC/PPC32RegisterInfo.cpp:1.6 llvm/lib/Target/PowerPC/PPC32RegisterInfo.cpp:1.7 --- llvm/lib/Target/PowerPC/PPC32RegisterInfo.cpp:1.6 Mon Sep 27 00:07:25 2004 +++ llvm/lib/Target/PowerPC/PPC32RegisterInfo.cpp Tue Oct 26 00:40:45 2004 @@ -48,6 +48,13 @@ ImmToIdxMap[PPC::ADDI] = PPC::ADD; } +static const TargetRegisterClass *getClass(unsigned SrcReg) { + if (PPC32::FPRCRegisterClass->contains(SrcReg)) + return PPC32::FPRCRegisterClass; + assert(PPC32::GPRCRegisterClass->contains(SrcReg) && "Reg not FPR or GPR"); + return PPC32::GPRCRegisterClass; +} + static unsigned getIdx(const TargetRegisterClass *RC) { if (RC == PPC32::GPRCRegisterClass) { switch (RC->getSize()) { @@ -71,12 +78,10 @@ PPC32RegisterInfo::storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned SrcReg, int FrameIdx) const { - const TargetRegisterClass *RC = getRegClass(SrcReg); static const unsigned Opcode[] = { PPC::STB, PPC::STH, PPC::STW, PPC::STFS, PPC::STFD }; - - unsigned OC = Opcode[getIdx(RC)]; + unsigned OC = Opcode[getIdx(getClass(SrcReg))]; if (SrcReg == PPC::LR) { BuildMI(MBB, MI, PPC::MFLR, 1, PPC::R11).addReg(PPC::LR); BuildMI(MBB, MI, PPC::IMPLICIT_DEF, 0, PPC::R0); @@ -94,8 +99,7 @@ static const unsigned Opcode[] = { PPC::LBZ, PPC::LHZ, PPC::LWZ, PPC::LFS, PPC::LFD }; - const TargetRegisterClass *RC = getRegClass(DestReg); - unsigned OC = Opcode[getIdx(RC)]; + unsigned OC = Opcode[getIdx(getClass(DestReg))]; if (DestReg == PPC::LR) { BuildMI(MBB, MI, PPC::IMPLICIT_DEF, 0, PPC::R0); addFrameReference(BuildMI(MBB, MI, OC, 2, PPC::R11), FrameIdx); Index: llvm/lib/Target/PowerPC/PPC64RegisterInfo.cpp diff -u llvm/lib/Target/PowerPC/PPC64RegisterInfo.cpp:1.6 llvm/lib/Target/PowerPC/PPC64RegisterInfo.cpp:1.7 --- llvm/lib/Target/PowerPC/PPC64RegisterInfo.cpp:1.6 Mon Sep 27 00:08:17 2004 +++ llvm/lib/Target/PowerPC/PPC64RegisterInfo.cpp Tue Oct 26 00:40:45 2004 @@ -48,6 +48,13 @@ ImmToIdxMap[PPC::ADDI] = PPC::ADD; } +static const TargetRegisterClass *getClass(unsigned SrcReg) { + if (PPC64::FPRCRegisterClass->contains(SrcReg)) + return PPC64::FPRCRegisterClass; + assert(PPC64::GPRCRegisterClass->contains(SrcReg) && "Reg not FPR or GPR"); + return PPC64::GPRCRegisterClass; +} + static unsigned getIdx(const TargetRegisterClass *RC) { if (RC == PPC64::GPRCRegisterClass) { switch (RC->getSize()) { @@ -75,8 +82,7 @@ static const unsigned Opcode[] = { PPC::STB, PPC::STH, PPC::STW, PPC::STD, PPC::STFS, PPC::STFD }; - const TargetRegisterClass *RC = getRegClass(SrcReg); - unsigned OC = Opcode[getIdx(RC)]; + unsigned OC = Opcode[getIdx(getClass(SrcReg))]; if (SrcReg == PPC::LR) { BuildMI(MBB, MI, PPC::MFLR, 1, PPC::R11).addReg(PPC::LR); BuildMI(MBB, MI, PPC::IMPLICIT_DEF, 0, PPC::R0); @@ -94,8 +100,7 @@ static const unsigned Opcode[] = { PPC::LBZ, PPC::LHZ, PPC::LWZ, PPC::LD, PPC::LFS, PPC::LFD }; - const TargetRegisterClass *RC = getRegClass(DestReg); - unsigned OC = Opcode[getIdx(RC)]; + unsigned OC = Opcode[getIdx(getClass(DestReg))]; if (DestReg == PPC::LR) { BuildMI(MBB, MI, PPC::IMPLICIT_DEF, 0, PPC::R0); addFrameReference(BuildMI(MBB, MI, OC, 2, PPC::R11), FrameIdx); From lattner at cs.uiuc.edu Tue Oct 26 00:46:31 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 00:46:31 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-db/CLIDebugger.cpp Commands.cpp Message-ID: <200410260546.AAA03840@apoc.cs.uiuc.edu> Changes in directory llvm/tools/llvm-db: CLIDebugger.cpp updated: 1.3 -> 1.4 Commands.cpp updated: 1.5 -> 1.6 --- Log message: Improve help output from llvm-db 'info' command. Patch contributed by Michael McCracken! --- Diffs of the changes: (+9 -3) Index: llvm/tools/llvm-db/CLIDebugger.cpp diff -u llvm/tools/llvm-db/CLIDebugger.cpp:1.3 llvm/tools/llvm-db/CLIDebugger.cpp:1.4 --- llvm/tools/llvm-db/CLIDebugger.cpp:1.3 Wed Sep 1 17:55:37 2004 +++ llvm/tools/llvm-db/CLIDebugger.cpp Tue Oct 26 00:46:17 2004 @@ -125,7 +125,10 @@ // addCommand("info", new BuiltinCLICommand( "Generic command for showing things about the program being debugged", - "FIXME: document\n", + "info functions: display information about functions in the program.\ninfo" + " source : display information about the current source file.\ninfo source" + "s : Display source file names for the program\ninfo target : print status" + " of inferior process\n", &CLIDebugger::infoCommand)); addCommand("list", C = new BuiltinCLICommand( Index: llvm/tools/llvm-db/Commands.cpp diff -u llvm/tools/llvm-db/Commands.cpp:1.5 llvm/tools/llvm-db/Commands.cpp:1.6 --- llvm/tools/llvm-db/Commands.cpp:1.5 Wed Sep 1 17:55:37 2004 +++ llvm/tools/llvm-db/Commands.cpp Tue Oct 26 00:46:17 2004 @@ -505,8 +505,11 @@ void CLIDebugger::infoCommand(std::string &Options) { std::string What = getToken(Options); - if (What.empty() || !getToken(Options).empty()) - throw "info command expects exactly one argument."; + if (What.empty() || !getToken(Options).empty()){ + std::string infoStr("info"); + helpCommand(infoStr); + return; + } if (What == "frame") { } else if (What == "functions") { From reid at x10sys.com Tue Oct 26 00:49:48 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Oct 2004 00:49:48 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/mkinstalldirs Message-ID: <200410260549.AAA11200@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: mkinstalldirs updated: 1.3 -> 1.4 --- Log message: Really get mkinstalldirs to shut up about what its doing .. who cares? --- Diffs of the changes: (+3 -3) Index: llvm/autoconf/mkinstalldirs diff -u llvm/autoconf/mkinstalldirs:1.3 llvm/autoconf/mkinstalldirs:1.4 --- llvm/autoconf/mkinstalldirs:1.3 Mon Oct 25 03:21:09 2004 +++ llvm/autoconf/mkinstalldirs Tue Oct 26 00:49:38 2004 @@ -89,7 +89,7 @@ *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - echo "mkdir -m $dirmode -p -- $*" + # echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. @@ -115,7 +115,7 @@ esac if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" + # echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? @@ -123,7 +123,7 @@ errstatus=$lasterr else if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" + # echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? From lattner at cs.uiuc.edu Tue Oct 26 00:53:53 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 00:53:53 -0500 Subject: [llvm-commits] CVS: llvm-gcc/gcc/llvm-ilist.h Message-ID: <200410260553.AAA03879@apoc.cs.uiuc.edu> Changes in directory llvm-gcc/gcc: llvm-ilist.h updated: 1.1 -> 1.2 --- Log message: Fix a bug in a currently unused macro. Patch contributed by Michael McCracken --- Diffs of the changes: (+1 -1) Index: llvm-gcc/gcc/llvm-ilist.h diff -u llvm-gcc/gcc/llvm-ilist.h:1.1 llvm-gcc/gcc/llvm-ilist.h:1.2 --- llvm-gcc/gcc/llvm-ilist.h:1.1 Thu Jan 8 16:35:32 2004 +++ llvm-gcc/gcc/llvm-ilist.h Tue Oct 26 00:53:40 2004 @@ -121,7 +121,7 @@ /* llvm_ilist_push_front - Add a preallocated node to the front of the list */ #define llvm_ilist_push_front(TYPE, LIST, NODE) do { \ TYPE *XXNode = NODE; \ - assert(!llvm_inlist(XXNode) && "node already in list!"); \ + assert(!llvm_ilist_inlist(XXNode) && "node already in list!"); \ XXNode->Next = LIST##First; XXNode->Prev = 0; \ LIST##First->Prev = XXNode; \ LIST##First = XXNode; \ From natebegeman at mac.com Tue Oct 26 01:00:41 2004 From: natebegeman at mac.com (Nate Begeman) Date: Tue, 26 Oct 2004 01:00:41 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h Message-ID: <200410260600.BAA11433@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: MRegisterInfo.h updated: 1.51 -> 1.52 --- Log message: Remove method getRegClass from MRegisterInfo, as it is no longer used. --- Diffs of the changes: (+0 -9) Index: llvm/include/llvm/Target/MRegisterInfo.h diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.51 llvm/include/llvm/Target/MRegisterInfo.h:1.52 --- llvm/include/llvm/Target/MRegisterInfo.h:1.51 Sun Aug 29 16:59:26 2004 +++ llvm/include/llvm/Target/MRegisterInfo.h Tue Oct 26 01:00:31 2004 @@ -175,15 +175,6 @@ /// const MRegisterDesc &get(unsigned RegNo) const { return operator[](RegNo); } - /// getRegClass - Return the register class for the specified physical - /// register. - /// - const TargetRegisterClass *getRegClass(unsigned RegNo) const { - assert(RegNo < NumRegs && "Register number out of range!"); - assert(PhysRegClasses[RegNo] && "Register is not in a class!"); - return PhysRegClasses[RegNo]; - } - /// getAliasSet - Return the set of registers aliased by the specified /// register, or a null list of there are none. The list returned is zero /// terminated. From natebegeman at mac.com Tue Oct 26 01:02:49 2004 From: natebegeman at mac.com (Nate Begeman) Date: Tue, 26 Oct 2004 01:02:49 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp PowerPCFrameInfo.h PowerPCRegisterInfo.h Message-ID: <200410260602.BAA11507@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: PowerPCAsmPrinter.cpp updated: 1.64 -> 1.65 PowerPCFrameInfo.h updated: 1.5 -> 1.6 PowerPCRegisterInfo.h (r1.7) removed --- Log message: Remove file that is no longer used, and move include of MRegisterInfo.h from PowerPCFrameInfo.h to PowerPCAsmPrinter.cpp where it is actually needed. --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp diff -u llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp:1.64 llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp:1.65 --- llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp:1.64 Fri Oct 22 23:58:32 2004 +++ llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp Tue Oct 26 01:02:38 2004 @@ -32,6 +32,7 @@ #include "llvm/Support/MathExtras.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" +#include "llvm/Target/MRegisterInfo.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/StringExtras.h" #include Index: llvm/lib/Target/PowerPC/PowerPCFrameInfo.h diff -u llvm/lib/Target/PowerPC/PowerPCFrameInfo.h:1.5 llvm/lib/Target/PowerPC/PowerPCFrameInfo.h:1.6 --- llvm/lib/Target/PowerPC/PowerPCFrameInfo.h:1.5 Thu Aug 19 16:36:14 2004 +++ llvm/lib/Target/PowerPC/PowerPCFrameInfo.h Tue Oct 26 01:02:38 2004 @@ -16,7 +16,6 @@ #include "PowerPC.h" #include "llvm/Target/TargetFrameInfo.h" #include "llvm/Target/TargetMachine.h" -#include "llvm/Target/MRegisterInfo.h" namespace llvm { From natebegeman at mac.com Tue Oct 26 01:04:33 2004 From: natebegeman at mac.com (Nate Begeman) Date: Tue, 26 Oct 2004 01:04:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Skeleton/SkeletonRegisterInfo.h Message-ID: <200410260604.BAA11554@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Skeleton: SkeletonRegisterInfo.h updated: 1.4 -> 1.5 --- Log message: Remove include of MRegisterInfo.h, since it is already included by SkeletonGenRegisterInfo.h.inc --- Diffs of the changes: (+0 -2) Index: llvm/lib/Target/Skeleton/SkeletonRegisterInfo.h diff -u llvm/lib/Target/Skeleton/SkeletonRegisterInfo.h:1.4 llvm/lib/Target/Skeleton/SkeletonRegisterInfo.h:1.5 --- llvm/lib/Target/Skeleton/SkeletonRegisterInfo.h:1.4 Sun Aug 15 17:15:30 2004 +++ llvm/lib/Target/Skeleton/SkeletonRegisterInfo.h Tue Oct 26 01:04:23 2004 @@ -14,7 +14,6 @@ #ifndef SKELETON_REGISTERINFO_H #define SKELETON_REGISTERINFO_H -#include "llvm/Target/MRegisterInfo.h" #include "SkeletonGenRegisterInfo.h.inc" namespace llvm { @@ -24,7 +23,6 @@ SkeletonRegisterInfo(); const TargetRegisterClass* getRegClassForType(const Type* Ty) const; - // See MRegisterInfo.h for information on these methods. void storeRegToStackSlot(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, unsigned SrcReg, int FrameIndex) const; From reid at x10sys.com Tue Oct 26 02:03:13 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Oct 2004 02:03:13 -0500 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/crtend/Makefile Message-ID: <200410260703.CAA12499@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/crtend: Makefile updated: 1.16 -> 1.17 --- Log message: Add the export symbols list files as extra distribution files. --- Diffs of the changes: (+2 -0) Index: llvm/runtime/GCCLibraries/crtend/Makefile diff -u llvm/runtime/GCCLibraries/crtend/Makefile:1.16 llvm/runtime/GCCLibraries/crtend/Makefile:1.17 --- llvm/runtime/GCCLibraries/crtend/Makefile:1.16 Fri Oct 22 16:02:08 2004 +++ llvm/runtime/GCCLibraries/crtend/Makefile Tue Oct 26 02:02:58 2004 @@ -18,6 +18,8 @@ LEVEL = ../../.. DONT_BUILD_RELINKED=1 +EXTRA_DIST := comp_main.lst comp_genericeh.lst comp_sjljeh.lst + MainSrc := crtend.c listend.ll GenericEHSrc := Exception.cpp SJLJEHSrc := SJLJ-Exception.cpp From reid at x10sys.com Tue Oct 26 02:03:49 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Oct 2004 02:03:49 -0500 Subject: [llvm-commits] CVS: llvm/projects/sample/Makefile Message-ID: <200410260703.CAA12526@zion.cs.uiuc.edu> Changes in directory llvm/projects/sample: Makefile updated: 1.6 -> 1.7 --- Log message: Make sure the include files get distributed. --- Diffs of the changes: (+1 -4) Index: llvm/projects/sample/Makefile diff -u llvm/projects/sample/Makefile:1.6 llvm/projects/sample/Makefile:1.7 --- llvm/projects/sample/Makefile:1.6 Tue Oct 21 10:31:36 2003 +++ llvm/projects/sample/Makefile Tue Oct 26 02:03:39 2004 @@ -8,11 +8,8 @@ # Indicates our relative path to the top of the project's root directory. # LEVEL = . - -# -# Directories that needs to be built. -# DIRS = lib tools +EXTRA_DIST = include # # Include the Master Makefile that knows how to build all. From reid at x10sys.com Tue Oct 26 02:04:28 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Oct 2004 02:04:28 -0500 Subject: [llvm-commits] CVS: llvm/projects/Stacker/Makefile Message-ID: <200410260704.CAA12551@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker: Makefile updated: 1.6 -> 1.7 --- Log message: Make sure the samples and test directories get distributed. --- Diffs of the changes: (+1 -0) Index: llvm/projects/Stacker/Makefile diff -u llvm/projects/Stacker/Makefile:1.6 llvm/projects/Stacker/Makefile:1.7 --- llvm/projects/Stacker/Makefile:1.6 Sun Oct 10 19:55:47 2004 +++ llvm/projects/Stacker/Makefile Tue Oct 26 02:04:18 2004 @@ -6,5 +6,6 @@ LEVEL = . DIRS = lib tools +EXTRA_DIST = samples test include $(LEVEL)/Makefile.common From reid at x10sys.com Tue Oct 26 02:05:20 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Oct 2004 02:05:20 -0500 Subject: [llvm-commits] CVS: llvm/Makefile Message-ID: <200410260705.CAA12579@zion.cs.uiuc.edu> Changes in directory llvm: Makefile updated: 1.32 -> 1.33 --- Log message: Reduce the number of EXTRA_DIST files since Makefile.rules now handles the autoconf directory automagically. --- Diffs of the changes: (+10 -6) Index: llvm/Makefile diff -u llvm/Makefile:1.32 llvm/Makefile:1.33 --- llvm/Makefile:1.32 Mon Oct 25 03:27:37 2004 +++ llvm/Makefile Tue Oct 26 02:05:09 2004 @@ -15,17 +15,21 @@ OPTIONAL_DIRS = examples projects endif -EXTRA_DIST := llvm.spec include configure \ - autoconf/AutoRegen.sh autoconf/LICENSE.TXT autoconf/README.TXT \ - autoconf/aclocal.m4 autoconf/config.guess autoconf/config.sub \ - autoconf/configure.ac autoconf/depcomp autoconf/install-sh \ - autoconf/ltmain.sh autoconf/missing autoconf/mkinstalldirs \ - autoconf/m4 +EXTRA_DIST := test llvm.spec include + include $(LEVEL)/Makefile.common dist-hook:: @$(ECHO) Eliminating CVS directories from distribution $(VERB) rm -rf `find $(TopDistDir) -type d -name CVS -print` + @$(ECHO) Eliminating files constructed by configure + $(VERB) rm -f \ + $(TopDistDir)/include/llvm/ADT/hash_map \ + $(TopDistDir)/include/llvm/ADT/hash_set \ + $(TopDistDir)/include/llvm/ADT/iterator \ + $(TopDistDir)/include/llvm/Config/config.h \ + $(TopDistDir)/include/llvm/Support/DataTypes.h \ + $(TopDistDir)/include/llvm/Support/ThreadSupport.h test :: all cd test; $(MAKE) From reid at x10sys.com Tue Oct 26 02:09:44 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Oct 2004 02:09:44 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410260709.CAA12620@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.212 -> 1.213 --- Log message: * Implement the "dist-check" target that verifies the contents of a zipped tarball. * Fix bugs in the "dist" target (a precursor to dist-check). * Correct the implementation of the "install" targets so that they ensure the installation directories are created before attmpting to install directories in them. * Reduce the verbosity of the output of the makefile system * Ensure output includes the configuration whenever libraries or tools are built, installed, or uninstalled. --- Diffs of the changes: (+138 -82) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.212 llvm/Makefile.rules:1.213 --- llvm/Makefile.rules:1.212 Mon Oct 25 21:58:10 2004 +++ llvm/Makefile.rules Tue Oct 26 02:09:33 2004 @@ -321,6 +321,13 @@ # Library Build Rules: Four ways to build a library ############################################################################### +$(libdir): + $(VERB) $(MKDIR) $(libdir) + +$(bytecode_libdir): + $(VERB) $(MKDIR) $(bytecode_libdir) + + # if we're building a library ... ifdef LIBRARYNAME @@ -343,7 +350,7 @@ all-local:: $(LIBNAME_LA) $(LIBNAME_LA): $(BUILT_SOURCES) $(ObjectsLO) $(LIBDIR)/.dir - @$(ECHO) Linking shared library $(notdir $@) + @$(ECHO) Linking $(CONFIGURATION) Shared Library $(notdir $@) $(VERB) $(Link) -o $@ $(ObjectsLO) $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $@ $(LIBDIR) @@ -355,18 +362,17 @@ DestSharedLib = $(libdir)/lib$(LIBRARYNAME)$(SHLIBEXT) install-local:: install-shared-library -install-shared-library: $(DestSharedLib) +install-shared-library: $(libdir) $(DestSharedLib) $(DestSharedLib): $(LIBNAME_LA) - @$(ECHO) Installing shared library $(DestSharedLib) - $(VERB) $(MKDIR) $(libdir) + @$(ECHO) Installing $(CONFIGURATION) Shared Library $(DestSharedLib) $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $(LIBNAME_LA) $(DestSharedLib) $(VERB) $(LIBTOOL) --finish $(libdir) uninstall-local:: uninstall-shared-library uninstall-shared-library: - @$(ECHO) Uninstalling shared library $(DestSharedLib) + @$(ECHO) Uninstalling $(CONFIGURATION) Shared Library $(DestSharedLib) $(VERB) $(RM) -f $(DestSharedLib) endif @@ -392,7 +398,7 @@ all-local:: $(LIBNAME_BC) $(LIBNAME_BC): $(BUILT_SOURCES) $(ObjectsBC) $(LIBDIR)/.dir - @$(ECHO) Linking bytecode library $(notdir $@) + @$(ECHO) Linking $(CONFIGURATION) Bytecode Library $(notdir $@) $(VERB) $(BCLinkLib) -o $@ $(ObjectsBC) clean-local:: @@ -401,18 +407,19 @@ endif DestBytecodeLib = $(bytecode_libdir)/lib$(LIBRARYNAME).bc + install-local:: install-bytecode-library -install-bytecode-library: $(DestBytecodeLib) +install-bytecode-library: $(bytecode_libdir) $(DestBytecodeLib) $(DestBytecodeLib): $(LIBNAME_BC) $(bytecode_libdir) - @$(ECHO) Installing bytecode library $(DestBytecodeLib) + @$(ECHO) Installing $(CONFIGURATION) Bytecode Library $(DestBytecodeLib) $(VERB) $(INSTALL) $< $@ uninstall-local:: uninstall-bytecode-library uninstall-bytecode-library: - @$(ECHO) Uninstalling bytecode library $(DestBytecodeLib) + @$(ECHO) Uninstalling $(CONFIGURATION) Bytecode Library $(DestBytecodeLib) $(VERB) $(RM) -f $(DestBytecodeLib) endif @@ -422,7 +429,7 @@ all-local:: $(LIBNAME_O) $(LIBNAME_O): $(BUILT_SOURCES) $(ObjectsO) $(LIBDIR)/.dir - @$(ECHO) Linking object library $(notdir $@) + @$(ECHO) Linking $(CONFIGURATION) Object Library $(notdir $@) $(VERB) $(Relink) -o $@ $(ObjectsO) clean-local:: @@ -434,17 +441,17 @@ install-local:: install-relinked-library -install-relinked-library: $(DestRelinkedLib) +install-relinked-library: $(libdir) $(DestRelinkedLib) $(DestRelinkedLib): $(LIBNAME_O) - @$(ECHO) Installing object library $(DestRelinkedLib) + @$(ECHO) Installing $(CONFIGURATION) Object Library $(DestRelinkedLib) $(VERB) $(MKDIR) $(libdir) $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $(LIBNAME_O) $(DestRelinkedLib) uninstall-local:: uninstall-relinked-library uninstall-relinked-library: - @$(ECHO) Uninstalling object library $(DestRelinkedLib) + @$(ECHO) Uninstalling $(CONFIGURATION) Object Library $(DestRelinkedLib) $(VERB) $(RM) -f $(DestRelinkedLib) endif @@ -454,7 +461,7 @@ all-local:: $(LIBNAME_A) $(LIBNAME_A): $(BUILT_SOURCES) $(ObjectsO) $(LIBDIR)/.dir - @$(ECHO) Building archive library $(notdir $@) + @$(ECHO) Building $(CONFIGURATION) Archive Library $(notdir $@) $(VERB)$(RM) -f $@ $(VERB) $(Archive) $@ $(ObjectsO) $(VERB) $(Ranlib) $@ @@ -468,17 +475,16 @@ install-local:: install-archive-library -install-archive-library: $(DestArchiveLib) +install-archive-library: $(libdir) $(DestArchiveLib) $(DestArchiveLib): $(LIBNAME_A) - @$(ECHO) Installing archive library $(DestArchiveLib) - $(VERB) $(MKDIR) $(libdir) + @$(ECHO) Installing $(CONFIGURATION) Archive Library $(DestArchiveLib) $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $(LIBNAME_A) $(DestArchiveLib) uninstall-local:: uninstall-archive-library uninstall-archive-library: - @$(ECHO) Uninstalling archive library $(DestArchiveLib) + @$(ECHO) Uninstalling $(CONFIGURATION) Archive Library $(DestArchiveLib) $(VERB) $(RM) -f $(DestArchiveLib) endif @@ -542,22 +548,25 @@ $(TOOLEXENAME): $(BUILT_SOURCES) $(ObjectsO) $(PROJ_LIBS_PATHS) $(LLVM_LIBS_PATHS) $(TOOLDIR)/.dir @$(ECHO) Linking $(CONFIGURATION) executable $(TOOLNAME) $(STRIP_WARN_MSG) $(VERB) $(Link) -o $@ $(ObjectsO) $(PROJ_LIBS_OPTIONS) $(LLVM_LIBS_OPTIONS) $(LIBS) - @$(ECHO) ======= Finished linking $(CONFIGURATION) executable $(TOOLNAME) $(STRIP_WARN_MSG) - -install-local:: install-tool + @$(ECHO) ======= Finished Linking $(CONFIGURATION) Executable $(TOOLNAME) $(STRIP_WARN_MSG) DestTool = $(bindir)/$(TOOLNAME) -install-tool: $(DestTool) +install-local:: install-tool + +install-tool: $(bindir) $(DestTool) $(DestTool): $(TOOLEXENAME) - @$(ECHO) Installing $(DestTool) - $(VERB) $(INSTALL) $(TOOLEXENAME) $(bindir) + @$(ECHO) Installing $(CONFIGURATION) $(DestTool) + $(VERB) $(INSTALL) $(TOOLEXENAME) $(DestTool) +$(bindir): + $(VERB) $(MKDIR) $(bindir) + uninstall-local:: uninstall-tool uninstall-tool: - @$(ECHO) Uninstalling $(DestTool) + @$(ECHO) Uninstalling $(CONFIGURATION) $(DestTool) $(VERB) $(RM) -f $(DestTool) endif @@ -568,13 +577,13 @@ ifdef SHARED_LIBRARY $(OBJDIR)/%.lo $(OBJDIR)/%.o: %.cpp $(OBJDIR)/.dir - @$(ECHO) "Compiling $(CONFIGURATION) $*.cpp For Shared Library" + @$(ECHO) "Compiling $*.cpp (PIC)" $(VERB) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(OBJDIR)/$*.LACXXd $< -o $@ ; \ then $(MV) -f "$(OBJDIR)/$*.LACXXd" "$(OBJDIR)/$*.d"; \ else $(RM) -f "$(OBJDIR)/$*.LACXXd"; exit 1; fi $(OBJDIR)/%.lo $(OBJDIR)/%.o: %.c $(OBJDIR)/.dir - @$(ECHO) "Compiling $(CONFIGURATION) $*.c For Shared Library" + @$(ECHO) "Compiling $*.c (PIC)" $(VERB) if $(LTCompile.C) -MD -MT $@ -MP -MF $(OBJDIR)/$*.LACd $< -o $@ ; \ then $(MV) -f "$(OBJDIR)/$*.LACd" "$(OBJDIR)/$*.d"; \ else $(RM) -f "$(OBJDIR)/$*.LACd"; exit 1; fi @@ -582,13 +591,13 @@ else $(OBJDIR)/%.o: %.cpp $(OBJDIR)/.dir - @$(ECHO) "Compiling $(CONFIGURATION) $*.cpp For Archive" + @$(ECHO) "Compiling $*.cpp" $(VERB) if $(Compile.CXX) -MD -MT $@ -MP -MF $(OBJDIR)/$*.CXXd $< -o $@ ; \ then $(MV) -f "$(OBJDIR)/$*.CXXd" "$(OBJDIR)/$*.d"; \ else $(RM) -f "$(OBJDIR)/$*.CXXd"; exit 1; fi $(OBJDIR)/%.o: %.c $(OBJDIR)/.dir - @$(ECHO) "Compiling $(CONFIGURATION) $*.c For Archive" + @$(ECHO) "Compiling $*.c" $(VERB) if $(Compile.C) -MD -MT $@ -MP -MF $(OBJDIR)/$*.Cd $< -o $@ ; \ then $(MV) -f "$(OBJDIR)/$*.Cd" "$(OBJDIR)/$*.d"; \ else $(RM) -f "$(OBJDIR)/$*.Cd"; exit 1; fi @@ -597,13 +606,13 @@ # Create .bc files in the OBJDIR directory from .cpp and .c files... $(OBJDIR)/%.bc: %.cpp $(OBJDIR)/.dir - @$(ECHO) "Compiling $(CONFIGURATION) $*.cpp to bytecode" + @$(ECHO) "Compiling $*.cpp (bytecode)" $(VERB) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(OBJDIR)/$*.BCCXXd" $< -o $@ ; \ then $(MV) -f "$(OBJDIR)/$*.BCCXXd" "$(OBJDIR)/$*.d"; \ else $(RM) -f "$(OBJDIR)/$*.BCCXXd"; exit 1; fi $(OBJDIR)/%.bc: %.c $(OBJDIR)/.dir - @$(ECHO) "Compiling $(CONFIGURATION) $*.c to bytecode" + @$(ECHO) "Compiling $*.c (bytecode)" $(VERB) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(OBJDIR)/$*.BCCd" $< -o $@ ; \ then $(MV) -f "$(OBJDIR)/$*.BCCd" "$(OBJDIR)/$*.d"; \ else $(RM) -f "$(OBJDIR)/$*.BCCd"; exit 1; fi @@ -613,37 +622,37 @@ ifdef SHARED_LIBRARY $(OBJDIR)/%.lo $(OBJDIR)/%.o: %.cpp $(OBJDIR)/.dir - @$(ECHO) "Compiling $(CONFIGURATION) $*.cpp For Shared Library" + @$(ECHO) "Compiling $*.cpp (PIC)" $(LTCompile.CXX) $< -o $@ $(OBJDIR)/%.lo $(OBJDIR)/%.o: %.c $(OBJDIR)/.dir - @$(ECHO) "Compiling $(CONFIGURATION) $*.cpp For Shared Library" + @$(ECHO) "Compiling $*.cpp (PIC)" $(LTCompile.C) $< -o $@ else $(OBJDIR)/%.o: %.cpp $(OBJDIR)/.dir - @$(ECHO) "Compiling $(CONFIGURATION) $*.cpp For Archive" + @$(ECHO) "Compiling $*.cpp" $(Compile.CXX) $< -o $@ $(OBJDIR)/%.o: %.c $(OBJDIR)/.dir - @$(ECHO) "Compiling $(CONFIGURATION) $*.cpp For Archive" + @$(ECHO) "Compiling $*.cpp" $(Compile.C) $< -o $@ endif # Create .bc files in the OBJDIR directory from .cpp and .c files... $(OBJDIR)/%.bc: %.cpp $(OBJDIR)/.dir - @$(ECHO) "Compiling $(CONFIGURATION) $*.cpp To Bytecode" + @$(ECHO) "Compiling $*.cpp (bytecode)" $(BCCompileCPP) $< -o $@ $(OBJDIR)/%.bc: %.c $(OBJDIR)/.dir - @$(ECHO) "Compiling $(CONFIGURATION) $*.c To Bytecode" + @$(ECHO) "Compiling $*.c (bytecode)" $(BCCompileC) $< -o $@ endif $(OBJDIR)/%.bc: %.ll $(OBJDIR)/.dir $(LLVMAS) - @$(ECHO) "Compiling $*.ll To Bytecode" + @$(ECHO) "Compiling $*.ll" $(VERB) $(LLVMAS) $< -f -o $@ ifdef TARGET @@ -852,85 +861,132 @@ .PHONY: dist dist-chck dist-clean distdir dist-gzip dist-bzip2 dist-zip -ifeq ($(BUILD_SRC_DIR),$(BUILD_OBJ_DIR)) +#------------------------------------------------------------------------ +# Define distribution related variables +#------------------------------------------------------------------------ +DistName := $(LLVM_TARBALL_NAME) +DistDir := $(BUILD_OBJ_ROOT)/$(DistName) +TopDistDir := $(BUILD_OBJ_ROOT)/$(DistName) +DistTarGZip := $(BUILD_OBJ_ROOT)/$(DistName).tar.gz +DistZip := $(BUILD_OBJ_ROOT)/$(DistName).zip +DistTarBZ2 := $(BUILD_OBJ_ROOT)/$(DistName).tar.bz2 +DistAlways := CREDITS.TXT LICENSE.TXT README.txt README AUTHORS COPYING \ + ChangeLog INSTALL NEWS Makefile Makefile.common Makefile.rules \ + Makefile.config.in configure autoconf +DistOther := $(notdir $(wildcard \ + $(BUILD_SRC_DIR)/*.h \ + $(BUILD_SRC_DIR)/*.td \ + $(BUILD_SRC_DIR)/*.def \ + $(BUILD_SRC_DIR)/*.ll \ + $(BUILD_SRC_DIR)/*.in)) +DistSources := $(SOURCES) $(EXTRA_DIST) +DistSubDirs := $(SUBDIRS) +DistFiles := $(DistAlways) $(DistSources) $(DistOther) + +#------------------------------------------------------------------------ +# We MUST build distribution with OBJ_DIR != SRC_DIR +#------------------------------------------------------------------------ +ifeq ($(BUILD_SRC_DIR),$(BUILD_OBJ_DIR)) dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip :: @$(ECHO) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR +DistCheckTop := else +DistCheckTop := check +#------------------------------------------------------------------------ +# Prevent catastrophic remove +#------------------------------------------------------------------------ ifeq ($(LLVM_TARBALL_NAME),) $(error LLVM_TARBALL_NAME is empty. Please rerun configure) endif +#------------------------------------------------------------------------ +# Prevent attempt to run dist targets from anywhere but the top level +#------------------------------------------------------------------------ ifneq ($(LEVEL),.) dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip :: @$(ECHO) ERROR: You must run $@ from $(BUILD_OBJ_ROOT) -DistTopCheck := - else -DistTopCheck := check +#------------------------------------------------------------------------ +# Provide the top level targets +#------------------------------------------------------------------------ + +dist-gzip: $(DistTarGZip) -dist-gzip: distdir +$(DistTarGZip) : distdir @$(ECHO) Packing gzipped distribution tar file. - $(VERB) $(TAR) chf - "$(TopDistDir)" | gzip -c > "$(DistTarGZip)" + $(VERB) cd $(BUILD_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | gzip -c > "$(DistTarGZip)" -dist-bzip2: distdir +dist-bzip2: $(DistTarBZ2) + +$(DistTarBZ2) : distdir @$(ECHO) Packing bzipped distribution tar file. - $(VERB) $(TAR) chf - $(DistName) | $(BZIP2) -c >$(DistTarBZ2) + $(VERB) cd $(BUILD_OBJ_ROOT) ; $(TAR) chf - $(DistName) | $(BZIP2) -c >$(DistTarBZ2) -dist-zip: distdir - @$(ECHO) Packing zipped distribution file. - $(VERB) rm -f $(DistZip) - $(VERB) $(ZIP) -rq $(DistZip) $(DistName) +dist-zip: $(DistZip) -dist :: distdir - @$(ECHO) Packing gzipped distribution tar file. - $(VERB) $(TAR) chf - $(DistName) | $(GZIP) -c >$(DistTarGZip) - @$(ECHO) Packing bzipped distribution tar file. - $(VERB) $(TAR) chf - $(DistName) | $(BZIP2) -c >$(DistTarBZ2) +$(DistZip) : distdir @$(ECHO) Packing zipped distribution file. $(VERB) rm -f $(DistZip) - $(VERB) $(ZIP) -rq $(DistZip) $(DistName) + $(VERB) cd $(BUILD_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName) + +dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip) @$(ECHO) ===== DISTRIBUTION PACKAGING SUCESSFUL ===== -dist-check:: dist +DistCheckDir := $(LLVM_OBJ_ROOT)/_distcheckdir + +dist-check:: $(DistTopDir) $(DistTarGZip) + @$(ECHO) Checking distribution tar file. + $(VERB) if test -d $(DistCheckDir) ; then \ + $(RM) -rf $(DistCheckDir) ; \ + fi + $(VERB) $(MKDIR) $(DistCheckDir) + $(VERB) cd $(DistCheckDir) && \ + $(MKDIR) $(DistCheckDir)/build && \ + $(MKDIR) $(DistCheckDir)/install && \ + gunzip -c $(DistTarGZip) | $(TAR) xf - && \ + cd build && \ + ../$(DistName)/configure --prefix="$(DistCheckDir)/install" \ + --srcdir=../$(DistName) --with-llvmgccdir="$(LLVMGCCDIR)" && \ + $(MAKE) check && \ + $(MAKE) install && \ + $(MAKE) uninstall && \ + $(MAKE) dist && \ + $(MAKE) clean && \ + $(MAKE) dist-clean && \ + $(ECHO) ===== $(DistTarGZip) Ready For Distribution ===== dist-clean:: @$(ECHO) Cleaning distribution files - $(VERB) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) + $(VERB) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) $(DistCheckDir) endif -DistName := $(LLVM_TARBALL_NAME) -DistDir := $(BUILD_OBJ_ROOT)/$(DistName) -TopDistDir := $(DistDir) -DistTarGZip := $(BUILD_OBJ_ROOT)/$(DistName).tar.gz -DistZip := $(BUILD_OBJ_ROOT)/$(DistName).zip -DistTarBZ2 := $(BUILD_OBJ_ROOT)/$(DistName).tar.bz2 -DistAlways := CREDITS.TXT LICENSE.TXT README.txt README AUTHORS COPYING \ - ChangeLog INSTALL NEWS Makefile Makefile.common Makefile.rules \ - Makefile.config.in -DistSources := $(filter-out projects,$(SOURCES) $(EXTRA_DIST)) -DistSubDirs := $(filter-out projects,$(SUBDIRS)) -DistFiles := $(DistAlways) $(DistSources) -RmDistDir := { test ! -d $(DistDir) || { \ - find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf $(DistDir); }; } - -distdir : $(DistTopCheck) $(DistSources) +#------------------------------------------------------------------------ +# Provide the recursive distdir target for building the distribution directory +#------------------------------------------------------------------------ +distdir : $(DistCheckTop) $(DistSources) @$(ECHO) Building Distribution Directory $(DistDir) - $(VERB) $(RmDistDir) + $(VERB) if test "$(DistDir)" = "$(TopDistDir)" ; then \ + if test -d "$(DistDir)" ; then \ + find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' || \ + exit 1 ; \ + fi ; \ + echo Removing $(DistDir) ; \ + $(RM) -rf $(DistDir); \ + fi $(VERB) $(MKDIR) $(DistDir) $(VERB) srcdirstrip=`echo "$(BUILD_SRC_DIR)" | sed 's|.|.|g'`; \ srcrootstrip=`echo "$(BUILD_SRC_ROOT)" | sed 's|.|.|g'`; \ for file in $(DistFiles) ; do \ case "$$file" in \ $(BUILD_SRC_DIR)/*) file=`echo "$$file" | sed "s#^$$srcdirstrip/##"`;; \ - $(BUILD_SRC_ROOT)/*) file=`echo "$$file" | sed "s#^$srcrootstrip/#$(BUILD_OBJ_ROOT)/#"`;; \ + $(BUILD_SRC_ROOT)/*) file=`echo "$$file" | sed "s#^$$srcrootstrip/#$(BUILD_OBJ_ROOT)/#"`;; \ esac; \ if test -f "$$file" || test -d "$$file" ; then \ from_dir=. ; \ @@ -946,7 +1002,7 @@ fi; \ mid_dir=`echo "$$file" | sed -n -e 's#^\(.*\)/[^/]*$$#\1#p'`; \ if test -n "$$mid_dir" ; then \ - $(MKDIR) "$$to_dir/$$mid_dir" ; \ + $(MKDIR) "$$to_dir/$$mid_dir" || exit 1; \ fi ; \ if test -d "$$from_dir/$$file"; then \ if test -d "$(BUILD_SRC_DIR)/$$file" && \ @@ -964,14 +1020,14 @@ $(ECHO) "Skipping non-existent $$from_dir/$$file" ; \ fi; \ done - $(VERB) for subdir in $(SUBDIRS) ; do \ + $(VERB) for subdir in $(DistSubDirs) ; do \ if test "$$subdir" \!= "." ; then \ - test -d "$(DistDir)/$$subdir" || $(MKDIR) "$(DistDir)/$$subdir" || exit 1; \ new_distdir="$(DistDir)/$$subdir" ; \ - ( cd $$subdir && $(MAKE) DistDir="$$new_distdir" distdir ) || exit 1; \ + test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \ + ( cd $$subdir && $(MAKE) DistDir="$$new_distdir" distdir ) || exit 1; \ fi; \ done - $(VERB) $(MAKE) DistDir="$(DistDir)" dist-hook + $(VERB) $(MAKE) DistDir="$(DistDir)" dist-hook || exit 1 -$(VERB) find $(DistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ From lattner at cs.uiuc.edu Tue Oct 26 10:35:47 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 10:35:47 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/VirtRegMap.cpp Message-ID: <200410261535.KAA05310@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: VirtRegMap.cpp updated: 1.32 -> 1.33 --- Log message: Clean up the MachineBasicBlock.h file, percolating #includes into this file. Patch contributed by Morten Ofstad --- Diffs of the changes: (+1 -0) Index: llvm/lib/CodeGen/VirtRegMap.cpp diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.32 llvm/lib/CodeGen/VirtRegMap.cpp:1.33 --- llvm/lib/CodeGen/VirtRegMap.cpp:1.32 Thu Oct 14 22:19:31 2004 +++ llvm/lib/CodeGen/VirtRegMap.cpp Tue Oct 26 10:35:33 2004 @@ -28,6 +28,7 @@ #include "llvm/Support/Debug.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" +#include using namespace llvm; namespace { From lattner at cs.uiuc.edu Tue Oct 26 10:36:11 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 10:36:11 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAllocLocal.cpp Message-ID: <200410261536.KAA05320@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocLocal.cpp updated: 1.69 -> 1.70 --- Log message: Clean up the MachineBasicBlock.h file, percolating #includes into this file. Patch contributed by Morten Ofstad --- Diffs of the changes: (+1 -0) Index: llvm/lib/CodeGen/RegAllocLocal.cpp diff -u llvm/lib/CodeGen/RegAllocLocal.cpp:1.69 llvm/lib/CodeGen/RegAllocLocal.cpp:1.70 --- llvm/lib/CodeGen/RegAllocLocal.cpp:1.69 Wed Sep 1 17:55:35 2004 +++ llvm/lib/CodeGen/RegAllocLocal.cpp Tue Oct 26 10:35:58 2004 @@ -25,6 +25,7 @@ #include "llvm/Support/Debug.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/Statistic.h" +#include using namespace llvm; namespace { From lattner at cs.uiuc.edu Tue Oct 26 10:41:28 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 10:41:28 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineBasicBlock.h Message-ID: <200410261541.KAA09694@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineBasicBlock.h updated: 1.39 -> 1.40 --- Log message: Remove the unused MachineBasicBlock2IndexFunctor class. Move method bodies that depend on out of line to MachineBasicBlock.cpp. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+5 -32) Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.39 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.40 --- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.39 Wed Sep 1 17:55:34 2004 +++ llvm/include/llvm/CodeGen/MachineBasicBlock.h Tue Oct 26 10:41:13 2004 @@ -128,30 +128,18 @@ /// addSuccessor - Add succ as a successor of this MachineBasicBlock. /// The Predecessors list of succ is automatically updated. /// - void addSuccessor(MachineBasicBlock *succ) { - Successors.push_back(succ); - succ->addPredecessor(this); - } + void addSuccessor(MachineBasicBlock *succ); /// removeSuccessor - Remove successor from the successors list of this /// MachineBasicBlock. The Predecessors list of succ is automatically updated. /// - void removeSuccessor(MachineBasicBlock *succ) { - succ->removePredecessor(this); - succ_iterator I = std::find(Successors.begin(), Successors.end(), succ); - assert(I != Successors.end() && "Not a current successor!"); - Successors.erase(I); - } + void removeSuccessor(MachineBasicBlock *succ); /// removeSuccessor - Remove specified successor from the successors list of /// this MachineBasicBlock. The Predecessors list of succ is automatically /// updated. /// - void removeSuccessor(succ_iterator I) { - assert(I != Successors.end() && "Not a current successor!"); - (*I)->removePredecessor(this); - Successors.erase(I); - } + void removeSuccessor(succ_iterator I); /// getFirstTerminator - returns an iterator to the first terminator /// instruction of this basic block. If a terminator does not exist, @@ -204,31 +192,16 @@ /// Don't do this unless you know what you're doing, because it doesn't /// update pred's successors list. Use pred->addSuccessor instead. /// - void addPredecessor (MachineBasicBlock *pred) { - Predecessors.push_back (pred); - } + void addPredecessor(MachineBasicBlock *pred); /// removePredecessor - Remove pred as a predecessor of this /// MachineBasicBlock. Don't do this unless you know what you're /// doing, because it doesn't update pred's successors list. Use /// pred->removeSuccessor instead. /// - void removePredecessor (MachineBasicBlock *pred) { - std::vector::iterator goner = - std::find (Predecessors.begin(), Predecessors.end (), pred); - Predecessors.erase (goner); - } + void removePredecessor(MachineBasicBlock *pred); }; -// This is useful when building DenseMaps keyed on MachineBasicBlocks -struct MachineBasicBlock2IndexFunctor - : std::unary_function { - unsigned operator()(const MachineBasicBlock* MBB) const { - assert(MBB->getNumber() != -1 && - "MachineBasicBlock does not belong to a MachineFunction"); - return MBB->getNumber(); - } -}; //===--------------------------------------------------------------------===// From lattner at cs.uiuc.edu Tue Oct 26 10:43:56 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 10:43:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachineBasicBlock.cpp Message-ID: <200410261543.KAA11087@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: MachineBasicBlock.cpp updated: 1.20 -> 1.21 --- Log message: Move method bodies that depend on from MBB.h to MBB.cpp --- Diffs of the changes: (+38 -14) Index: llvm/lib/CodeGen/MachineBasicBlock.cpp diff -u llvm/lib/CodeGen/MachineBasicBlock.cpp:1.20 llvm/lib/CodeGen/MachineBasicBlock.cpp:1.21 --- llvm/lib/CodeGen/MachineBasicBlock.cpp:1.20 Sun Sep 5 13:39:20 2004 +++ llvm/lib/CodeGen/MachineBasicBlock.cpp Tue Oct 26 10:43:42 2004 @@ -19,6 +19,7 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Support/LeakDetector.h" #include +#include using namespace llvm; MachineBasicBlock::~MachineBasicBlock() { @@ -26,7 +27,6 @@ } - // MBBs start out as #-1. When a MBB is added to a MachineFunction, it // gets the next available unique MBB number. If it is removed from a // MachineFunction, it goes back to being #-1. @@ -52,15 +52,13 @@ return dummy; } -void ilist_traits::addNodeToList(MachineInstr* N) -{ +void ilist_traits::addNodeToList(MachineInstr* N) { assert(N->parent == 0 && "machine instruction already in a basic block"); N->parent = parent; LeakDetector::removeGarbageObject(N); } -void ilist_traits::removeNodeFromList(MachineInstr* N) -{ +void ilist_traits::removeNodeFromList(MachineInstr* N) { assert(N->parent != 0 && "machine instruction not in a basic block"); N->parent = 0; LeakDetector::addGarbageObject(N); @@ -69,15 +67,13 @@ void ilist_traits::transferNodesFromList( iplist >& toList, ilist_iterator first, - ilist_iterator last) -{ + ilist_iterator last) { if (parent != toList.parent) for (; first != last; ++first) first->parent = toList.parent; } -MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator() -{ +MachineBasicBlock::iterator MachineBasicBlock::getFirstTerminator() { const TargetInstrInfo& TII = *getParent()->getTarget().getInstrInfo(); iterator I = end(); while (I != begin() && TII.isTerminatorInstr((--I)->getOpcode())); @@ -85,15 +81,14 @@ return I; } -void MachineBasicBlock::dump() const -{ +void MachineBasicBlock::dump() const { print(std::cerr); } -void MachineBasicBlock::print(std::ostream &OS) const -{ +void MachineBasicBlock::print(std::ostream &OS) const { if(!getParent()) { - OS << "Can't print out MachineBasicBlock because parent MachineFunction is null\n"; + OS << "Can't print out MachineBasicBlock because parent MachineFunction" + << " is null\n"; return; } @@ -106,3 +101,32 @@ I->print(OS, &getParent()->getTarget()); } } + +void MachineBasicBlock::addSuccessor(MachineBasicBlock *succ) { + Successors.push_back(succ); + succ->addPredecessor(this); +} + +void MachineBasicBlock::removeSuccessor(MachineBasicBlock *succ) { + succ->removePredecessor(this); + succ_iterator I = std::find(Successors.begin(), Successors.end(), succ); + assert(I != Successors.end() && "Not a current successor!"); + Successors.erase(I); +} + +void MachineBasicBlock::removeSuccessor(succ_iterator I) { + assert(I != Successors.end() && "Not a current successor!"); + (*I)->removePredecessor(this); + Successors.erase(I); +} + +void MachineBasicBlock::addPredecessor(MachineBasicBlock *pred) { + Predecessors.push_back(pred); +} + +void MachineBasicBlock::removePredecessor(MachineBasicBlock *pred) { + std::vector::iterator I = + std::find(Predecessors.begin(), Predecessors.end(), pred); + assert(I != Predecessors.end() && "Pred is not a predecessor of this block!"); + Predecessors.erase(I); +} From brukman at cs.uiuc.edu Tue Oct 26 10:45:24 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue, 26 Oct 2004 10:45:24 -0500 Subject: [llvm-commits] CVS: llvm/docs/CodingStandards.html Message-ID: <200410261545.KAA19800@zion.cs.uiuc.edu> Changes in directory llvm/docs: CodingStandards.html updated: 1.21 -> 1.22 --- Log message: * Fix spelling and grammar errors * Close

    tags properly * Break up paragraphs with blank lines, clean up text alignment * Delete unbalanced " --- Diffs of the changes: (+14 -11) Index: llvm/docs/CodingStandards.html diff -u llvm/docs/CodingStandards.html:1.21 llvm/docs/CodingStandards.html:1.22 --- llvm/docs/CodingStandards.html:1.21 Thu Sep 23 11:03:48 2004 +++ llvm/docs/CodingStandards.html Tue Oct 26 10:45:13 2004 @@ -372,16 +372,19 @@ Use of class and struct Keywords

    -

    In C++ the class and struct keywoards can be used almost - interchangeably. The only difference is when they are used to declare a class: - class makes all members private by default while struct - makes all members public by defaut.

    -

    Unfortunately, not all compilers follow the rules and some will generate - different symbols based on whether class or struct was used - to declare the symbol. This can lead to problems at link time.

    -

    So, the rule for LLVM is this: "always use the class keyword, - unless all members are public in which case struct is - allowed.

    + +

    In C++, the class and struct keywords can be used almost +interchangeably. The only difference is when they are used to declare a class: +class makes all members private by default while struct makes +all members public by default.

    + +

    Unfortunately, not all compilers follow the rules and some will generate +different symbols based on whether class or struct was used to +declare the symbol. This can lead to problems at link time.

    + +

    So, the rule for LLVM is to always use the class keyword, unless +all members are public, in which case struct is allowed.

    +
    @@ -635,7 +638,7 @@ Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/09/23 16:03:48 $ + Last modified: $Date: 2004/10/26 15:45:13 $ From brukman at cs.uiuc.edu Tue Oct 26 10:55:22 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue, 26 Oct 2004 10:55:22 -0500 Subject: [llvm-commits] CVS: llvm/CREDITS.TXT Message-ID: <200410261555.KAA20279@zion.cs.uiuc.edu> Changes in directory llvm: CREDITS.TXT updated: 1.31 -> 1.32 --- Log message: * Thanks to Morten Ofstad for the Visual C++ compatibility fixes * Added Paolo's email address --- Diffs of the changes: (+5 -0) Index: llvm/CREDITS.TXT diff -u llvm/CREDITS.TXT:1.31 llvm/CREDITS.TXT:1.32 --- llvm/CREDITS.TXT:1.31 Wed Sep 22 23:39:30 2004 +++ llvm/CREDITS.TXT Tue Oct 26 10:55:12 2004 @@ -60,6 +60,7 @@ D: Portions of the PowerPC backend N: Paolo Invernizzi +E: arathorn at fastwebnet.it D: Visual C++ compatibility fixes N: Brad Jones @@ -75,6 +76,10 @@ E: wanderer at rsu.ru D: Test suite fixes for FreeBSD +N: Morten Ofstad +E: morten at hue.no +D: Visual C++ compatibility fixes + N: Vladimir Prus E: ghost at cs.msu.su D: Made inst_iterator behave like a proper iterator, LowerConstantExprs pass From brukman at cs.uiuc.edu Tue Oct 26 11:07:57 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue, 26 Oct 2004 11:07:57 -0500 Subject: [llvm-commits] CVS: llvm/docs/CodingStandards.html Message-ID: <200410261607.LAA05226@zion.cs.uiuc.edu> Changes in directory llvm/docs: CodingStandards.html updated: 1.22 -> 1.23 --- Log message: Use around header names --- Diffs of the changes: (+4 -3) Index: llvm/docs/CodingStandards.html diff -u llvm/docs/CodingStandards.html:1.22 llvm/docs/CodingStandards.html:1.23 --- llvm/docs/CodingStandards.html:1.22 Tue Oct 26 10:45:13 2004 +++ llvm/docs/CodingStandards.html Tue Oct 26 11:07:46 2004 @@ -592,8 +592,9 @@ good way to avoid documentation, and avoid giving bugs a place to hide.

    For these reasons, come to know and love the contents of your local -<algorithm> header file. Know about <functional> and what it can do -for you. C++ is just a tool that wants you to master it. :)

    +<algorithm> header file. Know about <functional> +and what it can do for you. C++ is just a tool that wants you to master it. +:)

    @@ -638,7 +639,7 @@ Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/10/26 15:45:13 $ + Last modified: $Date: 2004/10/26 16:07:46 $ From brukman at cs.uiuc.edu Tue Oct 26 11:15:28 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue, 26 Oct 2004 11:15:28 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/AIXDataTypesFix.h DataTypes.h.in DataTypesFix.h Message-ID: <200410261615.LAA11087@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: AIXDataTypesFix.h added (r1.1) DataTypes.h.in updated: 1.14 -> 1.15 DataTypesFix.h (r1.1) removed --- Log message: * DataTypesFix.h moved to AIXDataTypesFix.h * Condition #inclusion of AIXDataTypes.h on the _AIX preprocessor symbol to prevent extra I/O on non-AIX systems. Thus, no #ifdef in AIXDataTypes.h --- Diffs of the changes: (+28 -2) Index: llvm/include/llvm/Support/AIXDataTypesFix.h diff -c /dev/null llvm/include/llvm/Support/AIXDataTypesFix.h:1.1 *** /dev/null Tue Oct 26 11:15:28 2004 --- llvm/include/llvm/Support/AIXDataTypesFix.h Tue Oct 26 11:15:18 2004 *************** *** 0 **** --- 1,25 ---- + //===-- include/Support/AIXDataTypesFix.h - Fix datatype defs ---*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This file overrides default system-defined types and limits which cannot be + // done in DataTypes.h.in because it is processed by autoheader first, which + // comments out any #undef statement + // + //===----------------------------------------------------------------------===// + + // No include guards desired! + + #ifndef SUPPORT_DATATYPES_H + #error "AIXDataTypesFix.h must only be included via DataTypes.h!" + #endif + + // GCC is strict about defining large constants: they must have LL modifier. + // These will be defined properly at the end of DataTypes.h + #undef INT64_MAX + #undef INT64_MIN Index: llvm/include/llvm/Support/DataTypes.h.in diff -u llvm/include/llvm/Support/DataTypes.h.in:1.14 llvm/include/llvm/Support/DataTypes.h.in:1.15 --- llvm/include/llvm/Support/DataTypes.h.in:1.14 Mon Oct 25 13:39:18 2004 +++ llvm/include/llvm/Support/DataTypes.h.in Tue Oct 26 11:15:18 2004 @@ -49,8 +49,9 @@ #include #endif -// Fix AIX definitions of INT64_{MIN,MAX} -#include "llvm/Support/DataTypesFix.h" +#ifdef _AIX +#include "llvm/Support/AIXDataTypesFix.h" +#endif // Handle incorrect definition of uint64_t as u_int64_t #ifndef HAVE_UINT64_T From sabre at nondot.org Tue Oct 26 11:36:46 2004 From: sabre at nondot.org (Chris Lattner) Date: Tue, 26 Oct 2004 11:36:46 -0500 (CDT) Subject: [llvm-commits] CVS: llvm/include/llvm/Support/AIXDataTypesFix.h DataTypes.h.in DataTypesFix.h In-Reply-To: <200410261615.LAA11087@zion.cs.uiuc.edu> Message-ID: Note that this means we have to reconfigure again... :P -Chris On Tue, 26 Oct 2004, Misha Brukman wrote: > > > Changes in directory llvm/include/llvm/Support: > > AIXDataTypesFix.h added (r1.1) > DataTypes.h.in updated: 1.14 -> 1.15 > DataTypesFix.h (r1.1) removed > --- > Log message: > > * DataTypesFix.h moved to AIXDataTypesFix.h > * Condition #inclusion of AIXDataTypes.h on the _AIX preprocessor symbol to > prevent extra I/O on non-AIX systems. Thus, no #ifdef in AIXDataTypes.h > > > --- > Diffs of the changes: (+28 -2) > > Index: llvm/include/llvm/Support/AIXDataTypesFix.h > diff -c /dev/null llvm/include/llvm/Support/AIXDataTypesFix.h:1.1 > *** /dev/null Tue Oct 26 11:15:28 2004 > --- llvm/include/llvm/Support/AIXDataTypesFix.h Tue Oct 26 11:15:18 2004 > *************** > *** 0 **** > --- 1,25 ---- > + //===-- include/Support/AIXDataTypesFix.h - Fix datatype defs ---*- C++ -*-===// > + // > + // The LLVM Compiler Infrastructure > + // > + // This file was developed by the LLVM research group and is distributed under > + // the University of Illinois Open Source License. See LICENSE.TXT for details. > + // > + //===----------------------------------------------------------------------===// > + // > + // This file overrides default system-defined types and limits which cannot be > + // done in DataTypes.h.in because it is processed by autoheader first, which > + // comments out any #undef statement > + // > + //===----------------------------------------------------------------------===// > + > + // No include guards desired! > + > + #ifndef SUPPORT_DATATYPES_H > + #error "AIXDataTypesFix.h must only be included via DataTypes.h!" > + #endif > + > + // GCC is strict about defining large constants: they must have LL modifier. > + // These will be defined properly at the end of DataTypes.h > + #undef INT64_MAX > + #undef INT64_MIN > > > Index: llvm/include/llvm/Support/DataTypes.h.in > diff -u llvm/include/llvm/Support/DataTypes.h.in:1.14 llvm/include/llvm/Support/DataTypes.h.in:1.15 > --- llvm/include/llvm/Support/DataTypes.h.in:1.14 Mon Oct 25 13:39:18 2004 > +++ llvm/include/llvm/Support/DataTypes.h.in Tue Oct 26 11:15:18 2004 > @@ -49,8 +49,9 @@ > #include > #endif > > -// Fix AIX definitions of INT64_{MIN,MAX} > -#include "llvm/Support/DataTypesFix.h" > +#ifdef _AIX > +#include "llvm/Support/AIXDataTypesFix.h" > +#endif > > // Handle incorrect definition of uint64_t as u_int64_t > #ifndef HAVE_UINT64_T > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvm-commits > -Chris -- http://llvm.org/ http://nondot.org/sabre/ From brukman at cs.uiuc.edu Tue Oct 26 11:18:54 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue, 26 Oct 2004 11:18:54 -0500 Subject: [llvm-commits] CVS: llvm/docs/CodingStandards.html Message-ID: <200410261618.LAA11320@zion.cs.uiuc.edu> Changes in directory llvm/docs: CodingStandards.html updated: 1.23 -> 1.24 --- Log message: Use around "#include" and "std::endl" --- Diffs of the changes: (+22 -21) Index: llvm/docs/CodingStandards.html diff -u llvm/docs/CodingStandards.html:1.23 llvm/docs/CodingStandards.html:1.24 --- llvm/docs/CodingStandards.html:1.23 Tue Oct 26 11:07:46 2004 +++ llvm/docs/CodingStandards.html Tue Oct 26 11:18:43 2004 @@ -19,7 +19,7 @@
    1. Commenting
    2. Comment Formatting
    3. -
    4. #include Style
    5. +
    6. #include Style
    7. Source Code Width
    8. Use Spaces Instead of Tabs
    9. Indent Code Consistently
    10. @@ -46,7 +46,7 @@
      1. Assert Liberally
      2. Prefer Preincrement
      3. -
      4. Avoid std::endl
      5. +
      6. Avoid std::endl
      7. Exploit C++ to its Fullest
    @@ -195,7 +195,8 @@
    1. When writing a C code: Obviously if you are writing C code, use C style comments. :)
    2. -
    3. When writing a header file that may be #included by a C source file.
    4. +
    5. When writing a header file that may be #included by a C source + file.
    6. When writing a source file that is used by a tool that only accepts C style comments.
    @@ -207,7 +208,7 @@
    @@ -235,13 +236,13 @@

    ... and each catagory should be sorted by name.

    The "Main Module Header" file applies to .cpp file -which implement an interface defined by a .h file. This #include should always -be included first regardless of where it lives on the file system. By -including a header file first in the .cpp files that implement the interfaces, -we ensure that the header does not have any hidden dependencies which are not -explicitly #included in the header, but should be. It is also a form of -documentation in the .cpp file to indicate where the interfaces it implements -are defined.

    +which implement an interface defined by a .h file. This #include +should always be included first regardless of where it lives on the file +system. By including a header file first in the .cpp files that implement the +interfaces, we ensure that the header does not have any hidden dependencies +which are not explicitly #included in the header, but should be. It is also a +form of documentation in the .cpp file to indicate where the interfaces it +implements are defined.

    @@ -432,7 +433,7 @@
    @@ -441,13 +442,13 @@ have to, especially in header files.

    But wait, sometimes you need to have the definition of a class to use it, or -to inherit from it. In these cases go ahead and #include that header file. Be -aware however that there are many cases where you don't need to have the full -definition of a class. If you are using a pointer or reference to a class, you -don't need the header file. If you are simply returning a class instance from a -prototyped function or method, you don't need it. In fact, for most cases, you -simply don't need the definition of a class... and not #include'ing -speeds up compilation.

    +to inherit from it. In these cases go ahead and #include that header +file. Be aware however that there are many cases where you don't need to have +the full definition of a class. If you are using a pointer or reference to a +class, you don't need the header file. If you are simply returning a class +instance from a prototyped function or method, you don't need it. In fact, for +most cases, you simply don't need the definition of a class... and not +#include'ing speeds up compilation.

    It is easy to try to go too overboard on this recommendation, however. You must include all of the header files that you are using, either directly @@ -557,7 +558,7 @@

    @@ -639,7 +640,7 @@ Chris Lattner
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/10/26 16:07:46 $ + Last modified: $Date: 2004/10/26 16:18:43 $ From lattner at cs.uiuc.edu Tue Oct 26 11:20:11 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 11:20:11 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/AIXDataTypesFix.h Message-ID: <200410261620.LAA28293@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: AIXDataTypesFix.h updated: 1.1 -> 1.2 --- Log message: Fix header --- Diffs of the changes: (+1 -1) Index: llvm/include/llvm/Support/AIXDataTypesFix.h diff -u llvm/include/llvm/Support/AIXDataTypesFix.h:1.1 llvm/include/llvm/Support/AIXDataTypesFix.h:1.2 --- llvm/include/llvm/Support/AIXDataTypesFix.h:1.1 Tue Oct 26 11:15:18 2004 +++ llvm/include/llvm/Support/AIXDataTypesFix.h Tue Oct 26 11:19:57 2004 @@ -1,4 +1,4 @@ -//===-- include/Support/AIXDataTypesFix.h - Fix datatype defs ---*- C++ -*-===// +//===-- llvm/Support/AIXDataTypesFix.h - Fix datatype defs ------*- C++ -*-===// // // The LLVM Compiler Infrastructure // From lattner at cs.uiuc.edu Tue Oct 26 11:23:17 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 11:23:17 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp Message-ID: <200410261623.LAA28981@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Local.cpp updated: 1.114 -> 1.115 --- Log message: add support for UndefValue --- Diffs of the changes: (+1 -1) Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.114 llvm/lib/Analysis/DataStructure/Local.cpp:1.115 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.114 Sat Oct 16 13:16:01 2004 +++ llvm/lib/Analysis/DataStructure/Local.cpp Tue Oct 26 11:23:03 2004 @@ -1014,7 +1014,7 @@ DSNodeHandle NewNH(NH.getNode(), NH.getOffset()+SL->MemberOffsets[i]); MergeConstantInitIntoNode(NewNH, cast(CS->getOperand(i))); } - } else if (ConstantAggregateZero *CAZ = dyn_cast(C)) { + } else if (isa(C) || isa(C)) { // Noop } else { assert(0 && "Unknown constant type!"); From gaeke at cs.uiuc.edu Tue Oct 26 12:13:13 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 12:13:13 -0500 Subject: [llvm-commits] CVS: reopt/configure Message-ID: <200410261713.MAA30351@zion.cs.uiuc.edu> Changes in directory reopt: configure updated: 1.9 -> 1.10 --- Log message: Regenerated. --- Diffs of the changes: (+1 -4) Index: reopt/configure diff -u reopt/configure:1.9 reopt/configure:1.10 --- reopt/configure:1.9 Fri Oct 15 14:45:40 2004 +++ reopt/configure Tue Oct 26 12:13:03 2004 @@ -1304,10 +1304,7 @@ # Check whether --with-papi or --without-papi was given. if test "${with_papi+set}" = set; then withval="$with_papi" - PAPIDIR=$withval - -else - PAPIDIR=/home/vadve/shared/Sparc/papi-2.3.4.1 + PAPIDIR=PAPIDIR=$withval fi; From gaeke at cs.uiuc.edu Tue Oct 26 12:13:13 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 12:13:13 -0500 Subject: [llvm-commits] CVS: reopt/Makefile.config.in Message-ID: <200410261713.MAA30350@zion.cs.uiuc.edu> Changes in directory reopt: Makefile.config.in updated: 1.5 -> 1.6 --- Log message: Don't define PAPIDIR at all if --with-papi wasn't specified. The default path we had in here wasn't right anyway. --- Diffs of the changes: (+1 -2) Index: reopt/Makefile.config.in diff -u reopt/Makefile.config.in:1.5 reopt/Makefile.config.in:1.6 --- reopt/Makefile.config.in:1.5 Fri Sep 24 16:22:36 2004 +++ reopt/Makefile.config.in Tue Oct 26 12:13:02 2004 @@ -16,6 +16,5 @@ # Path to the PAPI code. This is used by the reoptimizer only. # e.g.: -#PAPIDIR := /home/vadve/shared/papi-2.3.4.1 -PAPIDIR := @PAPIDIR@ + at PAPIDIR@ From gaeke at cs.uiuc.edu Tue Oct 26 12:13:13 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 12:13:13 -0500 Subject: [llvm-commits] CVS: reopt/autoconf/configure.ac Message-ID: <200410261713.MAA30349@zion.cs.uiuc.edu> Changes in directory reopt/autoconf: configure.ac updated: 1.8 -> 1.9 --- Log message: Don't define PAPIDIR at all if --with-papi wasn't specified. The default path we had in here wasn't right anyway. --- Diffs of the changes: (+1 -1) Index: reopt/autoconf/configure.ac diff -u reopt/autoconf/configure.ac:1.8 reopt/autoconf/configure.ac:1.9 --- reopt/autoconf/configure.ac:1.8 Fri Oct 15 14:42:28 2004 +++ reopt/autoconf/configure.ac Tue Oct 26 12:13:02 2004 @@ -34,7 +34,7 @@ AC_ARG_WITH(llvmobj,AC_HELP_STRING([--with-llvmobj],[Location of LLVM Object Code]),AC_SUBST(LLVM_OBJ,[$withval]),AC_SUBST(LLVM_OBJ,[`cd ../..; pwd`])) dnl Location of PAPI -AC_ARG_WITH(papi,AC_HELP_STRING([--with-papi],[Location of PAPI]),AC_SUBST(PAPIDIR,[$withval]),AC_SUBST(PAPIDIR,[/home/vadve/shared/Sparc/papi-2.3.4.1])) +AC_ARG_WITH(papi,AC_HELP_STRING([--with-papi],[Location of PAPI]),AC_SUBST(PAPIDIR,[PAPIDIR=$withval])) dnl Create the output files AC_OUTPUT([Makefile.common Makefile.config]) From gaeke at cs.uiuc.edu Tue Oct 26 12:13:14 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 12:13:14 -0500 Subject: [llvm-commits] CVS: reopt/lib/Inst/Makefile Message-ID: <200410261713.MAA30361@zion.cs.uiuc.edu> Changes in directory reopt/lib/Inst: Makefile updated: 1.6 -> 1.7 --- Log message: Don't build this stuff if we're not on Solaris. --- Diffs of the changes: (+4 -0) Index: reopt/lib/Inst/Makefile diff -u reopt/lib/Inst/Makefile:1.6 reopt/lib/Inst/Makefile:1.7 --- reopt/lib/Inst/Makefile:1.6 Thu Aug 21 15:21:54 2003 +++ reopt/lib/Inst/Makefile Tue Oct 26 12:13:04 2004 @@ -1,6 +1,10 @@ LEVEL = ../.. #DIRS := lib rtl # rtl needs PAPI +ifeq ($(OS),SunOS) DIRS := lib +else +DIRS := +endif include $(LEVEL)/Makefile.common From gaeke at cs.uiuc.edu Tue Oct 26 12:13:15 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 12:13:15 -0500 Subject: [llvm-commits] CVS: reopt/lib/WholeReoptimizer/Makefile Message-ID: <200410261713.MAA30369@zion.cs.uiuc.edu> Changes in directory reopt/lib/WholeReoptimizer: Makefile updated: 1.2 -> 1.3 --- Log message: LLVMLIBCURRENTSOURCE ==> LLVMLIBDIR. --- Diffs of the changes: (+15 -15) Index: reopt/lib/WholeReoptimizer/Makefile diff -u reopt/lib/WholeReoptimizer/Makefile:1.2 reopt/lib/WholeReoptimizer/Makefile:1.3 --- reopt/lib/WholeReoptimizer/Makefile:1.2 Mon Oct 18 23:36:49 2004 +++ reopt/lib/WholeReoptimizer/Makefile Tue Oct 26 12:13:05 2004 @@ -10,23 +10,23 @@ $(REOPTLIBDIR)/tracejit.o $(REOPTLIBDIR)/traceio.o # Object files that contain common LLVM code the Reoptimizer depends on -REOPTIMIZER_LLVMOBJS = $(LLVMLIBCURRENTSOURCE)/vmcore.o \ - $(LLVMLIBCURRENTSOURCE)/bcreader.o $(LLVMLIBCURRENTSOURCE)/bcwriter.o \ - $(LLVMLIBCURRENTSOURCE)/sparcv9.o \ - $(LLVMLIBCURRENTSOURCE)/sparcv9livevar.o \ - $(LLVMLIBCURRENTSOURCE)/sparcv9sched.o $(LLVMLIBCURRENTSOURCE)/codegen.o \ - $(LLVMLIBCURRENTSOURCE)/executionengine.o \ - $(LLVMLIBCURRENTSOURCE)/lli-jit.o \ - $(LLVMLIBCURRENTSOURCE)/lli-interpreter.o +REOPTIMIZER_LLVMOBJS = $(LLVMLIBDIR)/vmcore.o \ + $(LLVMLIBDIR)/bcreader.o $(LLVMLIBDIR)/bcwriter.o \ + $(LLVMLIBDIR)/sparcv9.o \ + $(LLVMLIBDIR)/sparcv9livevar.o \ + $(LLVMLIBDIR)/sparcv9sched.o $(LLVMLIBDIR)/codegen.o \ + $(LLVMLIBDIR)/executionengine.o \ + $(LLVMLIBDIR)/lli-jit.o \ + $(LLVMLIBDIR)/lli-interpreter.o # Library archive files that contain common LLVM code the Reoptimizer depends on -REOPTIMIZER_LLVMLIBS = $(LLVMLIBCURRENTSOURCE)/libsparcv9regalloc.a \ - $(LLVMLIBCURRENTSOURCE)/libtarget.a \ - $(LLVMLIBCURRENTSOURCE)/libscalaropts.a \ - $(LLVMLIBCURRENTSOURCE)/libtransformutils.a \ - $(LLVMLIBCURRENTSOURCE)/libanalysis.a \ - $(LLVMLIBCURRENTSOURCE)/libsupport.a \ - $(LLVMLIBCURRENTSOURCE)/libLLVMsystem.a +REOPTIMIZER_LLVMLIBS = $(LLVMLIBDIR)/libsparcv9regalloc.a \ + $(LLVMLIBDIR)/libtarget.a \ + $(LLVMLIBDIR)/libscalaropts.a \ + $(LLVMLIBDIR)/libtransformutils.a \ + $(LLVMLIBDIR)/libanalysis.a \ + $(LLVMLIBDIR)/libsupport.a \ + $(LLVMLIBDIR)/libLLVMsystem.a WHOLE_REOPTIMIZER_LIB = $(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION)/libwholereoptimizer.a From brukman at cs.uiuc.edu Tue Oct 26 13:00:13 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue, 26 Oct 2004 13:00:13 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/System/TimeValue.h Message-ID: <200410261800.NAA31518@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: TimeValue.h updated: 1.5 -> 1.6 --- Log message: Wrap comments at 80 cols --- Diffs of the changes: (+2 -1) Index: llvm/include/llvm/System/TimeValue.h diff -u llvm/include/llvm/System/TimeValue.h:1.5 llvm/include/llvm/System/TimeValue.h:1.6 --- llvm/include/llvm/System/TimeValue.h:1.5 Mon Oct 18 19:29:16 2004 +++ llvm/include/llvm/System/TimeValue.h Tue Oct 26 13:00:03 2004 @@ -266,7 +266,8 @@ /// @{ public: /// The seconds component of the TimeValue is set to \p sec without - /// modifying the nanoseconds part. This is useful for whole second arithmetic. + /// modifying the nanoseconds part. This is useful for whole second + /// arithmetic. /// @brief Set the seconds component. void seconds (SecondsType sec ) { this->seconds_ = sec; From lattner at cs.uiuc.edu Tue Oct 26 13:26:28 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 13:26:28 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y Message-ID: <200410261826.NAA05090@apoc.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.y updated: 1.205 -> 1.206 --- Log message: Plug a memory leak in the asmparser. It turns out that we were leaking the strings for basic block labels in some cases. This amounted to about 120K of memory for namd, a medium sized program. --- Diffs of the changes: (+1 -1) Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.205 llvm/lib/AsmParser/llvmAsmParser.y:1.206 --- llvm/lib/AsmParser/llvmAsmParser.y:1.205 Sat Oct 16 13:17:13 2004 +++ llvm/lib/AsmParser/llvmAsmParser.y Tue Oct 26 13:26:14 2004 @@ -405,7 +405,7 @@ CurFun.CurrentFunction->getBasicBlockList().remove(BB); CurFun.CurrentFunction->getBasicBlockList().push_back(BB); } - + ID.destroy(); return BB; } From alkis at cs.uiuc.edu Tue Oct 26 13:40:56 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Tue, 26 Oct 2004 13:40:56 -0500 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200410261840.NAA00721@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.127 -> 1.128 --- Log message: Add some comments. --- Diffs of the changes: (+40 -7) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.127 llvm-java/lib/Compiler/Compiler.cpp:1.128 --- llvm-java/lib/Compiler/Compiler.cpp:1.127 Sat Oct 23 13:27:19 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Tue Oct 26 13:40:46 2004 @@ -84,6 +84,12 @@ typedef SetVector FunctionSet; FunctionSet toCompileFunctions_; + /// This class containts the LLVM type that a class maps to and + /// the max interface index of the interfaces this class + /// implements or the interface index of this interface if this + /// represents an interface. It also contains a map from fields to + /// struct indices for this class (used to index into the class + /// object). struct ClassInfo { ClassInfo() : type(NULL), interfaceIdx(0) { } Type* type; @@ -97,6 +103,10 @@ typedef std::map Class2ClassInfoMap; Class2ClassInfoMap c2ciMap_; + /// This class contains the vtable of a class, a vector with the + /// vtables of its super classes (with the class higher in the + /// hierarchy first). It also contains a map from methods to + /// struct indices for this class (used to index into the vtable). struct VTableInfo { VTableInfo() : vtable(NULL) { } GlobalVariable* vtable; @@ -116,6 +126,7 @@ } private: + /// Given a llvm::Java::Constant returns a llvm::Constant. llvm::Constant* getConstant(Constant* c) { if (dynamic_cast(c)) // FIXME: should return a String object represeting this ConstantString @@ -134,6 +145,7 @@ assert(0 && "Unknown llvm::Java::Constant!"); } + /// Given a JType returns the appropriate llvm::Type. Type* getType(JType type) { switch (type) { case BOOLEAN: return Type::BoolTy; @@ -194,6 +206,8 @@ } } + /// Initializes the class info map; in other words it adds the + /// class info of java.lang.Object. void initializeClassInfoMap() { DEBUG(std::cerr << "Building ClassInfo for: java/lang/Object\n"); ClassFile* cf = ClassFile::get("java/lang/Object"); @@ -233,6 +247,8 @@ DEBUG(std::cerr << "Built ClassInfo for: java/lang/Object\n"); } + /// Initializes the VTableInfo map; in other words it adds the + /// VTableInfo for java.lang.Object. void initializeVTableInfoMap() { DEBUG(std::cerr << "Building VTableInfo for: java/lang/Object\n"); ClassFile* cf = ClassFile::get("java/lang/Object"); @@ -325,11 +341,7 @@ DEBUG(std::cerr << "Built VTableInfo for: java/lang/Object\n"); } - void initializeTypeMaps() { - initializeClassInfoMap(); - initializeVTableInfoMap(); - } - + /// Returns the ClassInfo object associated with this classfile. const ClassInfo& getClassInfo(ClassFile* cf) { Class2ClassInfoMap::iterator it = c2ciMap_.lower_bound(cf); if (it != c2ciMap_.end() && it->first == cf) @@ -377,6 +389,9 @@ return ci; } + /// Builds the super classes' vtable array for this classfile and + /// its corresponding VTable. The most generic class goes first in + /// the array. std::pair buildSuperClassesVTables(ClassFile* cf, const VTableInfo& vi) const { ArrayType* vtablesArrayTy = @@ -398,6 +413,8 @@ std::vector(2, ConstantUInt::get(Type::UIntTy, 0)))); } + /// Builds an interface Vtable for the specified + /// pair. llvm::Constant* buildInterfaceVTable(ClassFile* cf, ClassFile* interface) { const VTableInfo& classVI = getVTableInfo(cf); @@ -439,6 +456,9 @@ &module_); } + /// Builds the interfaces vtable array for this classfile and its + /// corresponding VTableInfo. If this classfile is an interface we + /// return a pointer to 0xFFFFFFFF. std::pair buildInterfacesVTables(ClassFile* cf, const VTableInfo& vi) { // if this is an interface then we are not implementing any @@ -489,6 +509,8 @@ std::vector(2, ConstantUInt::get(Type::UIntTy, 0)))); } + /// Given the classfile and its corresponding VTableInfo, + /// construct the typeinfo constant for it. llvm::Constant* buildClassTypeInfo(ClassFile* cf, const VTableInfo& vi) { std::vector typeInfoInit; @@ -514,6 +536,7 @@ return ConstantStruct::get(VTableInfo::TypeInfoTy, typeInfoInit); } + /// Returns the VTableInfo associated with this classfile. const VTableInfo& getVTableInfo(ClassFile* cf) { Class2VTableInfoMap::iterator it = c2viMap_.lower_bound(cf); if (it != c2viMap_.end() && it->first == cf) @@ -604,6 +627,8 @@ return vi; } + /// Emits the necessary code to get a pointer to a static field of + /// an object. GlobalVariable* getStaticField(unsigned index) { ConstantFieldRef* fieldRef = cf_->getConstantFieldRef(index); ConstantNameAndType* nameAndType = fieldRef->getNameAndType(); @@ -624,6 +649,8 @@ return global; } + /// Emits the necessary code to get a field from the passed + /// pointer to an object. Value* getField(unsigned index, Value* ptr) { ConstantFieldRef* fieldRef = cf_->getConstantFieldRef(index); ConstantNameAndType* nameAndType = fieldRef->getNameAndType(); @@ -631,6 +658,8 @@ return getField(cf, nameAndType->getName()->str(), ptr); } + /// Emits the necessary code to get a field from the passed + /// pointer to an object. Value* getField(ClassFile* cf, const std::string& fieldName, Value* ptr) { // Cast ptr to correct type ptr = new CastInst(ptr, PointerType::get(getClassInfo(cf).type), @@ -655,6 +684,8 @@ return new GetElementPtrInst(ptr, indices, TMP, currentBB_); } + /// Compiles the passed method only (it does not compile any + /// callers or methods of objects it creates). Function* compileMethodOnly(const std::string& classMethodDesc) { Method* method = getMethod(classMethodDesc); cf_ = method->getParent(); @@ -748,6 +779,7 @@ return function; } + /// Emits static initializers for this class if not done already. void emitStaticInitializers(const ClassFile* classfile) { const Method* method = classfile->getMethod("()V"); if (!method) @@ -837,8 +869,9 @@ BasicBlock* staticInitBB = new BasicBlock("entry", staticInit); new ReturnInst(NULL, staticInitBB); - // initialize type maps and globals (vtables) - initializeTypeMaps(); + // initialize type maps and vtable globals + initializeClassInfoMap(); + initializeVTableInfoMap(); // create the method requested Function* function = getFunction(getMethod(classMethodDesc)); From alkis at cs.uiuc.edu Tue Oct 26 13:56:36 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Tue, 26 Oct 2004 13:56:36 -0500 Subject: [llvm-commits] CVS: llvm-java/docs/object-layout.txt Message-ID: <200410261856.NAA01499@zion.cs.uiuc.edu> Changes in directory llvm-java/docs: object-layout.txt updated: 1.5 -> 1.6 --- Log message: Add docs for java layout for java arrays. --- Diffs of the changes: (+29 -0) Index: llvm-java/docs/object-layout.txt diff -u llvm-java/docs/object-layout.txt:1.5 llvm-java/docs/object-layout.txt:1.6 --- llvm-java/docs/object-layout.txt:1.5 Fri Sep 10 15:21:16 2004 +++ llvm-java/docs/object-layout.txt Tue Oct 26 13:56:26 2004 @@ -74,3 +74,32 @@ return objClazz->typeinfo.lastIface >= clazz->typeinfo.lastIface && objClazz->typeinfo.interfaces[clazz->typeinfo.lastIface]; } + +Object Layout for Java Arrays +----------------------------- + +Java primitive arrays inherit from java.lang.Object so they will at +minimum have a nested java.lang.Object struct as their first element. + +struct javaIntArray { + struct java_lang_Object; + unsigned length; + int array[0]; +}; + +The typeinfo struct inside this class' vtable will be filled in the +same way as if this was a proper class. This will allow isInstanceOf +to work transparently for primitive java arrays. + +For reference type arrays we use the same struct with a different +typeinfo: + +struct javaObjectArray { + struct java_lang_Object; + unsigned length; + java_lang_Object[0]; +}; + +The typeinfo struct will reflect a hierarchy of array types as if B[] +derives from A[] if B derives from A. This will allow isInstanceOf to +work transparently for object arrays as well. From gaeke at cs.uiuc.edu Tue Oct 26 14:02:36 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 14:02:36 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/lib/WholeReoptimizer/Makefile Message-ID: <200410261902.OAA13776@kain.cs.uiuc.edu> Changes in directory reopt/lib/WholeReoptimizer: Makefile updated: 1.3 -> 1.4 --- Log message: Use $(ECHO) for messages. --- Diffs of the changes: (+4 -4) Index: reopt/lib/WholeReoptimizer/Makefile diff -u reopt/lib/WholeReoptimizer/Makefile:1.3 reopt/lib/WholeReoptimizer/Makefile:1.4 --- reopt/lib/WholeReoptimizer/Makefile:1.3 Tue Oct 26 12:13:05 2004 +++ reopt/lib/WholeReoptimizer/Makefile Tue Oct 26 14:02:26 2004 @@ -34,12 +34,12 @@ $(WHOLE_REOPTIMIZER_LIB): $(REOPTIMIZER_OBJS) $(REOPTIMIZER_LLVMOBJS) $(REOPTIMIZER_LLVMLIBS) $(VERB) rm -f $@ - @echo "Building $(WHOLE_REOPTIMIZER_LIB)" - @echo "Adding reoptimizer .o files to libwholereoptimizer.a" + @$(ECHO) "Building $(WHOLE_REOPTIMIZER_LIB)" + @$(ECHO) "Adding reoptimizer .o files to libwholereoptimizer.a" $(VERB) ar rc $@ $(REOPTIMIZER_OBJS) $(REOPTIMIZER_LLVMOBJS) $(VERB) @for lib in $(REOPTIMIZER_LLVMLIBS); \ do \ - echo "Adding files from $${lib} to libwholereoptimizer.a"; \ + $(ECHO) "Adding files from $${lib} to libwholereoptimizer.a"; \ d=`basename $${lib}`x; \ mkdir $${d}; \ cd $${d}; \ @@ -48,7 +48,7 @@ cd ..; \ rm -rf $${d}; \ done - @echo "==== Done building libwholereoptimizer.a ====" + @$(ECHO) "======= Finished building libwholereoptimizer.a" clean:: $(VERB) rm -f $(WHOLE_REOPTIMIZER_LIB) From gaeke at cs.uiuc.edu Tue Oct 26 14:02:37 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 14:02:37 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/test/Makefile Message-ID: <200410261902.OAA13782@kain.cs.uiuc.edu> Changes in directory reopt/test: Makefile updated: 1.8 -> 1.9 --- Log message: Add a print_objroot target for the use of the run-tests script, since 'gmake prdirs' seems to have gone. --- Diffs of the changes: (+4 -0) Index: reopt/test/Makefile diff -u reopt/test/Makefile:1.8 reopt/test/Makefile:1.9 --- reopt/test/Makefile:1.8 Thu Sep 23 14:48:35 2004 +++ reopt/test/Makefile Tue Oct 26 14:02:27 2004 @@ -18,3 +18,7 @@ (cd $(LLVM_OBJ_ROOT)/projects/llvm-test/$(SUBDIR); \ PROJECT_DIR=$(BUILD_OBJ_ROOT) $(MAKE) TEST=reopt \ test ) + +print_objroot: + @echo $(LLVM_OBJ_ROOT) + From gaeke at cs.uiuc.edu Tue Oct 26 14:02:38 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 14:02:38 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/test/run-tests Message-ID: <200410261902.OAA13788@kain.cs.uiuc.edu> Changes in directory reopt/test: run-tests updated: 1.24 -> 1.25 --- Log message: Use print_objroot target instead of 'gmake prdirs'. --- Diffs of the changes: (+1 -1) Index: reopt/test/run-tests diff -u reopt/test/run-tests:1.24 reopt/test/run-tests:1.25 --- reopt/test/run-tests:1.24 Fri Oct 15 14:36:36 2004 +++ reopt/test/run-tests Tue Oct 26 14:02:28 2004 @@ -35,7 +35,7 @@ done # get full path to projects/llvm-test subdirectory -objroot=`gmake prdirs | egrep 'LLVM.*Object Root' |cut -d: -f2-` +objroot=`gmake print_objroot` EXTRATESTSUBDIR=SingleSource/Reoptimizer EXTRATESTDIR=${objroot}/projects/llvm-test/$EXTRATESTSUBDIR From reid at x10sys.com Tue Oct 26 14:11:23 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Oct 2004 12:11:23 -0700 Subject: [llvm-commits] CVS: reopt/test/Makefile In-Reply-To: <200410261902.OAA13782@kain.cs.uiuc.edu> References: <200410261902.OAA13782@kain.cs.uiuc.edu> Message-ID: <1098817883.15367.7.camel@bashful.x10sys.com> "make prdirs" -> "make printvars" I upgraded the target to print more than just directory variables and gave it a more meaningful name at the same time. Reid. On Tue, 2004-10-26 at 12:02, Brian Gaeke wrote: > Changes in directory reopt/test: > > Makefile updated: 1.8 -> 1.9 > --- > Log message: > > Add a print_objroot target for the use of the run-tests script, since > 'gmake prdirs' seems to have gone. > > > --- > Diffs of the changes: (+4 -0) > > Index: reopt/test/Makefile > diff -u reopt/test/Makefile:1.8 reopt/test/Makefile:1.9 > --- reopt/test/Makefile:1.8 Thu Sep 23 14:48:35 2004 > +++ reopt/test/Makefile Tue Oct 26 14:02:27 2004 > @@ -18,3 +18,7 @@ > (cd $(LLVM_OBJ_ROOT)/projects/llvm-test/$(SUBDIR); \ > PROJECT_DIR=$(BUILD_OBJ_ROOT) $(MAKE) TEST=reopt \ > test ) > + > +print_objroot: > + @echo $(LLVM_OBJ_ROOT) > + > > > > _______________________________________________ > llvm-commits mailing list > llvm-commits at cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvm-commits -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20041026/8fc69e8f/attachment.bin From gaeke at cs.uiuc.edu Tue Oct 26 14:52:34 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 14:52:34 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/lib/Inst/Makefile Message-ID: <200410261952.OAA00340@kain.cs.uiuc.edu> Changes in directory reopt/lib/Inst: Makefile updated: 1.7 -> 1.8 --- Log message: Build the rtl library if PAPIDIR is set. Fix building lib/Inst/lib if on SunOS. --- Diffs of the changes: (+2 -4) Index: reopt/lib/Inst/Makefile diff -u reopt/lib/Inst/Makefile:1.7 reopt/lib/Inst/Makefile:1.8 --- reopt/lib/Inst/Makefile:1.7 Tue Oct 26 12:13:04 2004 +++ reopt/lib/Inst/Makefile Tue Oct 26 14:52:24 2004 @@ -1,10 +1,8 @@ LEVEL = ../.. -#DIRS := lib rtl -# rtl needs PAPI +include $(LEVEL)/Makefile.config ifeq ($(OS),SunOS) -DIRS := lib +DIRS := lib rtl else DIRS := endif - include $(LEVEL)/Makefile.common From gaeke at cs.uiuc.edu Tue Oct 26 14:52:35 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 14:52:35 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/lib/Inst/rtl/Makefile Message-ID: <200410261952.OAA00384@kain.cs.uiuc.edu> Changes in directory reopt/lib/Inst/rtl: Makefile updated: 1.5 -> 1.6 --- Log message: Build the rtl library if PAPIDIR is set. Fix building lib/Inst/lib if on SunOS. --- Diffs of the changes: (+4 -0) Index: reopt/lib/Inst/rtl/Makefile diff -u reopt/lib/Inst/rtl/Makefile:1.5 reopt/lib/Inst/rtl/Makefile:1.6 --- reopt/lib/Inst/rtl/Makefile:1.5 Thu Aug 21 14:40:59 2003 +++ reopt/lib/Inst/rtl/Makefile Tue Oct 26 14:52:25 2004 @@ -1,7 +1,11 @@ LEVEL = ../../.. +include $(LEVEL)/Makefile.config + +ifdef PAPIDIR LIBRARYNAME = pprtl BUILD_ARCHIVE = 1 CPPFLAGS += -D_BUILDING_RUNTIME_LIBRARY_ -I$(PAPIDIR)/include CXXFLAGS += -D_BUILDING_RUNTIME_LIBRARY_ -I$(PAPIDIR)/include +endif include $(LEVEL)/Makefile.common From lattner at cs.uiuc.edu Tue Oct 26 15:03:04 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 15:03:04 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410262003.PAA07164@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.213 -> 1.214 --- Log message: Unless someone seriously objects, I don't think we really need this. Sorry resistor :( --- Diffs of the changes: (+0 -8) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.213 llvm/Makefile.rules:1.214 --- llvm/Makefile.rules:1.213 Tue Oct 26 02:09:33 2004 +++ llvm/Makefile.rules Tue Oct 26 15:02:50 2004 @@ -1098,11 +1098,3 @@ @$(ECHO) "Compile.CXX: " '$(Compile.CXX)' @$(ECHO) "Compile.C: " '$(Compile.C)' -# This frivolous target provided for Resistor who requested that the makefiles -# be hardened and that he get a "pony" after the makefiles (accidentally) -# deleted his unix kernel. -pony:: - @wget -q \ - http://search.cpan.org/src/ASAVIGE/Acme-EyeDrops-1.40/lib/Acme/EyeDrops/pony2.eye \ - -O /tmp/resistor.pony - @cat /tmp/resistor.pony From gaeke at cs.uiuc.edu Tue Oct 26 15:08:28 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 15:08:28 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Message-ID: <200410262008.PAA16240@seraph.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: UnpackTraceFunction.cpp updated: 1.116 -> 1.117 --- Log message: Finish writing placeSpilledArgs(). This fixes a couple of the broken traces in 164.gzip. Also, improve eliminatePhiAtTraceExit's doxygen comment a little. --- Diffs of the changes: (+27 -10) Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.116 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.117 --- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.116 Thu Oct 21 12:48:10 2004 +++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Tue Oct 26 15:08:18 2004 @@ -59,8 +59,10 @@ } // defined in ValueAllocState.cpp: -extern std::pair -GetValueAllocState (TraceFunction *TF, Value *V, bool preferLiveIn = true); +extern std::pair GetValueAllocState (TraceFunction *TF, Value *V, bool preferLiveIn = true); +extern AllocInfo GetTraceFnValueAllocState (TraceFunction *TF, Value *V, bool preferLiveIn); +extern AllocInfo GetMatrixFnValueAllocState (TraceFunction *TF, Value *V, bool +preferLiveIn); // Commonly used registers: static const unsigned sp = SparcV9::o6, MatrixFP = SparcV9::i6, @@ -432,7 +434,7 @@ } /// eliminatePhiAtTraceExit - Perform Phi elimination for PN along trace exit -/// edges. +/// edges. Uses addLiveOutCopy to perform the actual copy insertion. /// void UnpackTraceFunction::eliminatePhiAtTraceExit (MachineFunction &MF, MachineBasicBlock &MBB, @@ -638,24 +640,39 @@ /// stack frame. void UnpackTraceFunction::placeSpilledArgs () { SpilledArgMap.clear (); - for (unsigned a = 6, s = TF->TraceFn->asize(); a < s; ++a) { - // Get old position for argument #a using GetValueAllocState. If it - // is not spilled in the TraceFn to an offset which is > 2047, then + if (6 >= TF->TraceFn->asize ()) + return; + Function::aiterator argit = TF->TraceFn->abegin (); + std::advance (argit, 6); + for (unsigned a = 6, s = TF->TraceFn->asize (); a < s; ++a, ++argit) { + // Get old position for argument #a using GetValueAllocState. + AllocInfo TraceAI = GetTraceFnValueAllocState (TF, argit, true); + + // If it is not spilled in the TraceFn to an offset which is > 2047, then // it isn't in an invalid region of the stack frame, and we don't // have to relocate it. - + if (TraceAI.AllocState != AllocInfo::Spilled || TraceAI.Placement < 2047) + continue; + // Find a new position for argument #a by using a similar formula to // that of stackOffsetForReg(). For the formula's purposes, we can // treat excess args as being "registers" numbered starting with // SparcV9::fsr + 1. - + static const unsigned LastReg = SparcV9::fsr; // highest-numbered reg. + int newStackOffset = stackOffsetForReg (LastReg + (a - (6 - 1))); + // Use the new position (which is relative to sp) to calculate an // offset from fp instead, by subtracting the TotalStackSize. The // result should be > 0 and < 2047. - + int newFramePtrOffset = newStackOffset - TotalStackSize; + DEBUG (std::cerr << "placeSpilledArgs: Repositioning arg #" << a << " (" + << *argit << ") from spill slot at " << TraceAI.Placement + << " to new stack offset " << newStackOffset + << " = new frame ptr offset " << newFramePtrOffset << "\n"); + // Put the pair into the SpilledArgMap. + SpilledArgMap[TraceAI.Placement] = newFramePtrOffset; } - // FIXME - implement } int UnpackTraceFunction::fixupSpilledArgPlacement (int offset) { From gaeke at cs.uiuc.edu Tue Oct 26 15:08:29 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 15:08:29 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/lib/Mapping/ValueAllocState.cpp Message-ID: <200410262008.PAA16246@seraph.cs.uiuc.edu> Changes in directory reopt/lib/Mapping: ValueAllocState.cpp updated: 1.4 -> 1.5 --- Log message: Split GetValueAllocState into GetTraceFnValueAllocState and GetMatrixFnValueAllocState. Refactor common bits out into cacheTraceBoundaryBlocks. --- Diffs of the changes: (+21 -6) Index: reopt/lib/Mapping/ValueAllocState.cpp diff -u reopt/lib/Mapping/ValueAllocState.cpp:1.4 reopt/lib/Mapping/ValueAllocState.cpp:1.5 --- reopt/lib/Mapping/ValueAllocState.cpp:1.4 Thu Sep 2 11:55:44 2004 +++ reopt/lib/Mapping/ValueAllocState.cpp Tue Oct 26 15:08:19 2004 @@ -85,7 +85,6 @@ } static std::set TraceBoundaryBlocks; -static TraceFunction *lastTraceFunction; static void findTraceBoundaryBlocks (TraceFunction *TF) { TraceBoundaryBlocks.clear (); @@ -183,15 +182,31 @@ return AllocInfo(); } -/// GetValueAllocState - Returns a pair containing the -/// saved register allocator state for a value. -/// -std::pair -GetValueAllocState (TraceFunction *TF, Value *V, bool preferLiveIn) { +static inline void cacheTraceBoundaryBlocks (TraceFunction *TF) { + static TraceFunction *lastTraceFunction; if (lastTraceFunction != TF) { findTraceBoundaryBlocks (TF); lastTraceFunction = TF; } +} + +AllocInfo GetTraceFnValueAllocState (TraceFunction *TF, Value *V, bool preferLiveIn) { + cacheTraceBoundaryBlocks (TF); + return getValueAllocStateFromGlobal (TF->TraceFn, V, preferLiveIn); +} + +AllocInfo GetMatrixFnValueAllocState (TraceFunction *TF, Value *V, bool preferLiveIn){ + cacheTraceBoundaryBlocks (TF); + return getValueAllocStateFromModule (TF->MatrixFn, V, preferLiveIn); +} + +/// GetValueAllocState - Returns a pair containing the +/// saved register allocator state for a value which exists in both the MatrixFn +/// and TraceFn. +/// +std::pair +GetValueAllocState (TraceFunction *TF, Value *V, bool preferLiveIn) { + cacheTraceBoundaryBlocks (TF); return std::make_pair (getValueAllocStateFromModule (TF->MatrixFn, V, preferLiveIn), getValueAllocStateFromGlobal (TF->TraceFn, From gaeke at cs.uiuc.edu Tue Oct 26 15:08:30 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 15:08:30 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/lib/TraceToFunction/TraceToFunction.cpp Message-ID: <200410262008.PAA16252@seraph.cs.uiuc.edu> Changes in directory reopt/lib/TraceToFunction: TraceToFunction.cpp updated: 1.86 -> 1.87 --- Log message: Fix a bug where spurious alternate entry points into a trace could be generated if there were instructions like PHINodes that might use a trace BasicBlock without also inducing an incoming CFG edge. --- Diffs of the changes: (+1 -1) Index: reopt/lib/TraceToFunction/TraceToFunction.cpp diff -u reopt/lib/TraceToFunction/TraceToFunction.cpp:1.86 reopt/lib/TraceToFunction/TraceToFunction.cpp:1.87 --- reopt/lib/TraceToFunction/TraceToFunction.cpp:1.86 Thu Sep 2 11:55:46 2004 +++ reopt/lib/TraceToFunction/TraceToFunction.cpp Tue Oct 26 15:08:20 2004 @@ -596,7 +596,7 @@ ui != ue; ++ui) { assert (isa (*ui) && "can't deal with non-Instruction Users of BasicBlocks"); - if (!T.contains (cast (*ui)->getParent ())) + if ((!T.contains (cast (*ui)->getParent ())) && (isa (*ui))) if (std::find (b.begin (), b.end (), Blk) == b.end ()) b.push_back (Blk); } From gaeke at cs.uiuc.edu Tue Oct 26 15:08:31 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 15:08:31 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/test/run-big-tests Message-ID: <200410262008.PAA16258@seraph.cs.uiuc.edu> Changes in directory reopt/test: run-big-tests updated: 1.2 -> 1.3 --- Log message: Don't unconditionally 'make clean' before running a test. --- Diffs of the changes: (+0 -1) Index: reopt/test/run-big-tests diff -u reopt/test/run-big-tests:1.2 reopt/test/run-big-tests:1.3 --- reopt/test/run-big-tests:1.2 Thu Oct 14 16:44:14 2004 +++ reopt/test/run-big-tests Tue Oct 26 15:08:21 2004 @@ -1,7 +1,6 @@ #!/bin/sh for test in art equake ammp gzip parser vortex bzip2 m88ksim compress li do - ./run-tests -clean $test ./run-tests $test ${1+"$@"} done exit 0 From gaeke at cs.uiuc.edu Tue Oct 26 15:33:52 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue, 26 Oct 2004 15:33:52 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/test/run-tests Message-ID: <200410262033.PAA05227@kain.cs.uiuc.edu> Changes in directory reopt/test: run-tests updated: 1.25 -> 1.26 --- Log message: Don't let "rm -f" complain, if there are no files to remove. --- Diffs of the changes: (+3 -3) Index: reopt/test/run-tests diff -u reopt/test/run-tests:1.25 reopt/test/run-tests:1.26 --- reopt/test/run-tests:1.25 Tue Oct 26 14:02:28 2004 +++ reopt/test/run-tests Tue Oct 26 15:33:42 2004 @@ -131,10 +131,10 @@ do_clean () { echo "cleaning in $fullsubdirpath" - find $fullsubdirpath -name "*.out-llc" -print |xargs rm - find $fullsubdirpath -name "*.out-reopt-llc" -print |xargs rm + find $fullsubdirpath -name "*.out-llc" -print |xargs rm 2>/dev/null + find $fullsubdirpath -name "*.out-reopt-llc" -print |xargs rm 2>/dev/null if [ $outputonly -eq 0 ]; then - find $fullsubdirpath -name "*reopt*" -print |xargs rm -rf + find $fullsubdirpath -name "*reopt*" -print |xargs rm -rf 2>/dev/null fi } From alkis at cs.uiuc.edu Tue Oct 26 15:42:03 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Tue, 26 Oct 2004 15:42:03 -0500 Subject: [llvm-commits] CVS: llvm-java/docs/object-layout.txt Message-ID: <200410262042.PAA27478@zion.cs.uiuc.edu> Changes in directory llvm-java/docs: object-layout.txt updated: 1.6 -> 1.7 --- Log message: Make description about arrays of objecs a bit more clear and add a missing struct element name. --- Diffs of the changes: (+5 -3) Index: llvm-java/docs/object-layout.txt diff -u llvm-java/docs/object-layout.txt:1.6 llvm-java/docs/object-layout.txt:1.7 --- llvm-java/docs/object-layout.txt:1.6 Tue Oct 26 13:56:26 2004 +++ llvm-java/docs/object-layout.txt Tue Oct 26 15:41:53 2004 @@ -91,13 +91,15 @@ same way as if this was a proper class. This will allow isInstanceOf to work transparently for primitive java arrays. -For reference type arrays we use the same struct with a different -typeinfo: +For reference type arrays we use the same struct for all types. The +only difference is the vtable (actually the vtables are identical but +they have different typeinfo structs to reflect the hierarchy of the +contained elements): struct javaObjectArray { struct java_lang_Object; unsigned length; - java_lang_Object[0]; + java_lang_Object array[0]; }; The typeinfo struct will reflect a hierarchy of array types as if B[] From reid at x10sys.com Tue Oct 26 16:30:42 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Oct 2004 16:30:42 -0500 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/crtend/Makefile Message-ID: <200410262130.QAA04076@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/crtend: Makefile updated: 1.17 -> 1.18 --- Log message: * Make the libcrtend.a installation depend on the bytecode-libs directory * Conform output to standard. --- Diffs of the changes: (+7 -8) Index: llvm/runtime/GCCLibraries/crtend/Makefile diff -u llvm/runtime/GCCLibraries/crtend/Makefile:1.17 llvm/runtime/GCCLibraries/crtend/Makefile:1.18 --- llvm/runtime/GCCLibraries/crtend/Makefile:1.17 Tue Oct 26 02:02:58 2004 +++ llvm/runtime/GCCLibraries/crtend/Makefile Tue Oct 26 16:30:31 2004 @@ -32,8 +32,9 @@ all:: $(CRTEND_A) # Installation simply requires copying the archive to it's new home. -$(DESTDIR)$(bytecode_libdir)/libcrtend.a: $(CRTEND_A) - $(INSTALL) $(CRTEND_A) $(DESTDIR)$(bytecode_libdir) +$(bytecode_libdir)/libcrtend.a: $(CRTEND_A) $(bytecode_libdir) + @$(ECHO) Installing $(CRTEND_A) + $(VERB) $(INSTALL) $(CRTEND_A) $(bytecode_libdir) install:: $(DESTDIR)$(bytecode_libdir)/libcrtend.a install-bytecode:: $(DESTDIR)$(bytecode_libdir)/libcrtend.a @@ -46,7 +47,7 @@ # We build libcrtend.a from the four components described in the README. $(CRTEND_A) : $(ComponentLibs) $(LIBDIR)/.dir - @echo Building final libcrtend.a file from components + @$(ECHO) Building final libcrtend.a file from components $(VERB) $(Archive) $@ $(ComponentLibs) MainObj := $(OBJDIR)/crtend.bc $(OBJDIR)/listend.bc @@ -55,17 +56,15 @@ # __main and ctor/dtor support component $(OBJDIR)/comp_main.bc: $(MainObj) - @echo Linking $(notdir $@) component... + @$(ECHO) Linking $(notdir $@) component... $(VERB) $(GCCLD) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_main.lst $(MainObj) -o $@ # Generic exception handling support runtime. $(OBJDIR)/comp_genericeh.bc: $(GenericEHObj) - @echo Linking $(notdir $@) component... + @$(ECHO) Linking $(notdir $@) component... $(VERB) $(GCCLD) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_genericeh.lst $(GenericEHObj) -o $@ # setjmp/longjmp exception handling support runtime. $(OBJDIR)/comp_sjljeh.bc: $(SJLJEHObj) - @echo Linking $(notdir $@) component... + @$(ECHO) Linking $(notdir $@) component... $(VERB) $(GCCLD) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_sjljeh.lst $(SJLJEHObj) -o $@ - - From reid at x10sys.com Tue Oct 26 17:26:44 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Oct 2004 17:26:44 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410262226.RAA05605@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.214 -> 1.215 --- Log message: Cleanup/Fixes: * Force preconditions to be met FIRST * Fix dist-check dependency * Add some variables to the printvars target * Automatically update Makefile.* as well as just Makefile --- Diffs of the changes: (+99 -71) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.214 llvm/Makefile.rules:1.215 --- llvm/Makefile.rules:1.214 Tue Oct 26 15:02:50 2004 +++ llvm/Makefile.rules Tue Oct 26 17:26:33 2004 @@ -25,8 +25,8 @@ # Define the various target sets #-------------------------------------------------------------------- RECURSIVE_TARGETS := all clean check install uninstall -LOCAL_TARGETS := all-local clean-local check-local install-local printvars\ - uninstall-local +LOCAL_TARGETS := all-local clean-local check-local install-local \ + printvars uninstall-local TOPLEV_TARGETS := dist dist-check dist-clean tags USER_TARGETS := $(RECURSIVE_TARGETS) $(LOCAL_TARGETS) $(TOPLEV_TARGETS) INTERNAL_TARGETS := preconditions \ @@ -35,31 +35,103 @@ uninstall-config-dir uninstall-shared-library uninstall-bytecode-library \ uninstall-archive-library uninstall-relinked-library uninstall-tool +############################################################################### +# INITIALIZATION: Basic things the makefile needs +############################################################################### + +#-------------------------------------------------------------------- +# Reset the list of suffixes we know how to build +#-------------------------------------------------------------------- +.SUFFIXES: +.SUFFIXES: .c .cpp .h .hpp .y .l .lo .o .a $(SHLIBEXT) .bc .td .ps .dot $(SUFFIXES) + #-------------------------------------------------------------------- # Mark all of these targets as phony to avoid implicit rule search #-------------------------------------------------------------------- .PHONY: $(USER_TARGETS) $(INTERNAL_TARGETS) #-------------------------------------------------------------------- -# Make sure all the user-target rules are double colon rules and that -# the preconditions are run first. +# Make sure all the user-target rules are double colon rules and +# they are defined first. #-------------------------------------------------------------------- -$(USER_TARGETS) :: preconditions +$(USER_TARGETS):: + +################################################################################ +# PRECONDITIONS: that which must be built/checked first +################################################################################ + +SRCMKFILES := $(wildcard $(BUILD_SRC_DIR)/Makefile*) +OBJMKFILES := $(subst $(BUILD_SRC_DIR),$(BUILD_OBJ_DIR),$(SRCMKFILES)) +CONFIGURE := $(LLVM_SRC_ROOT)/configure +CONFIG_STATUS := $(LLVM_OBJ_ROOT)/config.status +MAKE_CONFIG_IN:= $(LLVM_SRC_ROOT)/Makefile.config.in +MAKE_CONFIG := $(LLVM_OBJ_ROOT)/Makefile.config +PRECONDITIONS := $(CONFIG_STATUS) $(MAKE_CONFIG) $(OBJMKFILES) + +preconditions : $(PRECONDITIONS) + +#------------------------------------------------------------------------ +# Make sure the BUILT_SOURCES are built first +#------------------------------------------------------------------------ +$(filter-out clean clean-local,USER_TARGETS):: $(BUILT_SOURCES) + +clean-local:: +ifneq ($(strip $(BUILT_SOURCES)),) + $(VERB) $(RM) -f $(BUILT_SOURCES) +endif + +#------------------------------------------------------------------------ +# Make sure we're not using a stale configuration +#------------------------------------------------------------------------ +.PRECIOUS: $(CONFIG_STATUS) +$(CONFIG_STATUS): $(CONFIGURE) + @$(ECHO) Reconfiguring with $< + $(VERB) $(CONFIG_STATUS) --recheck $(CONFIGUREFLAGS) + +#------------------------------------------------------------------------ +# Make sure the configuration makefile is up to date +#------------------------------------------------------------------------ +$(MAKE_CONFIG): $(MAKE_CONFIG_IN) $(CONFIG_STATUS) + @$(ECHO) Regenerating $@ + $(VERB) cd $(LLVM_OBJ_ROOT) ; $(CONFIG_STATUS) Makefile.config + +#------------------------------------------------------------------------ +# If the Makefile in the source tree has been updated, copy it over into the +# build tree. But, only do this if the source and object makefiles differ +#------------------------------------------------------------------------ +ifneq ($(BUILD_OBJ_DIR),$(BUILD_SRC_DIR)) + +$(BUILD_OBJ_DIR)/Makefile : $(BUILD_SRC_DIR)/Makefile + @$(ECHO) "Updating Makefile" + $(VERB) $(MKDIR) $(@D) + $(VERB) cp -f $< $@ + $(VERB) $(MAKE) $(MAKECMDGOALS) + +# Copy the Makefile.* files unless we're in the root directory which avoids +# the copying of Makefile.config.in or other things that should be explicitly +# taken care of. +ifneq ($(BUILD_OBJ_DIR),$(BUILD_OBJ_ROOT)) +$(BUILD_OBJ_DIR)/Makefile% : $(BUILD_SRC_DIR)/Makefile% + @$(ECHO) "Updating $(@F)" + $(VERB) $(MKDIR) $(@D) + $(VERB) cp -f $< $@ + $(VERB) $(MAKE) $(MAKECMDGOALS) +endif +endif + +#------------------------------------------------------------------------ +# Set up the basic dependencies +#------------------------------------------------------------------------ +$(USER_TARGETS):: $(PRECONDITIONS) -all :: all-local +all:: all-local check:: check-local clean:: clean-local -install :: install-local -uninstall :: uninstall-local -check-local :: all-local -install-local :: all-local - -############################################################################### -# SUFFIXES: Reset the list of suffixes we know how to build -############################################################################### -.SUFFIXES: -.SUFFIXES: .c .cpp .h .hpp .y .l .lo .o .a $(SHLIBEXT) .bc .td .ps .dot $(SUFFIXES) +install:: install-local +uninstall:: uninstall-local +check-local:: all-local +install-local:: all-local ############################################################################### # VARIABLES: Set up various variables based on configuration data @@ -313,7 +385,7 @@ done $(sysconfdir): - $(MKDIR) $(sysconfdir) + $(VERB) $(MKDIR) $(sysconfdir) endif @@ -804,57 +876,6 @@ endif # ifndef DISABLE_AUTO_DEPENDENCIES -################################################################################ -# PRECONDITIONS - that which must be built/checked first -################################################################################ - -OBJMKFILE := $(BUILD_OBJ_DIR)/Makefile -SRCMKFILE := $(BUILD_SRC_DIR)/Makefile -CONFIGURE := $(LLVM_SRC_ROOT)/configure -CONFIG_STATUS := $(LLVM_OBJ_ROOT)/config.status -MAKE_CONFIG_IN := $(LLVM_SRC_ROOT)/Makefile.config.in -MAKE_CONFIG := $(LLVM_OBJ_ROOT)/Makefile.config - -#------------------------------------------------------------------------ -# List of the preconditions -#------------------------------------------------------------------------ - -preconditions: $(CONFIG_STATUS) $(MAKE_CONFIG) $(OBJMKFILE) - -$(filter-out clean clean-local,USER_TARGETS):: $(BUILT_SOURCES) - -clean-local:: -ifneq ($(strip $(BUILT_SOURCES)),) - $(VERB) $(RM) -f $(BUILT_SOURCES) -endif - -#------------------------------------------------------------------------ -# Make sure we're not using a stale configuration -#------------------------------------------------------------------------ -.PRECIOUS: $(CONFIG_STATUS) -$(CONFIG_STATUS): $(CONFIGURE) - @$(ECHO) Reconfiguring with $< - $(VERB) $(CONFIG_STATUS) --recheck $(CONFIGUREFLAGS) - -#------------------------------------------------------------------------ -# Make sure the configuration makefile is up to date -#------------------------------------------------------------------------ -$(MAKE_CONFIG): $(MAKE_CONFIG_IN) $(CONFIG_STATUS) - @$(ECHO) Regenerating $@ - $(VERB) cd $(LLVM_OBJ_ROOT) ; $(CONFIG_STATUS) Makefile.config - -#------------------------------------------------------------------------ -# If the Makefile in the source tree has been updated, copy it over into the -# build tree. But, only do this if the source and object makefiles differ -#------------------------------------------------------------------------ -ifneq ($(OBJMKFILE),$(SRCMKFILE)) -.PRECIOUS: $(OBJMKFILE) -$(OBJMKFILE): $(SRCMKFILE) - @$(ECHO) "Updating Makefile from: $(dir $<)" - $(VERB) $(MKDIR) $(@D) - $(VERB) cp -f $< $@ -endif - ############################################################################### # Handle construction of a distribution tarball ############################################################################### @@ -940,7 +961,7 @@ DistCheckDir := $(LLVM_OBJ_ROOT)/_distcheckdir -dist-check:: $(DistTopDir) $(DistTarGZip) +dist-check:: $(DistCheckTop) $(DistTarGZip) @$(ECHO) Checking distribution tar file. $(VERB) if test -d $(DistCheckDir) ; then \ $(RM) -rf $(DistCheckDir) ; \ @@ -970,7 +991,7 @@ #------------------------------------------------------------------------ # Provide the recursive distdir target for building the distribution directory #------------------------------------------------------------------------ -distdir : $(DistCheckTop) $(DistSources) +distdir : $(DistSources) @$(ECHO) Building Distribution Directory $(DistDir) $(VERB) if test "$(DistDir)" = "$(TopDistDir)" ; then \ if test -d "$(DistDir)" ; then \ @@ -1084,13 +1105,20 @@ #------------------------------------------------------------------------ # Print out the directories used for building printvars:: + @$(ECHO) "CONFIGURATION : " $(CONFIGURATION) @$(ECHO) "BUILD_SRC_ROOT: " $(BUILD_SRC_ROOT) @$(ECHO) "BUILD_SRC_DIR : " $(BUILD_SRC_DIR) @$(ECHO) "BUILD_OBJ_ROOT: " $(BUILD_OBJ_ROOT) @$(ECHO) "BUILD_OBJ_DIR : " $(BUILD_OBJ_DIR) @$(ECHO) "LLVM_SRC_ROOT : " $(LLVM_SRC_ROOT) @$(ECHO) "LLVM_OBJ_ROOT : " $(LLVM_OBJ_ROOT) - @$(ECHO) "CONFIGURATION : " $(CONFIGURATION) + @$(ECHO) "libdir : " $(libdir) + @$(ECHO) "bindir : " $(bindir) + @$(ECHO) "sysconfdir : " $(sysconfdir) + @$(ECHO) "bytecode_libdir : " $(bytecode_libdir) + @$(ECHO) "USER_TARGETS : " $(USER_TARGETS) + @$(ECHO) "OBJMKFILES: $(OBJMKFILES)" + @$(ECHO) "SRCMKFILES: $(SRCMKFILES)" @$(ECHO) "OBJDIR: " $(OBJDIR) @$(ECHO) "LIBDIR: " $(LIBDIR) @$(ECHO) "TOOLDIR: " $(TOOLDIR) From reid at x10sys.com Tue Oct 26 18:10:10 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Oct 2004 18:10:10 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410262310.SAA06671@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.215 -> 1.216 --- Log message: Make sure that Makefile.rules and Makefile.config.in are not candidates for automatic makefile update. --- Diffs of the changes: (+10 -8) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.215 llvm/Makefile.rules:1.216 --- llvm/Makefile.rules:1.215 Tue Oct 26 17:26:33 2004 +++ llvm/Makefile.rules Tue Oct 26 18:10:00 2004 @@ -61,7 +61,8 @@ # PRECONDITIONS: that which must be built/checked first ################################################################################ -SRCMKFILES := $(wildcard $(BUILD_SRC_DIR)/Makefile*) +SRCMKFILES := $(filter-out Makefile.rules %.in,\ + $(wildcard $(BUILD_SRC_DIR)/Makefile.*)) OBJMKFILES := $(subst $(BUILD_SRC_DIR),$(BUILD_OBJ_DIR),$(SRCMKFILES)) CONFIGURE := $(LLVM_SRC_ROOT)/configure CONFIG_STATUS := $(LLVM_OBJ_ROOT)/config.status @@ -106,18 +107,19 @@ @$(ECHO) "Updating Makefile" $(VERB) $(MKDIR) $(@D) $(VERB) cp -f $< $@ - $(VERB) $(MAKE) $(MAKECMDGOALS) # Copy the Makefile.* files unless we're in the root directory which avoids # the copying of Makefile.config.in or other things that should be explicitly # taken care of. -ifneq ($(BUILD_OBJ_DIR),$(BUILD_OBJ_ROOT)) $(BUILD_OBJ_DIR)/Makefile% : $(BUILD_SRC_DIR)/Makefile% - @$(ECHO) "Updating $(@F)" - $(VERB) $(MKDIR) $(@D) - $(VERB) cp -f $< $@ - $(VERB) $(MAKE) $(MAKECMDGOALS) -endif + @case '$?' in \ + *Makefile.rules) ;; \ + *.in) ;; \ + *) $(ECHO) "Updating $(@F)" ; \ + $(MKDIR) $(@D) ; \ + cp -f $< $@ ;; \ + esac + endif #------------------------------------------------------------------------ From lattner at cs.uiuc.edu Tue Oct 26 22:56:02 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 22:56:02 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LowerGC.cpp Message-ID: <200410270356.WAA27951@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LowerGC.cpp updated: 1.6 -> 1.7 --- Log message: Initialize with the correct constant type --- Diffs of the changes: (+3 -2) Index: llvm/lib/Transforms/Scalar/LowerGC.cpp diff -u llvm/lib/Transforms/Scalar/LowerGC.cpp:1.6 llvm/lib/Transforms/Scalar/LowerGC.cpp:1.7 --- llvm/lib/Transforms/Scalar/LowerGC.cpp:1.6 Mon Oct 18 09:38:48 2004 +++ llvm/lib/Transforms/Scalar/LowerGC.cpp Tue Oct 26 22:55:24 2004 @@ -125,8 +125,9 @@ if (RootChain == 0) { // If the root chain does not exist, insert a new one with linkonce // linkage! - RootChain = new GlobalVariable(PRLTy, false, GlobalValue::LinkOnceLinkage, - Constant::getNullValue(RootListTy), + RootChain = new GlobalVariable(PRLTy, false, + GlobalValue::LinkOnceLinkage, + Constant::getNullValue(PRLTy), "llvm_gc_root_chain", &M); } else if (RootChain->hasExternalLinkage() && RootChain->isExternal()) { RootChain->setInitializer(Constant::getNullValue(PRLTy)); From alkis at cs.uiuc.edu Tue Oct 26 23:10:45 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Tue, 26 Oct 2004 23:10:45 -0500 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200410270410.XAA12006@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.128 -> 1.129 --- Log message: Improve/add comments. --- Diffs of the changes: (+74 -60) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.128 llvm-java/lib/Compiler/Compiler.cpp:1.129 --- llvm-java/lib/Compiler/Compiler.cpp:1.128 Tue Oct 26 13:40:46 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Tue Oct 26 23:10:34 2004 @@ -219,8 +219,8 @@ std::vector elements; - // because this is java/lang/Object, we add the opaque - // llvm_java_object_base type first + // Because this is java/lang/Object, we add the opaque + // llvm_java_object_base type first. ClassInfo::ObjectBaseTy = OpaqueType::get(); module_.addTypeName(LLVM_JAVA_OBJECT_BASE, ClassInfo::ObjectBaseTy); ci.f2iMap.insert(std::make_pair(LLVM_JAVA_OBJECT_BASE, elements.size())); @@ -262,8 +262,8 @@ std::vector elements; std::vector init; - // this is java/lang/Object so we must add a - // llvm_java_object_typeinfo struct first + // This is java/lang/Object so we must add a + // llvm_java_object_typeinfo struct first. // depth elements.push_back(Type::IntTy); @@ -278,32 +278,32 @@ elements.push_back(PointerType::get(PointerType::get(VTtype))); init.push_back(llvm::Constant::getNullValue(elements[3])); - // this is a static variable + // This is a static variable. VTableInfo::TypeInfoTy = StructType::get(elements); module_.addTypeName(LLVM_JAVA_OBJECT_TYPEINFO, VTableInfo::TypeInfoTy); llvm::Constant* typeInfoInit = ConstantStruct::get(VTableInfo::TypeInfoTy, init); - // now that we have both the type and initializer for the + // Now that we have both the type and initializer for the // llvm_java_object_typeinfo struct we can start adding the - // function pointers + // function pointers. elements.clear(); init.clear(); - /// first add the typeinfo struct itself + /// First add the typeinfo struct itself. elements.push_back(typeInfoInit->getType()); - // add the typeinfo block for this class + // Add the typeinfo block for this class. init.push_back(typeInfoInit); const Methods& methods = cf->getMethods(); const ClassInfo& ci = getClassInfo(cf); - // add member functions to the vtable + // Add member functions to the vtable. for (unsigned i = 0, e = methods.size(); i != e; ++i) { Method* method = methods[i]; - // the contructor is the only non-static method that is not - // dynamically dispatched so we skip it + // The contructor is the only non-static method that is not + // dynamically dispatched so we skip it. if (!method->isStatic() && method->getName()->str() != "") { std::string methodDescr = method->getName()->str() + @@ -354,7 +354,7 @@ assert(!ci.type && ci.f2iMap.empty() && "got already initialized ClassInfo!"); - // get the interface id + // Get the interface id. if (cf->isInterface()) ci.interfaceIdx = ClassInfo::InterfaceCount++; @@ -413,7 +413,7 @@ std::vector(2, ConstantUInt::get(Type::UIntTy, 0)))); } - /// Builds an interface Vtable for the specified + /// Builds an interface VTable for the specified /// pair. llvm::Constant* buildInterfaceVTable(ClassFile* cf, ClassFile* interface) { @@ -421,12 +421,15 @@ const VTableInfo& interfaceVI = getVTableInfo(interface); const Methods& methods = interface->getMethods(); - // the size of the initializer will be 1 greater than the number + // The size of the initializer will be 1 greater than the number // of methods for this interface (the first slot is the typeinfo - // struct + // struct. std::vector init(interfaceVI.m2iMap.size()+1, NULL); init[0] = llvm::Constant::getNullValue(VTableInfo::TypeInfoTy); + // For each method in this interface find the implementing + // method in the class' VTable and add it to the appropriate + // slot. for (VTableInfo::Method2IndexMap::const_iterator i = interfaceVI.m2iMap.begin(), e = interfaceVI.m2iMap.end(); i != e; ++i) { @@ -461,10 +464,10 @@ /// return a pointer to 0xFFFFFFFF. std::pair buildInterfacesVTables(ClassFile* cf, const VTableInfo& vi) { - // if this is an interface then we are not implementing any + // If this is an interface then we are not implementing any // interfaces so the lastInterface field is our index and the // pointer to the array of interface vtables is an all-ones - // value + // value. if (cf->isInterface()) return std::make_pair( getClassInfo(cf).interfaceIdx, @@ -472,6 +475,11 @@ ConstantIntegral::getAllOnesValue(Type::LongTy), PointerType::get(PointerType::get(VTableInfo::VTableTy)))); + // Otherwise we must fill in the interfaces vtables array. For + // each implemented vtable we insert a pointer to the + // vtable for this class. Note that we only + // fill in up to the highest index of the implemented + // interfaces. std::vector vtables; const Classes& interfaces = cf->getInterfaces(); llvm::Constant* nullVTable = @@ -518,19 +526,19 @@ llvm::Constant* superClassesVTables; tie(depth, superClassesVTables) = buildSuperClassesVTables(cf, vi); - // the depth (java/lang/Object has depth 0) + // The depth (java/lang/Object has depth 0). typeInfoInit.push_back(ConstantSInt::get(Type::IntTy, depth)); - // the super classes' vtables + // The super classes' vtables. typeInfoInit.push_back(superClassesVTables); int lastInterface; llvm::Constant* interfacesVTables; tie(lastInterface, interfacesVTables) = buildInterfacesVTables(cf, vi); - // the last interface index or the interface index if this is an - // interface + // The last interface index or the interface index if this is an + // interface. typeInfoInit.push_back(ConstantSInt::get(Type::IntTy, lastInterface)); - // the interfaces' vtables + // The interfaces' vtables. typeInfoInit.push_back(interfacesVTables); return ConstantStruct::get(VTableInfo::TypeInfoTy, typeInfoInit); @@ -554,43 +562,42 @@ const VTableInfo& superVI = getVTableInfo(ClassFile::get(super->getName()->str())); - // copy the super vtables array + // Copy the super vtables array. vi.superVtables.push_back(superVI.vtable); vi.superVtables.reserve(superVI.superVtables.size() + 1); std::copy(superVI.superVtables.begin(), superVI.superVtables.end(), std::back_inserter(vi.superVtables)); - // copy all the constants from the super class' vtable + // Copy all the constants from the super class' vtable. assert(superVI.vtable && "No vtable found for super class!"); ConstantStruct* superInit = cast(superVI.vtable->getInitializer()); std::vector init(superInit->getNumOperands()); - // use a null typeinfo struct for now + // Use a null typeinfo struct for now. init[0] = llvm::Constant::getNullValue(VTableInfo::TypeInfoTy); - // fill in the function pointers as they are in the super - // class. overriden methods will be replaced later + // Fill in the function pointers as they are in the super + // class. overriden methods will be replaced later. for (unsigned i = 0, e = superInit->getNumOperands(); i != e; ++i) init[i] = superInit->getOperand(i); vi.m2iMap = superVI.m2iMap; - // add member functions to the vtable + // Add member functions to the vtable. const Methods& methods = cf->getMethods(); for (unsigned i = 0, e = methods.size(); i != e; ++i) { Method* method = methods[i]; - // the contructor is the only non-static method that is not - // dynamically dispatched so we skip it + // The contructor is the only non-static method that is not + // dynamically dispatched so we skip it. if (!method->isStatic() && method->getName()->str() != "") { const std::string& methodDescr = method->getName()->str() + method->getDescriptor()->str(); std::string funcName = className + '/' + methodDescr; - // if this is not an interface we will need to build up the - const FunctionType* funcTy = cast( - getType(method->getDescriptor(), getClassInfo(cf).type)); - Function* vfun = module_.getOrInsertFunction(funcName, funcTy); - toCompileFunctions_.insert(vfun); + const FunctionType* funcTy = cast( + getType(method->getDescriptor(), getClassInfo(cf).type)); + Function* vfun = module_.getOrInsertFunction(funcName, funcTy); + toCompileFunctions_.insert(vfun); unsigned& index = vi.m2iMap[methodDescr]; if (!index) { @@ -619,7 +626,7 @@ // Now the vtable is complete, install the new typeinfo block // for this class: we install it last because we need the vtable - // to exist in order to build it + // to exist in order to build it. init[0] = buildClassTypeInfo(cf, vi); vi.vtable->setInitializer(ConstantStruct::get(init)); @@ -633,8 +640,8 @@ ConstantFieldRef* fieldRef = cf_->getConstantFieldRef(index); ConstantNameAndType* nameAndType = fieldRef->getNameAndType(); - // get ClassInfo for class owning the field - this will force - // the globals to be initialized + // Get ClassInfo for class owning the field - this will force + // the globals to be initialized. getClassInfo(ClassFile::get(fieldRef->getClass()->getName()->str())); std::string globalName = @@ -661,11 +668,11 @@ /// Emits the necessary code to get a field from the passed /// pointer to an object. Value* getField(ClassFile* cf, const std::string& fieldName, Value* ptr) { - // Cast ptr to correct type + // Cast ptr to correct type. ptr = new CastInst(ptr, PointerType::get(getClassInfo(cf).type), TMP, currentBB_); - // deref pointer + // Deref pointer. std::vector indices(1, ConstantUInt::get(Type::UIntTy, 0)); while (true) { const ClassInfo& info = getClassInfo(cf); @@ -710,7 +717,7 @@ bbInfoMap_.clear(); bbBuilder_.reset(new BasicBlockBuilder(function, codeAttr)); - // put arguments into locals + // Put arguments into locals. Locals locals(codeAttr->getMaxLocals()); unsigned index = 0; @@ -720,14 +727,14 @@ index += isTwoSlotType(a->getType()) ? 2 : 1; } // For the entry block the operand stack is empty and the locals - // contain the arguments to the function + // contain the arguments to the function. bbInfoMap_.insert(std::make_pair(&function->getEntryBlock(), std::make_pair(locals, OperandStack()))); - // Insert the entry block to the work list + // Insert the entry block to the work list. bbWorkList_.push_back(&function->getEntryBlock()); - // Process the work list until we compile the whole function + // Process the work list until we compile the whole function. while (!bbWorkList_.empty()) { currentBB_ = bbWorkList_.front(); bbWorkList_.pop_front(); @@ -743,12 +750,12 @@ unsigned start, end; tie(start, end) = bbBuilder_->getBytecodeIndices(currentBB_); - // Compile this basic block + // Compile this basic block. parse(codeAttr->getCode(), start, end); // If this basic block does not have a terminator, it should // have an unconditional branch to the next basic block - // (fallthrough) + // (fallthrough). if (!currentBB_->getTerminator()) new BranchInst(bbBuilder_->getBasicBlock(end), currentBB_); @@ -794,15 +801,15 @@ Type::VoidTy, 0); Function* init = module_.getOrInsertFunction(name, Type::VoidTy, 0); - // if this is the first time we scheduled this function + // If this is the first time we scheduled this function // for compilation insert a call to it right before the // terminator of the only basic block in - // llvm_java_static_init + // llvm_java_static_init/ if (toCompileFunctions_.insert(init)) { assert(hook->front().getTerminator() && LLVM_JAVA_STATIC_INIT " should have a terminator!"); new CallInst(init, "", hook->front().getTerminator()); - // we also create the global variables of this class + // We also create the global variables of this class. const Fields& fields = classfile->getFields(); for (unsigned i = 0, e = fields.size(); i != e; ++i) { Field* field = fields[i]; @@ -828,6 +835,8 @@ } } + /// Returns the llvm::Function corresponding to the specified + /// llvm::Java::Method. Function* getFunction(Method* method) { ClassFile* clazz = method->getParent(); @@ -845,6 +854,8 @@ return function; } + /// Returns the llvm::Java::Method given a + /// descriptor. Method* getMethod(const std::string& classMethodDesc) { unsigned slash = classMethodDesc.rfind('/', classMethodDesc.find('(')); std::string className = classMethodDesc.substr(0, slash); @@ -862,21 +873,24 @@ } public: + /// Compiles the specified method given a + /// descriptor and the transitive closure of all methods + /// (possibly) called by it. Function* compileMethod(const std::string& classMethodDesc) { - // initialize the static initializer function + // Initialize the static initializer function. Function* staticInit = module_.getOrInsertFunction(LLVM_JAVA_STATIC_INIT, Type::VoidTy, 0); BasicBlock* staticInitBB = new BasicBlock("entry", staticInit); new ReturnInst(NULL, staticInitBB); - // initialize type maps and vtable globals + // Initialize type maps and vtable globals. initializeClassInfoMap(); initializeVTableInfoMap(); - // create the method requested + // Create the method requested. Function* function = getFunction(getMethod(classMethodDesc)); toCompileFunctions_.insert(function); - // compile the transitive closure of methods called by this method + // Compile the transitive closure of methods called by this method. for (unsigned i = 0; i != toCompileFunctions_.size(); ++i) { Function* f = toCompileFunctions_[i]; compileMethodOnly(f->getName()); @@ -1130,7 +1144,7 @@ void do_lushr() { do_shift_unsigned_common(); } void do_shift_unsigned_common() { - // cast value to be shifted into its unsigned version + // Cast value to be shifted into its unsigned version. do_swap(); Value* v = currentOpStack_->pop(currentBB_); v = new CastInst(v, v->getType()->getUnsignedVersion(), TMP, currentBB_); @@ -1140,7 +1154,7 @@ do_shift_common(Instruction::Shr); v = currentOpStack_->pop(currentBB_); - // cast shifted value back to its original signed version + // Cast shifted value back to its original signed version. v = new CastInst(v, v->getType()->getSignedVersion(), TMP, currentBB_); currentOpStack_->push(v, currentBB_); } @@ -1442,7 +1456,7 @@ std::string funcName = className + '/' + methodDescr; const ClassInfo& ci = getClassInfo(ClassFile::get(className)); - // constructor calls are statically bound + // Constructor calls are statically bound. if (methodName == "") { FunctionType* funcTy = cast(getType(nameAndType->getDescriptor(), ci.type)); @@ -1450,7 +1464,7 @@ toCompileFunctions_.insert(function); makeCall(function, getParams(funcTy)); } - // otherwise we call the superclass' implementation of the method + // Otherwise we call the superclass' implementation of the method. else { assert(0 && "not implemented"); } @@ -1505,7 +1519,7 @@ Value* interfaceVTables = new GetElementPtrInst(vtable, indices, TMP, currentBB_); interfaceVTables = new LoadInst(interfaceVTables, TMP, currentBB_); - // get the actual interface vtable + // Get the actual interface vtable. indices.clear(); indices.push_back(ConstantUInt::get(Type::UIntTy, ci.interfaceIdx)); Value* interfaceVTable = @@ -1514,7 +1528,7 @@ new LoadInst(interfaceVTable, className + "", currentBB_); interfaceVTable = new CastInst(interfaceVTable, vi.vtable->getType(), TMP, currentBB_); - // get the function pointer + // Get the function pointer. indices.resize(1); assert(vi.m2iMap.find(methodDescr) != vi.m2iMap.end() && "could not find slot for virtual function!"); From lattner at cs.uiuc.edu Tue Oct 26 23:12:43 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue, 26 Oct 2004 23:12:43 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C/Makefile Message-ID: <200410270412.XAA28204@apoc.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C: Makefile updated: 1.1 -> 1.2 --- Log message: Hack bison out until it stops filling the zion disk --- Diffs of the changes: (+2 -1) Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/Makefile diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/Makefile:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/Makefile:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/Makefile:1.1 Tue Oct 5 16:39:12 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/Makefile Tue Oct 26 23:12:28 2004 @@ -1,5 +1,6 @@ LEVEL = ../../.. -PARALLEL_DIRS := TimberWolfMC agrep allroots archie-client assembler bison \ +PARALLEL_DIRS := TimberWolfMC agrep allroots archie-client assembler \ cdecl compiler dixie fixoutput football gnugo loader \ plot2fig simulator unix-smail unix-tbl +### bison include $(LEVEL)/Makefile.programs From reid at x10sys.com Tue Oct 26 23:34:57 2004 From: reid at x10sys.com (Reid Spencer) Date: Tue, 26 Oct 2004 23:34:57 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410270434.XAA18609@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.216 -> 1.217 --- Log message: Get the *.inc files to depend on tblgen so if tblgen gets fixed, all the *.inc files get regenerated. --- Diffs of the changes: (+4 -3) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.216 llvm/Makefile.rules:1.217 --- llvm/Makefile.rules:1.216 Tue Oct 26 18:10:00 2004 +++ llvm/Makefile.rules Tue Oct 26 23:34:35 2004 @@ -732,14 +732,15 @@ ifdef TARGET TDFILES := $(strip $(wildcard $(BUILD_SRC_DIR)/*.td) $(LLVM_SRC_ROOT)/lib/Target/Target.td) +INCFILES := $(filter %.inc,$(BUILT_SOURCES)) -$(BUILT_SOURCES): $(TDFILES) +$(INCFILES) : $(TBLGEN) $(TDFILES) -%GenRegisterNames.inc : %.td +%GenRegisterNames.inc : %.td @echo "Building $( Changes in directory llvm/include/llvm/Target: MRegisterInfo.h updated: 1.52 -> 1.53 --- Log message: Remove dead data member in MRegisterInfo class. Thanks sabre! --- Diffs of the changes: (+0 -1) Index: llvm/include/llvm/Target/MRegisterInfo.h diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.52 llvm/include/llvm/Target/MRegisterInfo.h:1.53 --- llvm/include/llvm/Target/MRegisterInfo.h:1.52 Tue Oct 26 01:00:31 2004 +++ llvm/include/llvm/Target/MRegisterInfo.h Tue Oct 26 23:51:58 2004 @@ -119,7 +119,6 @@ regclass_iterator RegClassBegin, RegClassEnd; // List of regclasses - const TargetRegisterClass **PhysRegClasses; // Reg class for each register int CallFrameSetupOpcode, CallFrameDestroyOpcode; protected: MRegisterInfo(const MRegisterDesc *D, unsigned NR, From natebegeman at mac.com Wed Oct 27 00:44:43 2004 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 27 Oct 2004 00:44:43 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h Message-ID: <200410270544.AAA27657@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: MRegisterInfo.h updated: 1.53 -> 1.54 --- Log message: Fix the build by eliminating some more dead code. That'll learn me not to listen to Reid --- Diffs of the changes: (+1 -1) Index: llvm/include/llvm/Target/MRegisterInfo.h diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.53 llvm/include/llvm/Target/MRegisterInfo.h:1.54 --- llvm/include/llvm/Target/MRegisterInfo.h:1.53 Tue Oct 26 23:51:58 2004 +++ llvm/include/llvm/Target/MRegisterInfo.h Wed Oct 27 00:44:23 2004 @@ -124,7 +124,7 @@ MRegisterInfo(const MRegisterDesc *D, unsigned NR, regclass_iterator RegClassBegin, regclass_iterator RegClassEnd, int CallFrameSetupOpcode = -1, int CallFrameDestroyOpcode = -1); - virtual ~MRegisterInfo(); + virtual ~MRegisterInfo() {} public: enum { // Define some target independent constants From natebegeman at mac.com Wed Oct 27 00:44:43 2004 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 27 Oct 2004 00:44:43 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/MRegisterInfo.cpp Message-ID: <200410270544.AAA27656@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: MRegisterInfo.cpp updated: 1.6 -> 1.7 --- Log message: Fix the build by eliminating some more dead code. That'll learn me not to listen to Reid --- Diffs of the changes: (+0 -20) Index: llvm/lib/Target/MRegisterInfo.cpp diff -u llvm/lib/Target/MRegisterInfo.cpp:1.6 llvm/lib/Target/MRegisterInfo.cpp:1.7 --- llvm/lib/Target/MRegisterInfo.cpp:1.6 Thu Aug 26 17:21:04 2004 +++ llvm/lib/Target/MRegisterInfo.cpp Wed Oct 27 00:44:23 2004 @@ -22,30 +22,10 @@ assert(NumRegs < FirstVirtualRegister && "Target has too many physical registers!"); - PhysRegClasses = new const TargetRegisterClass*[NumRegs]; - for (unsigned i = 0; i != NumRegs; ++i) - PhysRegClasses[i] = 0; - - // Fill in the PhysRegClasses map - for (MRegisterInfo::regclass_iterator I = regclass_begin(), - E = regclass_end(); I != E; ++I) { - const TargetRegisterClass *RC = *I; - for (unsigned i = 0, e = RC->getNumRegs(); i != e; ++i) { - unsigned Reg = RC->getRegister(i); - assert(PhysRegClasses[Reg] == 0 && "Register in more than one class?"); - PhysRegClasses[Reg] = RC; - } - } - CallFrameSetupOpcode = CFSO; CallFrameDestroyOpcode = CFDO; } - -MRegisterInfo::~MRegisterInfo() { - delete[] PhysRegClasses; -} - std::vector MRegisterInfo::getAllocatableSet(MachineFunction &MF) const { std::vector Allocatable(NumRegs); for (MRegisterInfo::regclass_iterator I = regclass_begin(), From lattner at cs.uiuc.edu Wed Oct 27 00:57:29 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 00:57:29 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200410270557.AAA01276@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.276 -> 1.277 --- Log message: Hrm, this code was severely botched. As it turns out, this patch: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041018/019708.html exposed ANOTHER latent bug in this xform, which caused Prolangs-C/bison to fill the zion nightly tester disk up and make the tester barf. This is obviously not a good thing, so lets fix this bug shall we? :) --- Diffs of the changes: (+4 -0) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.276 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.277 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.276 Thu Oct 21 23:53:16 2004 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Oct 27 00:57:15 2004 @@ -1294,6 +1294,10 @@ ShVal = InsertNewInstBefore(new ShiftInst(Instruction::Shr, ShVal, OpRHS, Op->getName()), TheAnd); + Value *AndRHS2 = ConstantExpr::getCast(AndRHS, ShVal->getType()); + ShVal = InsertNewInstBefore(BinaryOperator::createAnd(ShVal, AndRHS2, + TheAnd.getName()), + TheAnd); return new CastInst(ShVal, Op->getType()); } } From lattner at cs.uiuc.edu Wed Oct 27 00:58:23 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 00:58:23 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C/Makefile Message-ID: <200410270558.AAA28094@zion.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C: Makefile updated: 1.2 -> 1.3 --- Log message: This test now does not fill zion's disk up anymore, reenable --- Diffs of the changes: (+1 -2) Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/Makefile diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/Makefile:1.2 llvm-test/MultiSource/Benchmarks/Prolangs-C/Makefile:1.3 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/Makefile:1.2 Tue Oct 26 23:12:28 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/Makefile Wed Oct 27 00:58:12 2004 @@ -1,6 +1,5 @@ LEVEL = ../../.. -PARALLEL_DIRS := TimberWolfMC agrep allroots archie-client assembler \ +PARALLEL_DIRS := TimberWolfMC agrep allroots archie-client assembler bison \ cdecl compiler dixie fixoutput football gnugo loader \ plot2fig simulator unix-smail unix-tbl -### bison include $(LEVEL)/Makefile.programs From natebegeman at mac.com Wed Oct 27 01:01:04 2004 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 27 Oct 2004 01:01:04 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/MRegisterInfo.cpp Message-ID: <200410270601.BAA28297@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: MRegisterInfo.cpp updated: 1.7 -> 1.8 --- Log message: Move destructor out of line to avoid vtable emission in every file that includes the header. Thanks to sabre. --- Diffs of the changes: (+2 -0) Index: llvm/lib/Target/MRegisterInfo.cpp diff -u llvm/lib/Target/MRegisterInfo.cpp:1.7 llvm/lib/Target/MRegisterInfo.cpp:1.8 --- llvm/lib/Target/MRegisterInfo.cpp:1.7 Wed Oct 27 00:44:23 2004 +++ llvm/lib/Target/MRegisterInfo.cpp Wed Oct 27 01:00:53 2004 @@ -26,6 +26,8 @@ CallFrameDestroyOpcode = CFDO; } +MRegisterInfo::~MRegisterInfo() {} + std::vector MRegisterInfo::getAllocatableSet(MachineFunction &MF) const { std::vector Allocatable(NumRegs); for (MRegisterInfo::regclass_iterator I = regclass_begin(), From natebegeman at mac.com Wed Oct 27 01:01:04 2004 From: natebegeman at mac.com (Nate Begeman) Date: Wed, 27 Oct 2004 01:01:04 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h Message-ID: <200410270601.BAA28300@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: MRegisterInfo.h updated: 1.54 -> 1.55 --- Log message: Move destructor out of line to avoid vtable emission in every file that includes the header. Thanks to sabre. --- Diffs of the changes: (+1 -1) Index: llvm/include/llvm/Target/MRegisterInfo.h diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.54 llvm/include/llvm/Target/MRegisterInfo.h:1.55 --- llvm/include/llvm/Target/MRegisterInfo.h:1.54 Wed Oct 27 00:44:23 2004 +++ llvm/include/llvm/Target/MRegisterInfo.h Wed Oct 27 01:00:53 2004 @@ -124,7 +124,7 @@ MRegisterInfo(const MRegisterDesc *D, unsigned NR, regclass_iterator RegClassBegin, regclass_iterator RegClassEnd, int CallFrameSetupOpcode = -1, int CallFrameDestroyOpcode = -1); - virtual ~MRegisterInfo() {} + virtual ~MRegisterInfo(); public: enum { // Define some target independent constants From lattner at cs.uiuc.edu Wed Oct 27 10:49:21 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 10:49:21 -0500 Subject: [llvm-commits] CVS: poolalloc/test/TEST.p4perf.Makefile TEST.pavtl.Makefile TEST.perf.Makefile TEST.poolalloc.Makefile TEST.strace.Makefile Message-ID: <200410271549.KAA15023@apoc.cs.uiuc.edu> Changes in directory poolalloc/test: TEST.p4perf.Makefile updated: 1.4 -> 1.5 TEST.pavtl.Makefile updated: 1.8 -> 1.9 TEST.perf.Makefile updated: 1.8 -> 1.9 TEST.poolalloc.Makefile updated: 1.23 -> 1.24 TEST.strace.Makefile updated: 1.2 -> 1.3 --- Log message: get these working again --- Diffs of the changes: (+9 -9) Index: poolalloc/test/TEST.p4perf.Makefile diff -u poolalloc/test/TEST.p4perf.Makefile:1.4 poolalloc/test/TEST.p4perf.Makefile:1.5 --- poolalloc/test/TEST.p4perf.Makefile:1.4 Fri Mar 5 18:26:23 2004 +++ poolalloc/test/TEST.p4perf.Makefile Wed Oct 27 10:49:11 2004 @@ -1,4 +1,4 @@ -##===- test/Programs/TEST.vtl.Makefile ---------------------*- Makefile -*-===## +##===- poolalloc/TEST.vtl.Makefile -------------------------*- Makefile -*-===## # # Makefile for getting performance metrics using Intel's VTune. # @@ -6,7 +6,7 @@ TESTNAME = $* CURDIR := $(shell cd .; pwd) -PROGDIR := $(shell cd $(LEVEL)/test/Programs; pwd)/ +PROGDIR := $(shell cd $(LEVEL)/projects/llvm-test; pwd)/ RELDIR := $(subst $(PROGDIR),,$(CURDIR)) PERFEX := /home/vadve/criswell/local/Linux/bin/perfex Index: poolalloc/test/TEST.pavtl.Makefile diff -u poolalloc/test/TEST.pavtl.Makefile:1.8 poolalloc/test/TEST.pavtl.Makefile:1.9 --- poolalloc/test/TEST.pavtl.Makefile:1.8 Thu Mar 4 19:51:21 2004 +++ poolalloc/test/TEST.pavtl.Makefile Wed Oct 27 10:49:11 2004 @@ -1,4 +1,4 @@ -##===- test/Programs/TEST.vtl.Makefile ---------------------*- Makefile -*-===## +##===- poolalloc/TEST.vtl.Makefile -------------------------*- Makefile -*-===## # # Makefile for getting performance metrics using Intel's VTune. # @@ -6,7 +6,7 @@ TESTNAME = $* CURDIR := $(shell cd .; pwd) -PROGDIR := $(shell cd $(LEVEL)/test/Programs; pwd)/ +PROGDIR := $(shell cd $(LEVEL)/projects/llvm-test; pwd)/ RELDIR := $(subst $(PROGDIR),,$(CURDIR)) VTL := /opt/intel/vtune/bin/vtl Index: poolalloc/test/TEST.perf.Makefile diff -u poolalloc/test/TEST.perf.Makefile:1.8 poolalloc/test/TEST.perf.Makefile:1.9 --- poolalloc/test/TEST.perf.Makefile:1.8 Fri Mar 5 14:47:36 2004 +++ poolalloc/test/TEST.perf.Makefile Wed Oct 27 10:49:11 2004 @@ -1,4 +1,4 @@ -##===- test/Programs/TEST.vtl.Makefile ---------------------*- Makefile -*-===## +##===- poolalloc/TEST.vtl.Makefile -------------------------*- Makefile -*-===## # # Makefile for getting performance metrics using Intel's VTune. # @@ -6,7 +6,7 @@ TESTNAME = $* CURDIR := $(shell cd .; pwd) -PROGDIR := $(shell cd $(LEVEL)/test/Programs; pwd)/ +PROGDIR := $(shell cd $(LEVEL)/projects/llvm-test; pwd)/ RELDIR := $(subst $(PROGDIR),,$(CURDIR)) PERFEX := /home/vadve/criswell/local/Linux/bin/perfex Index: poolalloc/test/TEST.poolalloc.Makefile diff -u poolalloc/test/TEST.poolalloc.Makefile:1.23 poolalloc/test/TEST.poolalloc.Makefile:1.24 --- poolalloc/test/TEST.poolalloc.Makefile:1.23 Mon Mar 8 09:10:04 2004 +++ poolalloc/test/TEST.poolalloc.Makefile Wed Oct 27 10:49:11 2004 @@ -17,7 +17,7 @@ CURDIR := $(shell cd .; pwd) -PROGDIR := $(shell cd $(LEVEL)/test/Programs; pwd)/ +PROGDIR := $(shell cd $(LEVEL)/projects/llvm-test; pwd)/ RELDIR := $(subst $(PROGDIR),,$(CURDIR)) # Pool allocator pass shared object Index: poolalloc/test/TEST.strace.Makefile diff -u poolalloc/test/TEST.strace.Makefile:1.2 poolalloc/test/TEST.strace.Makefile:1.3 --- poolalloc/test/TEST.strace.Makefile:1.2 Thu Mar 4 19:44:24 2004 +++ poolalloc/test/TEST.strace.Makefile Wed Oct 27 10:49:11 2004 @@ -1,4 +1,4 @@ -##===- test/Programs/TEST.vtl.Makefile ---------------------*- Makefile -*-===## +##===- poolalloc/TEST.vtl.Makefile -------------------------*- Makefile -*-===## # # Makefile for getting performance metrics using Intel's VTune. # @@ -6,7 +6,7 @@ TESTNAME = $* CURDIR := $(shell cd .; pwd) -PROGDIR := $(shell cd $(LEVEL)/test/Programs; pwd)/ +PROGDIR := $(shell cd $(LEVEL)/projects/llvm-test; pwd)/ RELDIR := $(subst $(PROGDIR),,$(CURDIR)) STRACE := strace -c -f From lattner at cs.uiuc.edu Wed Oct 27 10:54:37 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 10:54:37 -0500 Subject: [llvm-commits] CVS: llvm/CREDITS.TXT Message-ID: <200410271554.KAA19005@apoc.cs.uiuc.edu> Changes in directory llvm: CREDITS.TXT updated: 1.32 -> 1.33 --- Log message: Give sumant credit too! --- Diffs of the changes: (+4 -0) Index: llvm/CREDITS.TXT diff -u llvm/CREDITS.TXT:1.32 llvm/CREDITS.TXT:1.33 --- llvm/CREDITS.TXT:1.32 Tue Oct 26 10:55:12 2004 +++ llvm/CREDITS.TXT Wed Oct 27 10:54:23 2004 @@ -67,6 +67,10 @@ E: kungfoomaster at nondot.org D: Support for packed types +N: Sumant Kowshik +E: kowshik at uiuc.edu +D: Author of the original C backend + N: Chris Lattner E: sabre at nondot.org W: http://nondot.org/~sabre/ From lattner at cs.uiuc.edu Wed Oct 27 11:06:41 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:06:41 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeGenTarget.h InstrInfoEmitter.h InstrSelectorEmitter.h Record.h Message-ID: <200410271606.LAA25176@apoc.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeGenTarget.h updated: 1.14 -> 1.15 InstrInfoEmitter.h updated: 1.6 -> 1.7 InstrSelectorEmitter.h updated: 1.24 -> 1.25 Record.h updated: 1.42 -> 1.43 --- Log message: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+16 -10) Index: llvm/utils/TableGen/CodeGenTarget.h diff -u llvm/utils/TableGen/CodeGenTarget.h:1.14 llvm/utils/TableGen/CodeGenTarget.h:1.15 --- llvm/utils/TableGen/CodeGenTarget.h:1.14 Thu Oct 14 00:50:43 2004 +++ llvm/utils/TableGen/CodeGenTarget.h Wed Oct 27 11:06:27 2004 @@ -26,7 +26,7 @@ class Record; class RecordKeeper; -class CodeGenRegister; +struct CodeGenRegister; /// getValueType - Return the MVT::ValueType that the specified TableGen record /// corresponds to. Index: llvm/utils/TableGen/InstrInfoEmitter.h diff -u llvm/utils/TableGen/InstrInfoEmitter.h:1.6 llvm/utils/TableGen/InstrInfoEmitter.h:1.7 --- llvm/utils/TableGen/InstrInfoEmitter.h:1.6 Sun Aug 1 00:04:00 2004 +++ llvm/utils/TableGen/InstrInfoEmitter.h Wed Oct 27 11:06:28 2004 @@ -22,7 +22,7 @@ class StringInit; class IntInit; class ListInit; -class CodeGenInstruction; +struct CodeGenInstruction; class InstrInfoEmitter : public TableGenBackend { RecordKeeper &Records; Index: llvm/utils/TableGen/InstrSelectorEmitter.h diff -u llvm/utils/TableGen/InstrSelectorEmitter.h:1.24 llvm/utils/TableGen/InstrSelectorEmitter.h:1.25 --- llvm/utils/TableGen/InstrSelectorEmitter.h:1.24 Sat Jul 31 23:04:35 2004 +++ llvm/utils/TableGen/InstrSelectorEmitter.h Wed Oct 27 11:06:28 2004 @@ -24,7 +24,7 @@ namespace llvm { class DagInit; -class Init; +struct Init; class InstrSelectorEmitter; /// NodeType - Represents Information parsed from the DagNode entries. Index: llvm/utils/TableGen/Record.h diff -u llvm/utils/TableGen/Record.h:1.42 llvm/utils/TableGen/Record.h:1.43 --- llvm/utils/TableGen/Record.h:1.42 Fri Oct 22 23:58:50 2004 +++ llvm/utils/TableGen/Record.h Wed Oct 27 11:06:28 2004 @@ -34,7 +34,7 @@ class RecordRecTy; // Init subclasses... -class Init; +struct Init; class UnsetInit; class BitInit; class BitsInit; @@ -107,7 +107,8 @@ /// BitRecTy - 'bit' - Represent a single bit /// -struct BitRecTy : public RecTy { +class BitRecTy : public RecTy { +public: Init *convertValue(UnsetInit *UI) { return (Init*)UI; } Init *convertValue(BitInit *BI) { return (Init*)BI; } Init *convertValue(BitsInit *BI); @@ -157,7 +158,8 @@ /// IntRecTy - 'int' - Represent an integer value of no particular size /// -struct IntRecTy : public RecTy { +class IntRecTy : public RecTy { +public: Init *convertValue(UnsetInit *UI) { return (Init*)UI; } Init *convertValue(IntInit *II) { return (Init*)II; } Init *convertValue(BitInit *BI); @@ -177,7 +179,8 @@ /// StringRecTy - 'string' - Represent an string value /// -struct StringRecTy : public RecTy { +class StringRecTy : public RecTy { +public: Init *convertValue(UnsetInit *UI) { return (Init*)UI; } Init *convertValue(StringInit *SI) { return (Init*)SI; } Init *convertValue(TypedInit *TI); @@ -219,7 +222,8 @@ /// CodeRecTy - 'code' - Represent an code fragment, function or method. /// -struct CodeRecTy : public RecTy { +class CodeRecTy : public RecTy { +public: Init *convertValue(UnsetInit *UI) { return (Init*)UI; } Init *convertValue( CodeInit *CI) { return (Init*)CI; } Init *convertValue(TypedInit *TI); @@ -234,7 +238,8 @@ /// DagRecTy - 'dag' - Represent a dag fragment /// -struct DagRecTy : public RecTy { +class DagRecTy : public RecTy { +public: Init *convertValue(UnsetInit *UI) { return (Init*)UI; } Init *convertValue( DagInit *CI) { return (Init*)CI; } Init *convertValue(TypedInit *TI); @@ -343,7 +348,8 @@ /// UnsetInit - ? - Represents an uninitialized value /// -struct UnsetInit : public Init { +class UnsetInit : public Init { +public: virtual Init *convertInitializerTo(RecTy *Ty) { return Ty->convertValue(this); } From lattner at cs.uiuc.edu Wed Oct 27 11:10:10 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:10:10 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/ConstantFolding.h PassManagerT.h Message-ID: <200410271610.LAA26130@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ConstantFolding.h updated: 1.43 -> 1.44 PassManagerT.h updated: 1.53 -> 1.54 --- Log message: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+7 -4) Index: llvm/lib/VMCore/ConstantFolding.h diff -u llvm/lib/VMCore/ConstantFolding.h:1.43 llvm/lib/VMCore/ConstantFolding.h:1.44 --- llvm/lib/VMCore/ConstantFolding.h:1.43 Mon Oct 11 17:52:25 2004 +++ llvm/lib/VMCore/ConstantFolding.h Wed Oct 27 11:09:56 2004 @@ -24,7 +24,7 @@ namespace llvm { class Value; class Constant; - struct Type; + class Type; // Constant fold various types of instruction... Constant *ConstantFoldCastInstruction(const Constant *V, const Type *DestTy); Index: llvm/lib/VMCore/PassManagerT.h diff -u llvm/lib/VMCore/PassManagerT.h:1.53 llvm/lib/VMCore/PassManagerT.h:1.54 --- llvm/lib/VMCore/PassManagerT.h:1.53 Sun Sep 19 23:47:24 2004 +++ llvm/lib/VMCore/PassManagerT.h Wed Oct 27 11:09:56 2004 @@ -630,7 +630,8 @@ // This pass manager is used to group together all of the BasicBlockPass's // into a single unit. // -template<> struct PassManagerTraits : public BasicBlockPass { +template<> class PassManagerTraits : public BasicBlockPass { +public: // PassClass - The type of passes tracked by this PassManager typedef BasicBlockPass PassClass; @@ -683,7 +684,8 @@ // This pass manager is used to group together all of the FunctionPass's // into a single unit. // -template<> struct PassManagerTraits : public FunctionPass { +template<> class PassManagerTraits : public FunctionPass { +public: // PassClass - The type of passes tracked by this PassManager typedef FunctionPass PassClass; @@ -726,7 +728,8 @@ // // This is the top level PassManager implementation that holds generic passes. // -template<> struct PassManagerTraits : public ModulePass { +template<> class PassManagerTraits : public ModulePass { +public: // PassClass - The type of passes tracked by this PassManager typedef ModulePass PassClass; From lattner at cs.uiuc.edu Wed Oct 27 11:10:26 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:10:26 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/InstCount.cpp Message-ID: <200410271610.LAA26194@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: InstCount.cpp updated: 1.8 -> 1.9 --- Log message: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+1 -1) Index: llvm/lib/Analysis/InstCount.cpp diff -u llvm/lib/Analysis/InstCount.cpp:1.8 llvm/lib/Analysis/InstCount.cpp:1.9 --- llvm/lib/Analysis/InstCount.cpp:1.8 Wed Sep 1 17:55:35 2004 +++ llvm/lib/Analysis/InstCount.cpp Wed Oct 27 11:10:15 2004 @@ -29,7 +29,7 @@ #include "llvm/Instruction.def" class InstCount : public FunctionPass, public InstVisitor { - friend class InstVisitor; + friend struct InstVisitor; void visitFunction (Function &F) { ++TotalFuncs; } void visitBasicBlock(BasicBlock &BB) { ++TotalBlocks; } From lattner at cs.uiuc.edu Wed Oct 27 11:12:38 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:12:38 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/TransformInternals.h Message-ID: <200410271612.LAA26966@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms: TransformInternals.h updated: 1.23 -> 1.24 --- Log message: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+2 -1) Index: llvm/lib/Transforms/TransformInternals.h diff -u llvm/lib/Transforms/TransformInternals.h:1.23 llvm/lib/Transforms/TransformInternals.h:1.24 --- llvm/lib/Transforms/TransformInternals.h:1.23 Tue Nov 11 16:41:33 2003 +++ llvm/lib/Transforms/TransformInternals.h Wed Oct 27 11:12:24 2004 @@ -90,7 +90,8 @@ typedef std::map ValueTypeCache; -struct ValueMapCache { +class ValueMapCache { +public: // Operands mapped - Contains an entry if the first value (the user) has had // the second value (the operand) mapped already. // From lattner at cs.uiuc.edu Wed Oct 27 11:12:40 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:12:40 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp SCCP.cpp Message-ID: <200410271612.LAA26975@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: IndVarSimplify.cpp updated: 1.73 -> 1.74 SCCP.cpp updated: 1.104 -> 1.105 --- Log message: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+2 -2) Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.73 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.74 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.73 Mon Oct 11 20:02:29 2004 +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Oct 27 11:12:28 2004 @@ -66,7 +66,7 @@ Instruction *InsertPt; - friend class SCEVVisitor; + friend struct SCEVVisitor; public: SCEVExpander(ScalarEvolution &se, LoopInfo &li) : SE(se), LI(li) {} Index: llvm/lib/Transforms/Scalar/SCCP.cpp diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.104 llvm/lib/Transforms/Scalar/SCCP.cpp:1.105 --- llvm/lib/Transforms/Scalar/SCCP.cpp:1.104 Sat Oct 16 13:09:41 2004 +++ llvm/lib/Transforms/Scalar/SCCP.cpp Wed Oct 27 11:12:28 2004 @@ -135,7 +135,7 @@ // The implementation of this class // private: - friend class InstVisitor; // Allow callbacks from visitor + friend struct InstVisitor; // Allow callbacks from visitor // markConstant - Make a value be marked as "constant". If the value // is not already a constant, add it to the instruction work list so that From lattner at cs.uiuc.edu Wed Oct 27 11:14:59 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:14:59 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/AbstractTypeUser.h BasicBlock.h Instructions.h Pass.h Use.h Value.h Message-ID: <200410271614.LAA28050@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm: AbstractTypeUser.h updated: 1.22 -> 1.23 BasicBlock.h updated: 1.43 -> 1.44 Instructions.h updated: 1.5 -> 1.6 Pass.h updated: 1.46 -> 1.47 Use.h updated: 1.6 -> 1.7 Value.h updated: 1.65 -> 1.66 --- Log message: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+18 -13) Index: llvm/include/llvm/AbstractTypeUser.h diff -u llvm/include/llvm/AbstractTypeUser.h:1.22 llvm/include/llvm/AbstractTypeUser.h:1.23 --- llvm/include/llvm/AbstractTypeUser.h:1.22 Tue Aug 3 23:45:42 2004 +++ llvm/include/llvm/AbstractTypeUser.h Wed Oct 27 11:14:47 2004 @@ -39,7 +39,7 @@ namespace llvm { -struct Type; +class Type; class DerivedType; class AbstractTypeUser { Index: llvm/include/llvm/BasicBlock.h diff -u llvm/include/llvm/BasicBlock.h:1.43 llvm/include/llvm/BasicBlock.h:1.44 --- llvm/include/llvm/BasicBlock.h:1.43 Mon Oct 11 17:21:13 2004 +++ llvm/include/llvm/BasicBlock.h Wed Oct 27 11:14:47 2004 @@ -45,7 +45,8 @@ static iplist &getList(BasicBlock *BB); }; -struct BasicBlock : public Value { // Basic blocks are data objects also +class BasicBlock : public Value { // Basic blocks are data objects also +public: typedef iplist InstListType; private : InstListType InstList; Index: llvm/include/llvm/Instructions.h diff -u llvm/include/llvm/Instructions.h:1.5 llvm/include/llvm/Instructions.h:1.6 --- llvm/include/llvm/Instructions.h:1.5 Sat Oct 16 13:05:54 2004 +++ llvm/include/llvm/Instructions.h Wed Oct 27 11:14:47 2004 @@ -21,7 +21,7 @@ namespace llvm { -struct BasicBlock; +class BasicBlock; class PointerType; //===----------------------------------------------------------------------===// @@ -1159,7 +1159,8 @@ /// UnwindInst - Immediately exit the current function, unwinding the stack /// until an invoke instruction is found. /// -struct UnwindInst : public TerminatorInst { +class UnwindInst : public TerminatorInst { +public: UnwindInst(Instruction *InsertBefore = 0) : TerminatorInst(Instruction::Unwind, InsertBefore) { } @@ -1196,7 +1197,8 @@ /// presence of this instruction indicates some higher level knowledge that the /// end of the block cannot be reached. /// -struct UnreachableInst : public TerminatorInst { +class UnreachableInst : public TerminatorInst { +public: UnreachableInst(Instruction *InsertBefore = 0) : TerminatorInst(Instruction::Unreachable, InsertBefore) { } Index: llvm/include/llvm/Pass.h diff -u llvm/include/llvm/Pass.h:1.46 llvm/include/llvm/Pass.h:1.47 --- llvm/include/llvm/Pass.h:1.46 Sun Sep 19 23:42:18 2004 +++ llvm/include/llvm/Pass.h Wed Oct 27 11:14:47 2004 @@ -38,7 +38,7 @@ namespace llvm { class Value; -struct BasicBlock; +class BasicBlock; class Function; class Module; class AnalysisUsage; @@ -56,7 +56,7 @@ /// constrained passes described below. /// class Pass { - friend class AnalysisResolver; + friend struct AnalysisResolver; AnalysisResolver *Resolver; // AnalysisResolver this pass is owned by... const PassInfo *PassInfoCache; @@ -211,8 +211,8 @@ /// interprocedural optimizations and analyses. ModulePass's may do anything /// they want to the program. /// -struct ModulePass : public Pass { - +class ModulePass : public Pass { +public: /// runOnModule - Virtual method overriden by subclasses to process the module /// being operated on. virtual bool runOnModule(Module &M) = 0; @@ -228,7 +228,8 @@ /// not need to be run. This is useful for things like target information and /// "basic" versions of AnalysisGroups. /// -struct ImmutablePass : public ModulePass { +class ImmutablePass : public ModulePass { +public: /// initializePass - This method may be overriden by immutable passes to allow /// them to perform various initialization actions they require. This is /// primarily because an ImmutablePass can "require" another ImmutablePass, @@ -255,7 +256,8 @@ /// 2. Optimizing a function does not cause the addition or removal of any /// functions in the module /// -struct FunctionPass : public ModulePass { +class FunctionPass : public ModulePass { +public: /// doInitialization - Virtual method overridden by subclasses to do /// any necessary per-module initialization. /// Index: llvm/include/llvm/Use.h diff -u llvm/include/llvm/Use.h:1.6 llvm/include/llvm/Use.h:1.7 --- llvm/include/llvm/Use.h:1.6 Wed Sep 1 17:55:34 2004 +++ llvm/include/llvm/Use.h Wed Oct 27 11:14:47 2004 @@ -35,7 +35,7 @@ Value *Val; User *U; Use *Prev, *Next; - friend class ilist_traits; + friend struct ilist_traits; public: inline Use(Value *v, User *user); inline Use(const Use &u); Index: llvm/include/llvm/Value.h diff -u llvm/include/llvm/Value.h:1.65 llvm/include/llvm/Value.h:1.66 --- llvm/include/llvm/Value.h:1.65 Sat Oct 16 13:06:07 2004 +++ llvm/include/llvm/Value.h Wed Oct 27 11:14:47 2004 @@ -27,7 +27,7 @@ class Constant; class Argument; class Instruction; -struct BasicBlock; +class BasicBlock; class GlobalValue; class Function; class GlobalVariable; From lattner at cs.uiuc.edu Wed Oct 27 11:15:03 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:15:03 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure/DSNode.h Message-ID: <200410271615.LAA28126@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis/DataStructure: DSNode.h updated: 1.44 -> 1.45 --- Log message: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+1 -1) Index: llvm/include/llvm/Analysis/DataStructure/DSNode.h diff -u llvm/include/llvm/Analysis/DataStructure/DSNode.h:1.44 llvm/include/llvm/Analysis/DataStructure/DSNode.h:1.45 --- llvm/include/llvm/Analysis/DataStructure/DSNode.h:1.44 Wed Jul 7 01:29:26 2004 +++ llvm/include/llvm/Analysis/DataStructure/DSNode.h Wed Oct 27 11:14:50 2004 @@ -47,7 +47,7 @@ /// doubly-linked ilist in the DSGraph. /// DSNode *Next, *Prev; - friend class ilist_traits; + friend struct ilist_traits; /// Size - The current size of the node. This should be equal to the size of /// the current type record. From lattner at cs.uiuc.edu Wed Oct 27 11:15:03 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:15:03 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/AliasSetTracker.h Dominators.h LoopInfo.h Message-ID: <200410271615.LAA28129@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: AliasSetTracker.h updated: 1.21 -> 1.22 Dominators.h updated: 1.46 -> 1.47 LoopInfo.h updated: 1.41 -> 1.42 --- Log message: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+6 -6) Index: llvm/include/llvm/Analysis/AliasSetTracker.h diff -u llvm/include/llvm/Analysis/AliasSetTracker.h:1.21 llvm/include/llvm/Analysis/AliasSetTracker.h:1.22 --- llvm/include/llvm/Analysis/AliasSetTracker.h:1.21 Wed Sep 15 12:00:41 2004 +++ llvm/include/llvm/Analysis/AliasSetTracker.h Wed Oct 27 11:14:50 2004 @@ -34,7 +34,7 @@ class AliasSet { friend class AliasSetTracker; - struct PointerRec; + class PointerRec; typedef std::pair HashNodePair; class PointerRec { @@ -116,7 +116,7 @@ // Volatile - True if this alias set contains volatile loads or stores. bool Volatile : 1; - friend class ilist_traits; + friend struct ilist_traits; AliasSet *getPrev() const { return Prev; } AliasSet *getNext() const { return Next; } void setPrev(AliasSet *P) { Prev = P; } Index: llvm/include/llvm/Analysis/Dominators.h diff -u llvm/include/llvm/Analysis/Dominators.h:1.46 llvm/include/llvm/Analysis/Dominators.h:1.47 --- llvm/include/llvm/Analysis/Dominators.h:1.46 Thu Oct 14 10:46:59 2004 +++ llvm/include/llvm/Analysis/Dominators.h Wed Oct 27 11:14:50 2004 @@ -287,9 +287,9 @@ Node *RootNode; public: class Node { - friend class DominatorTree; - friend class PostDominatorTree; - friend class DominatorTreeBase; + friend struct DominatorTree; + friend struct PostDominatorTree; + friend struct DominatorTreeBase; BasicBlock *TheBB; Node *IDom; std::vector Children; Index: llvm/include/llvm/Analysis/LoopInfo.h diff -u llvm/include/llvm/Analysis/LoopInfo.h:1.41 llvm/include/llvm/Analysis/LoopInfo.h:1.42 --- llvm/include/llvm/Analysis/LoopInfo.h:1.41 Wed Sep 1 17:55:34 2004 +++ llvm/include/llvm/Analysis/LoopInfo.h Wed Oct 27 11:14:50 2004 @@ -35,7 +35,7 @@ namespace llvm { -class DominatorSet; +struct DominatorSet; class LoopInfo; class PHINode; class Instruction; From lattner at cs.uiuc.edu Wed Oct 27 11:15:04 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:15:04 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineBasicBlock.h MachineCodeEmitter.h MachineFunction.h MachineInstr.h Message-ID: <200410271615.LAA28145@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineBasicBlock.h updated: 1.40 -> 1.41 MachineCodeEmitter.h updated: 1.18 -> 1.19 MachineFunction.h updated: 1.44 -> 1.45 MachineInstr.h updated: 1.156 -> 1.157 --- Log message: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+9 -7) Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.40 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.41 --- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.40 Tue Oct 26 10:41:13 2004 +++ llvm/include/llvm/CodeGen/MachineBasicBlock.h Wed Oct 27 11:14:51 2004 @@ -24,7 +24,8 @@ // ilist_traits template <> -class ilist_traits { +struct ilist_traits { +protected: // this is only set by the MachineBasicBlock owning the ilist friend class MachineBasicBlock; MachineBasicBlock* parent; @@ -179,7 +180,7 @@ int getNumber() const { return Number; } private: // Methods used to maintain doubly linked list of blocks... - friend class ilist_traits; + friend struct ilist_traits; MachineBasicBlock *getPrev() const { return Prev; } MachineBasicBlock *getNext() const { return Next; } Index: llvm/include/llvm/CodeGen/MachineCodeEmitter.h diff -u llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.18 llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.19 --- llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.18 Wed Sep 1 17:55:34 2004 +++ llvm/include/llvm/CodeGen/MachineCodeEmitter.h Wed Oct 27 11:14:51 2004 @@ -29,7 +29,8 @@ class GlobalValue; class Function; -struct MachineCodeEmitter { +class MachineCodeEmitter { +public: virtual ~MachineCodeEmitter() {} /// startFunction - This callback is invoked when the specified function is Index: llvm/include/llvm/CodeGen/MachineFunction.h diff -u llvm/include/llvm/CodeGen/MachineFunction.h:1.44 llvm/include/llvm/CodeGen/MachineFunction.h:1.45 --- llvm/include/llvm/CodeGen/MachineFunction.h:1.44 Thu Sep 30 16:42:02 2004 +++ llvm/include/llvm/CodeGen/MachineFunction.h Wed Oct 27 11:14:51 2004 @@ -31,7 +31,7 @@ // ilist_traits template <> -class ilist_traits { +struct ilist_traits { // this is only set by the MachineFunction owning the ilist friend class MachineFunction; MachineFunction* Parent; Index: llvm/include/llvm/CodeGen/MachineInstr.h diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.156 llvm/include/llvm/CodeGen/MachineInstr.h:1.157 --- llvm/include/llvm/CodeGen/MachineInstr.h:1.156 Mon Oct 18 12:19:20 2004 +++ llvm/include/llvm/CodeGen/MachineInstr.h Wed Oct 27 11:14:51 2004 @@ -29,8 +29,8 @@ class TargetMachine; class GlobalValue; -template class ilist_traits; -template class ilist; +template struct ilist_traits; +template struct ilist; typedef short MachineOpCode; @@ -417,7 +417,7 @@ // Intrusive list support // - friend class ilist_traits; + friend struct ilist_traits; public: MachineInstr(short Opcode, unsigned numOperands); From lattner at cs.uiuc.edu Wed Oct 27 11:15:04 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:15:04 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/System/MappedFile.h Message-ID: <200410271615.LAA28135@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/System: MappedFile.h updated: 1.2 -> 1.3 --- Log message: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+1 -1) Index: llvm/include/llvm/System/MappedFile.h diff -u llvm/include/llvm/System/MappedFile.h:1.2 llvm/include/llvm/System/MappedFile.h:1.3 --- llvm/include/llvm/System/MappedFile.h:1.2 Mon Oct 4 12:26:26 2004 +++ llvm/include/llvm/System/MappedFile.h Wed Oct 27 11:14:51 2004 @@ -21,7 +21,7 @@ /// Forward declare a class used for holding platform specific information /// that needs to be - class MappedFileInfo; + struct MappedFileInfo; /// This class provides an abstraction for a memory mapped file in the /// operating system's filesystem. It provides platform independent operations From lattner at cs.uiuc.edu Wed Oct 27 11:15:04 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:15:04 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/Annotation.h CommandLine.h DOTGraphTraits.h Message-ID: <200410271615.LAA28146@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: Annotation.h updated: 1.16 -> 1.17 CommandLine.h updated: 1.36 -> 1.37 DOTGraphTraits.h updated: 1.10 -> 1.11 --- Log message: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+21 -17) Index: llvm/include/llvm/Support/Annotation.h diff -u llvm/include/llvm/Support/Annotation.h:1.16 llvm/include/llvm/Support/Annotation.h:1.17 --- llvm/include/llvm/Support/Annotation.h:1.16 Wed Sep 1 17:55:34 2004 +++ llvm/include/llvm/Support/Annotation.h Wed Oct 27 11:14:51 2004 @@ -30,7 +30,7 @@ class AnnotationID; class Annotation; class Annotable; -class AnnotationManager; +struct AnnotationManager; //===----------------------------------------------------------------------===// // @@ -39,7 +39,7 @@ // freely around and passed byvalue with little or no overhead. // class AnnotationID { - friend class AnnotationManager; + friend struct AnnotationManager; unsigned ID; AnnotationID(); // Default ctor is disabled Index: llvm/include/llvm/Support/CommandLine.h diff -u llvm/include/llvm/Support/CommandLine.h:1.36 llvm/include/llvm/Support/CommandLine.h:1.37 --- llvm/include/llvm/Support/CommandLine.h:1.36 Wed Sep 1 17:55:35 2004 +++ llvm/include/llvm/Support/CommandLine.h Wed Oct 27 11:14:51 2004 @@ -513,8 +513,8 @@ // parser // template<> -struct parser : public basic_parser { - +class parser : public basic_parser { +public: // parse - Return true on error. bool parse(Option &O, const char *ArgName, const std::string &Arg, bool &Val); @@ -531,8 +531,8 @@ // parser // template<> -struct parser : public basic_parser { - +class parser : public basic_parser { +public: // parse - Return true on error. bool parse(Option &O, const char *ArgName, const std::string &Arg, int &Val); @@ -545,8 +545,8 @@ // parser // template<> -struct parser : public basic_parser { - +class parser : public basic_parser { +public: // parse - Return true on error. bool parse(Option &O, const char *AN, const std::string &Arg, unsigned &Val); @@ -559,7 +559,8 @@ // parser // template<> -struct parser : public basic_parser { +class parser : public basic_parser { +public: // parse - Return true on error. bool parse(Option &O, const char *AN, const std::string &Arg, double &Val); @@ -572,7 +573,8 @@ // parser // template<> -struct parser : public basic_parser { +class parser : public basic_parser { +public: // parse - Return true on error. bool parse(Option &O, const char *AN, const std::string &Arg, float &Val); @@ -585,7 +587,8 @@ // parser // template<> -struct parser : public basic_parser { +class parser : public basic_parser { +public: // parse - Return true on error. bool parse(Option &O, const char *AN, const std::string &Arg, std::string &Value) { @@ -687,8 +690,8 @@ // object in all cases that it is used. // template -struct opt_storage : public DataType { - +class opt_storage : public DataType { +public: template void setValue(const T &V) { DataType::operator=(V); } @@ -701,7 +704,8 @@ // to get at the value. // template -struct opt_storage { +class opt_storage { +public: DataType Value; // Make sure we initialize the value with the default constructor for the @@ -864,8 +868,8 @@ // object in all cases that it is used. // template -struct list_storage : public std::vector { - +class list_storage : public std::vector { +public: template void addValue(const T &V) { push_back(V); } }; Index: llvm/include/llvm/Support/DOTGraphTraits.h diff -u llvm/include/llvm/Support/DOTGraphTraits.h:1.10 llvm/include/llvm/Support/DOTGraphTraits.h:1.11 --- llvm/include/llvm/Support/DOTGraphTraits.h:1.10 Wed Sep 1 17:55:35 2004 +++ llvm/include/llvm/Support/DOTGraphTraits.h Wed Oct 27 11:14:51 2004 @@ -95,7 +95,7 @@ /// from DefaultDOTGraphTraits if you don't need to override everything. /// template -class DOTGraphTraits : public DefaultDOTGraphTraits {}; +struct DOTGraphTraits : public DefaultDOTGraphTraits {}; } // End llvm namespace From lattner at cs.uiuc.edu Wed Oct 27 11:15:04 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:15:04 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetData.h TargetFrameInfo.h TargetInstrInfo.h TargetSchedInfo.h Message-ID: <200410271615.LAA28159@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetData.h updated: 1.27 -> 1.28 TargetFrameInfo.h updated: 1.16 -> 1.17 TargetInstrInfo.h updated: 1.72 -> 1.73 TargetSchedInfo.h updated: 1.31 -> 1.32 --- Log message: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+8 -4) Index: llvm/include/llvm/Target/TargetData.h diff -u llvm/include/llvm/Target/TargetData.h:1.27 llvm/include/llvm/Target/TargetData.h:1.28 --- llvm/include/llvm/Target/TargetData.h:1.27 Wed Sep 1 17:55:35 2004 +++ llvm/include/llvm/Target/TargetData.h Wed Oct 27 11:14:51 2004 @@ -114,7 +114,8 @@ // This object is used to lazily calculate structure layout information for a // target machine, based on the TargetData structure. // -struct StructLayout { +class StructLayout { +public: std::vector MemberOffsets; uint64_t StructSize; unsigned StructAlignment; Index: llvm/include/llvm/Target/TargetFrameInfo.h diff -u llvm/include/llvm/Target/TargetFrameInfo.h:1.16 llvm/include/llvm/Target/TargetFrameInfo.h:1.17 --- llvm/include/llvm/Target/TargetFrameInfo.h:1.16 Sun Aug 15 04:18:55 2004 +++ llvm/include/llvm/Target/TargetFrameInfo.h Wed Oct 27 11:14:51 2004 @@ -27,7 +27,8 @@ /// The offset to the local area is the offset from the stack pointer on /// function entry to the first location where function data (local variables, /// spill locations) can be stored. -struct TargetFrameInfo { +class TargetFrameInfo { +public: enum StackDirection { StackGrowsUp, // Adding to the stack increases the stack address StackGrowsDown // Adding to the stack decreases the stack address Index: llvm/include/llvm/Target/TargetInstrInfo.h diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.72 llvm/include/llvm/Target/TargetInstrInfo.h:1.73 --- llvm/include/llvm/Target/TargetInstrInfo.h:1.72 Tue Sep 28 13:37:00 2004 +++ llvm/include/llvm/Target/TargetInstrInfo.h Wed Oct 27 11:14:51 2004 @@ -61,7 +61,8 @@ // before control flow occurs. const unsigned M_TERMINATOR_FLAG = 1 << 16; -struct TargetInstrDescriptor { +class TargetInstrDescriptor { +public: const char * Name; // Assembly language mnemonic for the opcode. int numOperands; // Number of args; -1 if variable #args int resultPos; // Position of the result; -1 if no result Index: llvm/include/llvm/Target/TargetSchedInfo.h diff -u llvm/include/llvm/Target/TargetSchedInfo.h:1.31 llvm/include/llvm/Target/TargetSchedInfo.h:1.32 --- llvm/include/llvm/Target/TargetSchedInfo.h:1.31 Mon Oct 25 14:07:43 2004 +++ llvm/include/llvm/Target/TargetSchedInfo.h Wed Oct 27 11:14:51 2004 @@ -152,7 +152,8 @@ /// TargetSchedInfo - Common interface to machine information for /// instruction scheduling /// -struct TargetSchedInfo { +class TargetSchedInfo { +public: const TargetMachine& target; unsigned maxNumIssueTotal; From lattner at cs.uiuc.edu Wed Oct 27 11:15:04 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:15:04 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Transforms/Utils/FunctionUtils.h PromoteMemToReg.h Message-ID: <200410271615.LAA28160@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Transforms/Utils: FunctionUtils.h updated: 1.6 -> 1.7 PromoteMemToReg.h updated: 1.6 -> 1.7 --- Log message: Convert 'struct' to 'class' in various places to adhere to the coding standards and work better with VC++. Patch contributed by Morten Ofstad! --- Diffs of the changes: (+3 -3) Index: llvm/include/llvm/Transforms/Utils/FunctionUtils.h diff -u llvm/include/llvm/Transforms/Utils/FunctionUtils.h:1.6 llvm/include/llvm/Transforms/Utils/FunctionUtils.h:1.7 --- llvm/include/llvm/Transforms/Utils/FunctionUtils.h:1.6 Fri Apr 23 18:54:34 2004 +++ llvm/include/llvm/Transforms/Utils/FunctionUtils.h Wed Oct 27 11:14:51 2004 @@ -18,7 +18,7 @@ namespace llvm { class BasicBlock; - class DominatorSet; + struct DominatorSet; class Function; class Loop; Index: llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h diff -u llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h:1.6 llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h:1.7 --- llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h:1.6 Tue Sep 14 20:02:30 2004 +++ llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h Wed Oct 27 11:14:51 2004 @@ -20,8 +20,8 @@ namespace llvm { class AllocaInst; -class DominatorTree; -class DominanceFrontier; +struct DominatorTree; +struct DominanceFrontier; class TargetData; class AliasSetTracker; From lattner at cs.uiuc.edu Wed Oct 27 11:28:30 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed, 27 Oct 2004 11:28:30 -0500 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200410271628.LAA32492@apoc.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.246 -> 1.247 --- Log message: Add a couple of new features --- Diffs of the changes: (+4 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.246 llvm/docs/ReleaseNotes.html:1.247 --- llvm/docs/ReleaseNotes.html:1.246 Mon Oct 25 17:13:02 2004 +++ llvm/docs/ReleaseNotes.html Wed Oct 27 11:28:17 2004 @@ -94,6 +94,9 @@ href="LangRef.html#i_unreachable">unreachable instruction, which give the optimizer more information about the behavior of the program. +
  • The LLVM makefiles have been improved to build LLVM much faster and + includes new targets (like make dist-check).
  • +
  • The LLVM source code is now compatible with Microsoft Visual C++.
  • @@ -626,7 +629,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/10/25 22:13:02 $ + Last modified: $Date: 2004/10/27 16:28:17 $ From reid at x10sys.com Wed Oct 27 17:49:09 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 17:49:09 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410272249.RAA01538@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.217 -> 1.218 --- Log message: Fix auto-reconfigure bug: make sure we actually reconfigure not just regenerate the config.status script. --- Diffs of the changes: (+1 -0) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.217 llvm/Makefile.rules:1.218 --- llvm/Makefile.rules:1.217 Tue Oct 26 23:34:35 2004 +++ llvm/Makefile.rules Wed Oct 27 17:48:58 2004 @@ -89,6 +89,7 @@ $(CONFIG_STATUS): $(CONFIGURE) @$(ECHO) Reconfiguring with $< $(VERB) $(CONFIG_STATUS) --recheck $(CONFIGUREFLAGS) + $(VERB) $(CONFIG_STATUS) #------------------------------------------------------------------------ # Make sure the configuration makefile is up to date From reid at x10sys.com Wed Oct 27 18:03:55 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:03:55 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/m4/rand48.m4 func_isinf.m4 func_isnan.m4 single_cxx_check.m4 Message-ID: <200410272303.SAA02029@zion.cs.uiuc.edu> Changes in directory llvm/autoconf/m4: rand48.m4 added (r1.1) func_isinf.m4 updated: 1.1 -> 1.2 func_isnan.m4 updated: 1.1 -> 1.2 single_cxx_check.m4 updated: 1.3 -> 1.4 --- Log message: Changes to support rand48 tests --- Diffs of the changes: (+61 -32) Index: llvm/autoconf/m4/rand48.m4 diff -c /dev/null llvm/autoconf/m4/rand48.m4:1.1 *** /dev/null Wed Oct 27 18:03:54 2004 --- llvm/autoconf/m4/rand48.m4 Wed Oct 27 18:03:44 2004 *************** *** 0 **** --- 1,12 ---- + # + # This function determins if the the srand48,drand48,lrand48 functions are + # available on this platform. + # + AC_DEFUN([AC_FUNC_RAND48],[ + AC_SINGLE_CXX_CHECK([ac_cv_func_rand48], + [srand48/lrand48/drand48], [], + [srand48(0);lrand48();drand48();]) + if test "$ac_cv_func_rand48" = "yes" ; then + AC_DEFINE([HAVE_RAND48],1,[Define to 1 if srand48/lrand48/drand48 exist in ]) + fi + ]) Index: llvm/autoconf/m4/func_isinf.m4 diff -u llvm/autoconf/m4/func_isinf.m4:1.1 llvm/autoconf/m4/func_isinf.m4:1.2 --- llvm/autoconf/m4/func_isinf.m4:1.1 Tue Sep 7 09:23:53 2004 +++ llvm/autoconf/m4/func_isinf.m4 Wed Oct 27 18:03:44 2004 @@ -3,22 +3,34 @@ # platform. # AC_DEFUN([AC_FUNC_ISINF],[ -AC_SINGLE_CXX_CHECK([HAVE_ISINF_IN_MATH_H], [ac_cv_func_isinf_in_math_h], +AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_math_h], [isinf], [], - [#include - int foo(float f) {return isinf(f);}]) -AC_SINGLE_CXX_CHECK([HAVE_ISINF_IN_CMATH], [ac_cv_func_isinf_in_cmath], + [float f; isinf(f);]) +if test "$ac_cv_func_isinf_in_math_h" = "yes" ; then + AC_DEFINE([HAVE_ISINF_IN_MATH_H],1,[Set to 1 if the isinf function is found in ]) +fi + +AC_SINGLE_CXX_CHECK([ac_cv_func_isinf_in_cmath], [isinf], [], - [#include - int foo(float f) {return isinf(f);}]) -AC_SINGLE_CXX_CHECK([HAVE_STD_ISINF_IN_CMATH], [ac_cv_func_std_isinf_in_cmath], + [float f; isinf(f);]) +if test "$ac_cv_func_isinf_in_cmath" = "yes" ; then + AC_DEFINE([HAVE_ISINF_IN_CMATH],1,[Set to 1 if the isinf function is found in ]) +fi + +AC_SINGLE_CXX_CHECK([ac_cv_func_std_isinf_in_cmath], [std::isinf], [], - [#include - using std::isinf; int foo(float f) {return isinf(f);}]) -AC_SINGLE_CXX_CHECK([HAVE_FINITE_IN_IEEEFP_H], [ac_cv_func_finite_in_ieeefp_h], + [float f; std::isinf(f)}]) +if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then + AC_DEFINE([HAVE_STD_ISINF_IN_CMATH],1,[Set to 1 if the std::isinf function is found in ]) +fi + +AC_SINGLE_CXX_CHECK([ac_cv_func_finite_in_ieeefp_h], [finite], [], - [#include - int foo(float f) {return finite(f);}]) + [float f; finite(f);]) +if test "$ac_cv_func_finite_in_ieefp_h" = "yes" ; then + AC_DEFINE([HAVE_FINITE_IN_IEEFP_H],1,[Set to 1 if the finite function is found in ]) +fi + ]) Index: llvm/autoconf/m4/func_isnan.m4 diff -u llvm/autoconf/m4/func_isnan.m4:1.1 llvm/autoconf/m4/func_isnan.m4:1.2 --- llvm/autoconf/m4/func_isnan.m4:1.1 Tue Sep 7 09:23:53 2004 +++ llvm/autoconf/m4/func_isnan.m4 Wed Oct 27 18:03:44 2004 @@ -3,16 +3,25 @@ # platform. # AC_DEFUN([AC_FUNC_ISNAN],[ -AC_SINGLE_CXX_CHECK([HAVE_ISNAN_IN_MATH_H], [ac_cv_func_isnan_in_math_h], +AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_math_h], [isnan], [], - [#include - int foo(float f) {return isnan(f);}]) -AC_SINGLE_CXX_CHECK([HAVE_ISNAN_IN_CMATH], [ac_cv_func_isnan_in_cmath], + [float f; isnan(f);]) + +if test "$ac_cv_func_isnan_in_math_h" = "yes" ; then + AC_DEFINE([HAVE_ISNAN_IN_MATH_H],1,[Set to 1 if the isnan function is found in ]) +fi + +AC_SINGLE_CXX_CHECK([ac_cv_func_isnan_in_cmath], [isnan], [], - [#include - int foo(float f) {return isnan(f);}]) -AC_SINGLE_CXX_CHECK([HAVE_STD_ISNAN_IN_CMATH], [ac_cv_func_std_isnan_in_cmath], + [float f; isnan(f);]) +if test "$ac_cv_func_isnan_in_cmath" = "yes" ; then + AC_DEFINE([HAVE_ISNAN_IN_CMATH],1,[Set to 1 if the isnan function is found in ]) +fi + +AC_SINGLE_CXX_CHECK([ac_cv_func_std_isnan_in_cmath], [std::isnan], [], - [#include - using std::isnan; int foo(float f) {return isnan(f);}]) + [float f; std::isnan(f);]) +if test "$ac_cv_func_std_isnan_in_cmath" = "yes" ; then + AC_DEFINE([HAVE_STD_ISNAN_IN_CMATH],1,[Set to 1 if the std::isnan function is found in ]) +fi ]) Index: llvm/autoconf/m4/single_cxx_check.m4 diff -u llvm/autoconf/m4/single_cxx_check.m4:1.3 llvm/autoconf/m4/single_cxx_check.m4:1.4 --- llvm/autoconf/m4/single_cxx_check.m4:1.3 Sun Sep 19 17:31:49 2004 +++ llvm/autoconf/m4/single_cxx_check.m4 Wed Oct 27 18:03:44 2004 @@ -1,14 +1,10 @@ -dnl AC_SINGLE_CXX_CHECK(DEFINEVAR, CACHEVAR, FUNCTION, HEADER, PROGRAM) -dnl $1, $2, $3, $4, $5 +dnl AC_SINGLE_CXX_CHECK(CACHEVAR, FUNCTION, HEADER, PROGRAM) +dnl $1, $2, $3, $4, dnl AC_DEFUN([AC_SINGLE_CXX_CHECK], -[AC_CACHE_CHECK([for $3 in $4], [$2], - [AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE(AC_LANG_SOURCE([$5]),[$2=yes],[$2=no]) - AC_LANG_POP([C++])]) - if test "$$2" = "yes" - then - AC_DEFINE($1, 1, [Define to 1 if your compiler defines $3 in the $4 - header file.]) - fi]) + [AC_CACHE_CHECK([for $2 in $3], [$1], + [AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include $3],[$4]),[$1=yes],[$1=no]) + AC_LANG_POP([C++])]) + ]) From reid at x10sys.com Wed Oct 27 18:03:55 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:03:55 -0500 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200410272303.SAA02032@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.131 -> 1.132 --- Log message: Changes to support rand48 tests --- Diffs of the changes: (+176 -52) Index: llvm/configure diff -u llvm/configure:1.131 llvm/configure:1.132 --- llvm/configure:1.131 Mon Oct 25 03:18:47 2004 +++ llvm/configure Wed Oct 27 18:03:44 2004 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for LLVM 1.4. +# Generated by GNU Autoconf 2.59 for llvm 1.4. # # Report bugs to . # @@ -421,10 +421,10 @@ : ${ac_max_here_lines=38} # Identity of this package. -PACKAGE_NAME='LLVM' +PACKAGE_NAME='llvm' PACKAGE_TARNAME='-llvm-' PACKAGE_VERSION='1.4' -PACKAGE_STRING='LLVM 1.4' +PACKAGE_STRING='llvm 1.4' PACKAGE_BUGREPORT='llvmbugs at cs.uiuc.edu' ac_unique_file=""Makefile.config.in"" @@ -962,7 +962,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures LLVM 1.4 to adapt to many kinds of systems. +\`configure' configures llvm 1.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1024,7 +1024,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of LLVM 1.4:";; + short | recursive ) echo "Configuration of llvm 1.4:";; esac cat <<\_ACEOF @@ -1164,7 +1164,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -LLVM configure 1.4 +llvm configure 1.4 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1178,7 +1178,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by LLVM $as_me 1.4, which was +It was created by llvm $as_me 1.4, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -22562,14 +22562,20 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - int foo(float f) {return isnan(f);} +int +main () +{ +float f; isnan(f); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -22601,7 +22607,7 @@ ac_cv_func_isnan_in_math_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -22610,14 +22616,16 @@ fi echo "$as_me:$LINENO: result: $ac_cv_func_isnan_in_math_h" >&5 echo "${ECHO_T}$ac_cv_func_isnan_in_math_h" >&6 - if test "$ac_cv_func_isnan_in_math_h" = "yes" - then + + +if test "$ac_cv_func_isnan_in_math_h" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define HAVE_ISNAN_IN_MATH_H 1 _ACEOF - fi +fi + echo "$as_me:$LINENO: checking for isnan in " >&5 echo $ECHO_N "checking for isnan in ... $ECHO_C" >&6 if test "${ac_cv_func_isnan_in_cmath+set}" = set; then @@ -22629,14 +22637,20 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - int foo(float f) {return isnan(f);} +int +main () +{ +float f; isnan(f); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -22668,7 +22682,7 @@ ac_cv_func_isnan_in_cmath=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -22677,14 +22691,15 @@ fi echo "$as_me:$LINENO: result: $ac_cv_func_isnan_in_cmath" >&5 echo "${ECHO_T}$ac_cv_func_isnan_in_cmath" >&6 - if test "$ac_cv_func_isnan_in_cmath" = "yes" - then + +if test "$ac_cv_func_isnan_in_cmath" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define HAVE_ISNAN_IN_CMATH 1 _ACEOF - fi +fi + echo "$as_me:$LINENO: checking for std::isnan in " >&5 echo $ECHO_N "checking for std::isnan in ... $ECHO_C" >&6 if test "${ac_cv_func_std_isnan_in_cmath+set}" = set; then @@ -22696,14 +22711,20 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - using std::isnan; int foo(float f) {return isnan(f);} +int +main () +{ +float f; std::isnan(f); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -22735,7 +22756,7 @@ ac_cv_func_std_isnan_in_cmath=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -22744,14 +22765,14 @@ fi echo "$as_me:$LINENO: result: $ac_cv_func_std_isnan_in_cmath" >&5 echo "${ECHO_T}$ac_cv_func_std_isnan_in_cmath" >&6 - if test "$ac_cv_func_std_isnan_in_cmath" = "yes" - then + +if test "$ac_cv_func_std_isnan_in_cmath" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define HAVE_STD_ISNAN_IN_CMATH 1 _ACEOF - fi +fi echo "$as_me:$LINENO: checking for isinf in " >&5 @@ -22765,14 +22786,20 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - int foo(float f) {return isinf(f);} +int +main () +{ +float f; isinf(f); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -22804,7 +22831,7 @@ ac_cv_func_isinf_in_math_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -22813,14 +22840,15 @@ fi echo "$as_me:$LINENO: result: $ac_cv_func_isinf_in_math_h" >&5 echo "${ECHO_T}$ac_cv_func_isinf_in_math_h" >&6 - if test "$ac_cv_func_isinf_in_math_h" = "yes" - then + +if test "$ac_cv_func_isinf_in_math_h" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define HAVE_ISINF_IN_MATH_H 1 _ACEOF - fi +fi + echo "$as_me:$LINENO: checking for isinf in " >&5 echo $ECHO_N "checking for isinf in ... $ECHO_C" >&6 if test "${ac_cv_func_isinf_in_cmath+set}" = set; then @@ -22832,14 +22860,20 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - int foo(float f) {return isinf(f);} +int +main () +{ +float f; isinf(f); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -22871,7 +22905,7 @@ ac_cv_func_isinf_in_cmath=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -22880,14 +22914,15 @@ fi echo "$as_me:$LINENO: result: $ac_cv_func_isinf_in_cmath" >&5 echo "${ECHO_T}$ac_cv_func_isinf_in_cmath" >&6 - if test "$ac_cv_func_isinf_in_cmath" = "yes" - then + +if test "$ac_cv_func_isinf_in_cmath" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define HAVE_ISINF_IN_CMATH 1 _ACEOF - fi +fi + echo "$as_me:$LINENO: checking for std::isinf in " >&5 echo $ECHO_N "checking for std::isinf in ... $ECHO_C" >&6 if test "${ac_cv_func_std_isinf_in_cmath+set}" = set; then @@ -22899,14 +22934,20 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - using std::isinf; int foo(float f) {return isinf(f);} +int +main () +{ +float f; std::isinf(f)} + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -22938,7 +22979,7 @@ ac_cv_func_std_isinf_in_cmath=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -22947,14 +22988,15 @@ fi echo "$as_me:$LINENO: result: $ac_cv_func_std_isinf_in_cmath" >&5 echo "${ECHO_T}$ac_cv_func_std_isinf_in_cmath" >&6 - if test "$ac_cv_func_std_isinf_in_cmath" = "yes" - then + +if test "$ac_cv_func_std_isinf_in_cmath" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define HAVE_STD_ISINF_IN_CMATH 1 _ACEOF - fi +fi + echo "$as_me:$LINENO: checking for finite in " >&5 echo $ECHO_N "checking for finite in ... $ECHO_C" >&6 if test "${ac_cv_func_finite_in_ieeefp_h+set}" = set; then @@ -22966,14 +23008,20 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include - int foo(float f) {return finite(f);} +int +main () +{ +float f; finite(f); + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 @@ -23005,7 +23053,7 @@ ac_cv_func_finite_in_ieeefp_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=c + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' @@ -23014,14 +23062,90 @@ fi echo "$as_me:$LINENO: result: $ac_cv_func_finite_in_ieeefp_h" >&5 echo "${ECHO_T}$ac_cv_func_finite_in_ieeefp_h" >&6 - if test "$ac_cv_func_finite_in_ieeefp_h" = "yes" - then + +if test "$ac_cv_func_finite_in_ieefp_h" = "yes" ; then cat >>confdefs.h <<\_ACEOF -#define HAVE_FINITE_IN_IEEEFP_H 1 +#define HAVE_FINITE_IN_IEEFP_H 1 _ACEOF - fi +fi + + + +echo "$as_me:$LINENO: checking for srand48/lrand48/drand48 in " >&5 +echo $ECHO_N "checking for srand48/lrand48/drand48 in ... $ECHO_C" >&6 +if test "${ac_cv_func_rand48+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +srand48(0);lrand48();drand48(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_rand48=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_rand48=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_func_rand48" >&5 +echo "${ECHO_T}$ac_cv_func_rand48" >&6 + +if test "$ac_cv_func_rand48" = "yes" ; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_RAND48 1 +_ACEOF + +fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works @@ -24875,7 +24999,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by LLVM $as_me 1.4, which was +This file was extended by llvm $as_me 1.4, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24941,7 +25065,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -LLVM config.status 1.4 +llvm config.status 1.4 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" From reid at x10sys.com Wed Oct 27 18:03:55 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:03:55 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Message-ID: <200410272303.SAA02035@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: ExternalFunctions.cpp updated: 1.78 -> 1.79 --- Log message: Changes to support rand48 tests --- Diffs of the changes: (+15 -0) Index: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.78 llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.79 --- llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.78 Wed Sep 1 17:55:35 2004 +++ llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Wed Oct 27 18:03:44 2004 @@ -213,6 +213,8 @@ return GV; } +#ifdef HAVE_RAND48 + // double drand48() GenericValue lle_X_drand48(FunctionType *M, const vector &Args) { assert(Args.size() == 0); @@ -236,6 +238,16 @@ return GenericValue(); } +#endif + +// int rand() +GenericValue lle_X_rand(FunctionType *M, const vector &Args) { + assert(Args.size() == 0); + GenericValue GV; + GV.IntVal = rand(); + return GV; +} + // void srand(uint) GenericValue lle_X_srand(FunctionType *M, const vector &Args) { assert(Args.size() == 1); @@ -676,9 +688,12 @@ FuncNames["lle_X_log"] = lle_X_log; FuncNames["lle_X_floor"] = lle_X_floor; FuncNames["lle_X_srand"] = lle_X_srand; + FuncNames["lle_X_rand"] = lle_X_rand; +#ifdef HAVE_RAND48 FuncNames["lle_X_drand48"] = lle_X_drand48; FuncNames["lle_X_srand48"] = lle_X_srand48; FuncNames["lle_X_lrand48"] = lle_X_lrand48; +#endif FuncNames["lle_X_sqrt"] = lle_X_sqrt; FuncNames["lle_X_puts"] = lle_X_puts; FuncNames["lle_X_printf"] = lle_X_printf; From reid at x10sys.com Wed Oct 27 18:03:55 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:03:55 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/AutoRegen.sh configure.ac Message-ID: <200410272303.SAA02040@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: AutoRegen.sh updated: 1.10 -> 1.11 configure.ac updated: 1.125 -> 1.126 --- Log message: Changes to support rand48 tests --- Diffs of the changes: (+3 -2) Index: llvm/autoconf/AutoRegen.sh diff -u llvm/autoconf/AutoRegen.sh:1.10 llvm/autoconf/AutoRegen.sh:1.11 --- llvm/autoconf/AutoRegen.sh:1.10 Thu Oct 21 22:39:08 2004 +++ llvm/autoconf/AutoRegen.sh Wed Oct 27 18:03:44 2004 @@ -48,5 +48,5 @@ autoconf --force --warnings=all -o ../$outfile $configfile || die "autoconf failed" cd .. echo "Regenerating config.h.in with autoheader 2.59" -autoheader -I autoconf -I autoconf/m4 autoconf/$configfile || die "autoheader failed" +autoheader --warnings=all -I autoconf -I autoconf/m4 autoconf/$configfile || die "autoheader failed" exit 0 Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.125 llvm/autoconf/configure.ac:1.126 --- llvm/autoconf/configure.ac:1.125 Mon Oct 25 03:18:47 2004 +++ llvm/autoconf/configure.ac Wed Oct 27 18:03:44 2004 @@ -1,5 +1,5 @@ dnl Initialize autoconf -AC_INIT([[LLVM]],[[1.4]],[llvmbugs at cs.uiuc.edu]) +AC_INIT([[llvm]],[[1.4]],[llvmbugs at cs.uiuc.edu]) dnl Place all of the extra autoconf files into the config subdirectory dnl Tell various tools where the m4 autoconf macros are @@ -318,6 +318,7 @@ AC_FUNC_ISNAN AC_FUNC_ISINF +AC_FUNC_RAND48 dnl Checks for library functions. AC_FUNC_ALLOCA From reid at x10sys.com Wed Oct 27 18:09:43 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:09:43 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Config/config.h.in Message-ID: <200410272309.SAA02304@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Config: config.h.in updated: 1.32 -> 1.33 --- Log message: Add the HAVE_RAND48 define. --- Diffs of the changes: (+11 -11) Index: llvm/include/llvm/Config/config.h.in diff -u llvm/include/llvm/Config/config.h.in:1.32 llvm/include/llvm/Config/config.h.in:1.33 --- llvm/include/llvm/Config/config.h.in:1.32 Sun Oct 17 12:07:29 2004 +++ llvm/include/llvm/Config/config.h.in Wed Oct 27 18:09:31 2004 @@ -39,9 +39,8 @@ /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H -/* Define to 1 if your compiler defines finite in the header file. - */ -#undef HAVE_FINITE_IN_IEEEFP_H +/* Set to 1 if the finite function is found in */ +#undef HAVE_FINITE_IN_IEEFP_H /* Does not have forward iterator */ #undef HAVE_FWD_ITERATOR @@ -79,16 +78,16 @@ /* Define to 1 if you have the `isatty' function. */ #undef HAVE_ISATTY -/* Define to 1 if your compiler defines isinf in the header file. */ +/* Set to 1 if the isinf function is found in */ #undef HAVE_ISINF_IN_CMATH -/* Define to 1 if your compiler defines isinf in the header file. */ +/* Set to 1 if the isinf function is found in */ #undef HAVE_ISINF_IN_MATH_H -/* Define to 1 if your compiler defines isnan in the header file. */ +/* Set to 1 if the isnan function is found in */ #undef HAVE_ISNAN_IN_CMATH -/* Define to 1 if your compiler defines isnan in the header file. */ +/* Set to 1 if the isnan function is found in */ #undef HAVE_ISNAN_IN_MATH_H /* Define to 1 if you have the `elf' library (-lelf). */ @@ -135,6 +134,9 @@ /* Have pthread_mutex_lock */ #undef HAVE_PTHREAD_MUTEX_LOCK +/* Define to 1 if srand48/lrand48/drand48 exist in */ +#undef HAVE_RAND48 + /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H @@ -147,12 +149,10 @@ /* Does not have hash_set in std namespace */ #undef HAVE_STD_EXT_HASH_SET -/* Define to 1 if your compiler defines std::isinf in the header file. - */ +/* Set to 1 if the std::isinf function is found in */ #undef HAVE_STD_ISINF_IN_CMATH -/* Define to 1 if your compiler defines std::isnan in the header file. - */ +/* Set to 1 if the std::isnan function is found in */ #undef HAVE_STD_ISNAN_IN_CMATH /* Does not have std namespace iterator */ From reid at x10sys.com Wed Oct 27 18:19:04 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:04 -0500 Subject: [llvm-commits] CVS: llvm/tools/gccld/Makefile Message-ID: <200410272319.SAA02800@zion.cs.uiuc.edu> Changes in directory llvm/tools/gccld: Makefile updated: 1.8 -> 1.9 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+3 -2) Index: llvm/tools/gccld/Makefile diff -u llvm/tools/gccld/Makefile:1.8 llvm/tools/gccld/Makefile:1.9 --- llvm/tools/gccld/Makefile:1.8 Sun Aug 29 14:29:38 2004 +++ llvm/tools/gccld/Makefile Wed Oct 27 18:18:45 2004 @@ -10,7 +10,8 @@ LEVEL = ../.. TOOLNAME = gccld -USEDLIBS = ipo.a transforms.a scalaropts.a analysis.a ipa.a transformutils.a \ - target.a bcreader bcwriter vmcore support.a LLVMsystem.a +USEDLIBS = LLVMipo.a LLVMTransforms.a LLVMScalarOpts.a LLVMAnalysis.a LLVMipa.a \ + LLVMTransformUtils.a LLVMTarget.a LLVMBCReader LLVMBCWriter LLVMCore \ + LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/projects/Stacker/samples/Makefile Message-ID: <200410272319.SAA02804@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/samples: Makefile updated: 1.3 -> 1.4 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/projects/Stacker/samples/Makefile diff -u llvm/projects/Stacker/samples/Makefile:1.3 llvm/projects/Stacker/samples/Makefile:1.4 --- llvm/projects/Stacker/samples/Makefile:1.3 Mon Dec 8 01:08:00 2003 +++ llvm/projects/Stacker/samples/Makefile Wed Oct 27 18:18:45 2004 @@ -24,7 +24,7 @@ all :: $(SAMPLES) ifdef OPTIMIZE -%.bc : %.st +% : %.st @$(ECHO) "Compiling and Optimizing $< to $*.bc" $(VERB)$(STKRC_EXEC) -e -o - $< | opt -stats -q -f -o $*.bc \ -aa-eval -adce -branch-combine -cee -constmerge -constprop -dce -die -ds-aa \ From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/CBackend/Makefile Message-ID: <200410272319.SAA02832@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/CBackend: Makefile updated: 1.3 -> 1.4 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/CBackend/Makefile diff -u llvm/lib/Target/CBackend/Makefile:1.3 llvm/lib/Target/CBackend/Makefile:1.4 --- llvm/lib/Target/CBackend/Makefile:1.3 Fri Feb 13 17:31:12 2004 +++ llvm/lib/Target/CBackend/Makefile Wed Oct 27 18:18:45 2004 @@ -8,6 +8,6 @@ ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = cwriter +LIBRARYNAME = LLVMCBackend include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Hello/Makefile Message-ID: <200410272319.SAA02841@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Hello: Makefile updated: 1.3 -> 1.4 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Transforms/Hello/Makefile diff -u llvm/lib/Transforms/Hello/Makefile:1.3 llvm/lib/Transforms/Hello/Makefile:1.4 --- llvm/lib/Transforms/Hello/Makefile:1.3 Wed Sep 15 12:53:52 2004 +++ llvm/lib/Transforms/Hello/Makefile Wed Oct 27 18:18:45 2004 @@ -8,7 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = hello +LIBRARYNAME = LLVMHello SHARED_LIBRARY = 1 include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:06 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:06 -0500 Subject: [llvm-commits] CVS: llvm/tools/Makefile.JIT Message-ID: <200410272319.SAA02809@zion.cs.uiuc.edu> Changes in directory llvm/tools: Makefile.JIT updated: 1.2 -> 1.3 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+10 -9) Index: llvm/tools/Makefile.JIT diff -u llvm/tools/Makefile.JIT:1.2 llvm/tools/Makefile.JIT:1.3 --- llvm/tools/Makefile.JIT:1.2 Thu Oct 14 15:06:36 2004 +++ llvm/tools/Makefile.JIT Wed Oct 27 18:18:45 2004 @@ -18,7 +18,7 @@ include $(LEVEL)/Makefile.config # Generic JIT libraries -JITLIBS = lli-jit codegen executionengine +JITLIBS = LLVMJIT LLVMCodeGen LLVMExecutionEngine ARCHLIBS = # You can enable the X86 JIT on a non-X86 host by setting the flag @@ -30,7 +30,7 @@ # What the X86 JIT requires ifdef ENABLE_X86_JIT - JITLIBS += x86 selectiondag + JITLIBS += LLVMX86 LLVMSelectionDAG # X86 doesn't require any ARCHLIBS endif @@ -43,10 +43,10 @@ # What the Sparc JIT requires ifdef ENABLE_SPARCV9_JIT - JITLIBS += sparcv9 - ARCHLIBS += sparcv9sched sparcv9livevar instrument.a profpaths \ - bcwriter transforms.a ipo.a ipa.a datastructure.a \ - sparcv9regalloc + JITLIBS += LLVMSparcV9 + ARCHLIBS += LLVMSparcV9sched LLVMSparcV9livevar LLVMInstrumentation.a \ + LLVMProfilePaths LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMipa.a \ + LLVMDataStructure.a LLVMSparcV9regalloc endif # You can enable the PowerPC JIT on a non-PowerPC host by setting the flag @@ -58,8 +58,9 @@ # What the PowerPC JIT requires ifdef ENABLE_PPC_JIT - JITLIBS += powerpc + JITLIBS += LLVMPowerPC endif -USEDLIBS += lli-interpreter $(JITLIBS) $(ARCHLIBS) scalaropts analysis.a \ - transformutils.a bcreader vmcore support target.a LLVMsystem.a +USEDLIBS += LLVMInterpreter $(JITLIBS) $(ARCHLIBS) LLVMScalarOpts \ + LLVMAnalysis.a LLVMTransformUtils.a LLVMBCReader LLVMCore \ + LLVMSupport.a LLVMTarget.a LLVMSystem.a From reid at x10sys.com Wed Oct 27 18:19:06 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:06 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Makefile Message-ID: <200410272319.SAA02806@zion.cs.uiuc.edu> Changes in directory llvm/lib/System: Makefile updated: 1.5 -> 1.6 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/System/Makefile diff -u llvm/lib/System/Makefile:1.5 llvm/lib/System/Makefile:1.6 --- llvm/lib/System/Makefile:1.5 Mon Oct 25 22:12:11 2004 +++ llvm/lib/System/Makefile Wed Oct 27 18:18:44 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../.. -LIBRARYNAME = LLVMsystem +LIBRARYNAME = LLVMSystem BUILD_ARCHIVE = 1 EXTRA_DIST = AIX Cygwin Darwin FreeBSD Interix Linux SunOS Unix Win32 From reid at x10sys.com Wed Oct 27 18:19:06 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:06 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/Makefile Message-ID: <200410272319.SAA02807@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: Makefile updated: 1.8 -> 1.9 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Analysis/Makefile diff -u llvm/lib/Analysis/Makefile:1.8 llvm/lib/Analysis/Makefile:1.9 --- llvm/lib/Analysis/Makefile:1.8 Fri Jan 9 12:16:20 2004 +++ llvm/lib/Analysis/Makefile Wed Oct 27 18:18:44 2004 @@ -8,7 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. -LIBRARYNAME = analysis +LIBRARYNAME = LLVMAnalysis PARALLEL_DIRS = IPA DataStructure BUILD_ARCHIVE = 1 From reid at x10sys.com Wed Oct 27 18:19:06 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:06 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/Makefile Message-ID: <200410272319.SAA02805@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: Makefile updated: 1.3 -> 1.4 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/CodeGen/SelectionDAG/Makefile diff -u llvm/lib/CodeGen/SelectionDAG/Makefile:1.3 llvm/lib/CodeGen/SelectionDAG/Makefile:1.4 --- llvm/lib/CodeGen/SelectionDAG/Makefile:1.3 Mon Oct 20 17:26:56 2003 +++ llvm/lib/CodeGen/SelectionDAG/Makefile Wed Oct 27 18:18:44 2004 @@ -8,6 +8,6 @@ ##===----------------------------------------------------------------------===## LEVEL = ../../.. PARALLEL_DIRS = -LIBRARYNAME = selectiondag +LIBRARYNAME = LLVMSelectionDAG include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:06 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:06 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Skeleton/Makefile Message-ID: <200410272319.SAA02813@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Skeleton: Makefile updated: 1.3 -> 1.4 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/Skeleton/Makefile diff -u llvm/lib/Target/Skeleton/Makefile:1.3 llvm/lib/Target/Skeleton/Makefile:1.4 --- llvm/lib/Target/Skeleton/Makefile:1.3 Fri Oct 22 16:02:08 2004 +++ llvm/lib/Target/Skeleton/Makefile Wed Oct 27 18:18:45 2004 @@ -8,7 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = skeleton +LIBRARYNAME = LLVMSkeleton TARGET = Skeleton # Make sure that tblgen is run, first thing. From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/Makefile Message-ID: <200410272319.SAA02812@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: Makefile updated: 1.13 -> 1.14 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/utils/TableGen/Makefile diff -u llvm/utils/TableGen/Makefile:1.13 llvm/utils/TableGen/Makefile:1.14 --- llvm/utils/TableGen/Makefile:1.13 Fri Sep 3 18:19:53 2004 +++ llvm/utils/TableGen/Makefile Wed Oct 27 18:18:45 2004 @@ -8,7 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. TOOLNAME = tblgen -USEDLIBS = support.a LLVMsystem.a +USEDLIBS = LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Makefile Message-ID: <200410272319.SAA02815@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine: Makefile updated: 1.42 -> 1.43 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/ExecutionEngine/Makefile diff -u llvm/lib/ExecutionEngine/Makefile:1.42 llvm/lib/ExecutionEngine/Makefile:1.43 --- llvm/lib/ExecutionEngine/Makefile:1.42 Mon Oct 20 17:26:56 2003 +++ llvm/lib/ExecutionEngine/Makefile Wed Oct 27 18:18:44 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../.. -LIBRARYNAME = executionengine +LIBRARYNAME = LLVMExecutionEngine PARALLEL_DIRS = Interpreter JIT include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/examples/ModuleMaker/Makefile Message-ID: <200410272319.SAA02814@zion.cs.uiuc.edu> Changes in directory llvm/examples/ModuleMaker: Makefile updated: 1.5 -> 1.6 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/examples/ModuleMaker/Makefile diff -u llvm/examples/ModuleMaker/Makefile:1.5 llvm/examples/ModuleMaker/Makefile:1.6 --- llvm/examples/ModuleMaker/Makefile:1.5 Sat Sep 11 15:30:11 2004 +++ llvm/examples/ModuleMaker/Makefile Wed Oct 27 18:18:44 2004 @@ -8,6 +8,6 @@ ##===----------------------------------------------------------------------===## LEVEL=../.. TOOLNAME=ModuleMaker -USEDLIBS= bcwriter vmcore support.a LLVMsystem.a +USEDLIBS= LLVMBCWriter LLVMCore LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/tools/analyze/Makefile Message-ID: <200410272319.SAA02811@zion.cs.uiuc.edu> Changes in directory llvm/tools/analyze: Makefile updated: 1.23 -> 1.24 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+3 -3) Index: llvm/tools/analyze/Makefile diff -u llvm/tools/analyze/Makefile:1.23 llvm/tools/analyze/Makefile:1.24 --- llvm/tools/analyze/Makefile:1.23 Tue Oct 12 13:33:52 2004 +++ llvm/tools/analyze/Makefile Wed Oct 27 18:18:45 2004 @@ -8,9 +8,9 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. TOOLNAME = analyze -USEDLIBS = asmparser bcreader analysis ipa datastructure scalaropts.a \ - transforms.a target.a scalaropts.a transformutils.a vmcore support \ - LLVMsystem.a +USEDLIBS = LLVMAsmParser LLVMBCReader LLVMAnalysis LLVMipa LLVMDataStructure \ + LLVMScalarOpts.a LLVMTransforms.a LLVMTarget.a LLVMScalarOpts.a \ + LLVMTransformUtils.a LLVMCore LLVMSupport.a LLVMSystem.a TOOLLINKOPTS = $(PLATFORMLIBDL) From reid at x10sys.com Wed Oct 27 18:19:06 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:06 -0500 Subject: [llvm-commits] CVS: llvm/tools/extract/Makefile Message-ID: <200410272319.SAA02808@zion.cs.uiuc.edu> Changes in directory llvm/tools/extract: Makefile updated: 1.5 -> 1.6 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+3 -2) Index: llvm/tools/extract/Makefile diff -u llvm/tools/extract/Makefile:1.5 llvm/tools/extract/Makefile:1.6 --- llvm/tools/extract/Makefile:1.5 Sun Aug 29 14:29:38 2004 +++ llvm/tools/extract/Makefile Wed Oct 27 18:18:45 2004 @@ -9,7 +9,8 @@ LEVEL = ../.. TOOLNAME = extract -USEDLIBS = bcreader bcwriter transforms.a ipo.a target.a analysis.a \ - transformutils.a ipa.a vmcore support.a LLVMsystem.a +USEDLIBS = LLVMBCReader LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMTarget.a \ + LLVMAnalysis.a LLVMTransformUtils.a LLVMipa.a LLVMCore LLVMSupport.a \ + LLVMSystem.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Makefile Message-ID: <200410272319.SAA02831@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Makefile updated: 1.3 -> 1.4 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/VMCore/Makefile diff -u llvm/lib/VMCore/Makefile:1.3 llvm/lib/VMCore/Makefile:1.4 --- llvm/lib/VMCore/Makefile:1.3 Mon Oct 20 17:26:57 2003 +++ llvm/lib/VMCore/Makefile Wed Oct 27 18:18:45 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../.. -LIBRARYNAME = vmcore +LIBRARYNAME = LLVMCore include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/Debugger/Makefile Message-ID: <200410272319.SAA02873@zion.cs.uiuc.edu> Changes in directory llvm/lib/Debugger: Makefile updated: 1.1 -> 1.2 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Debugger/Makefile diff -u llvm/lib/Debugger/Makefile:1.1 llvm/lib/Debugger/Makefile:1.2 --- llvm/lib/Debugger/Makefile:1.1 Sun Jan 4 23:25:10 2004 +++ llvm/lib/Debugger/Makefile Wed Oct 27 18:18:44 2004 @@ -8,6 +8,6 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. -LIBRARYNAME = debugger +LIBRARYNAME = LLVMDebugger include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/Makefile Message-ID: <200410272319.SAA02861@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: Makefile updated: 1.21 -> 1.22 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/X86/Makefile diff -u llvm/lib/Target/X86/Makefile:1.21 llvm/lib/Target/X86/Makefile:1.22 --- llvm/lib/Target/X86/Makefile:1.21 Fri Oct 22 16:02:08 2004 +++ llvm/lib/Target/X86/Makefile Wed Oct 27 18:18:45 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = x86 +LIBRARYNAME = LLVMX86 TARGET = X86 # Make sure that tblgen is run, first thing. BUILT_SOURCES = X86GenRegisterInfo.h.inc X86GenRegisterNames.inc \ From reid at x10sys.com Wed Oct 27 18:19:06 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:06 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/Makefile Message-ID: <200410272319.SAA02803@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Makefile updated: 1.4 -> 1.5 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/AsmParser/Makefile diff -u llvm/lib/AsmParser/Makefile:1.4 llvm/lib/AsmParser/Makefile:1.5 --- llvm/lib/AsmParser/Makefile:1.4 Mon Oct 20 17:26:55 2003 +++ llvm/lib/AsmParser/Makefile Wed Oct 27 18:18:44 2004 @@ -9,7 +9,7 @@ LEVEL = ../.. -LIBRARYNAME = asmparser +LIBRARYNAME = LLVMAsmParser include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/ProfilePaths/Makefile Message-ID: <200410272319.SAA02853@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation/ProfilePaths: Makefile updated: 1.5 -> 1.6 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/Makefile diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/Makefile:1.5 llvm/lib/Transforms/Instrumentation/ProfilePaths/Makefile:1.6 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/Makefile:1.5 Mon Oct 20 17:26:57 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/Makefile Wed Oct 27 18:18:45 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../../.. -LIBRARYNAME = profpaths +LIBRARYNAME = LLVMProfilePaths include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/tools/llee/Makefile Message-ID: <200410272319.SAA02838@zion.cs.uiuc.edu> Changes in directory llvm/tools/llee: Makefile updated: 1.9 -> 1.10 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/tools/llee/Makefile diff -u llvm/tools/llee/Makefile:1.9 llvm/tools/llee/Makefile:1.10 --- llvm/tools/llee/Makefile:1.9 Sat Oct 23 14:49:20 2004 +++ llvm/tools/llee/Makefile Wed Oct 27 18:18:45 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../.. -LIBRARYNAME = execve +LIBRARYNAME = LLVMexecve SHARED_LIBRARY = 1 include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/Makefile Message-ID: <200410272319.SAA02826@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: Makefile updated: 1.6 -> 1.7 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Support/Makefile diff -u llvm/lib/Support/Makefile:1.6 llvm/lib/Support/Makefile:1.7 --- llvm/lib/Support/Makefile:1.6 Mon Oct 20 17:26:56 2003 +++ llvm/lib/Support/Makefile Wed Oct 27 18:18:44 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../.. -LIBRARYNAME = support +LIBRARYNAME = LLVMSupport BUILD_ARCHIVE = 1 include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-prof/Makefile Message-ID: <200410272319.SAA02833@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-prof: Makefile updated: 1.3 -> 1.4 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/tools/llvm-prof/Makefile diff -u llvm/tools/llvm-prof/Makefile:1.3 llvm/tools/llvm-prof/Makefile:1.4 --- llvm/tools/llvm-prof/Makefile:1.3 Sun Aug 29 14:29:38 2004 +++ llvm/tools/llvm-prof/Makefile Wed Oct 27 18:18:45 2004 @@ -9,5 +9,5 @@ LEVEL = ../.. TOOLNAME = llvm-prof -USEDLIBS = analysis.a bcreader vmcore support.a LLVMsystem.a +USEDLIBS = LLVMAnalysis.a LLVMBCReader LLVMCore LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-ar/Makefile Message-ID: <200410272319.SAA02845@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ar: Makefile updated: 1.3 -> 1.4 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/tools/llvm-ar/Makefile diff -u llvm/tools/llvm-ar/Makefile:1.3 llvm/tools/llvm-ar/Makefile:1.4 --- llvm/tools/llvm-ar/Makefile:1.3 Sun Aug 29 14:29:38 2004 +++ llvm/tools/llvm-ar/Makefile Wed Oct 27 18:18:45 2004 @@ -9,6 +9,6 @@ LEVEL = ../.. TOOLNAME = llvm-ar -USEDLIBS = bcreader vmcore support.a LLVMsystem.a +USEDLIBS = LLVMBCReader LLVMCore LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/Makefile Message-ID: <200410272319.SAA02836@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: Makefile updated: 1.3 -> 1.4 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Transforms/Scalar/Makefile diff -u llvm/lib/Transforms/Scalar/Makefile:1.3 llvm/lib/Transforms/Scalar/Makefile:1.4 --- llvm/lib/Transforms/Scalar/Makefile:1.3 Mon Oct 20 17:26:57 2003 +++ llvm/lib/Transforms/Scalar/Makefile Wed Oct 27 18:18:45 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = scalaropts +LIBRARYNAME = LLVMScalarOpts BUILD_ARCHIVE = 1 include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/SparcV9/LiveVar/Makefile Message-ID: <200410272319.SAA02839@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/SparcV9/LiveVar: Makefile updated: 1.5 -> 1.6 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/SparcV9/LiveVar/Makefile diff -u llvm/lib/Target/SparcV9/LiveVar/Makefile:1.5 llvm/lib/Target/SparcV9/LiveVar/Makefile:1.6 --- llvm/lib/Target/SparcV9/LiveVar/Makefile:1.5 Wed Feb 25 12:44:15 2004 +++ llvm/lib/Target/SparcV9/LiveVar/Makefile Wed Oct 27 18:18:45 2004 @@ -8,7 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL = ../../../.. -LIBRARYNAME = sparcv9livevar +LIBRARYNAME = LLVMSparcV9LiveVar include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-ld/Linker.cpp Message-ID: <200410272319.SAA02847@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ld: Linker.cpp updated: 1.2 -> 1.3 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+3 -0) Index: llvm/tools/llvm-ld/Linker.cpp diff -u llvm/tools/llvm-ld/Linker.cpp:1.2 llvm/tools/llvm-ld/Linker.cpp:1.3 --- llvm/tools/llvm-ld/Linker.cpp:1.2 Sat Sep 25 10:59:41 2004 +++ llvm/tools/llvm-ld/Linker.cpp Wed Oct 27 18:18:45 2004 @@ -86,6 +86,7 @@ std::set DefinedSymbols; UndefinedSymbols.clear(); // Start out empty + // Add in all the external functions for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I) if (I->hasName()) { if (I->isExternal()) @@ -93,6 +94,8 @@ else if (!I->hasInternalLinkage()) DefinedSymbols.insert(I->getName()); } + + // Add in all the external globals for (Module::giterator I = M->gbegin(), E = M->gend(); I != E; ++I) if (I->hasName()) { if (I->isExternal()) From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/utils/fpcmp/Makefile Message-ID: <200410272319.SAA02870@zion.cs.uiuc.edu> Changes in directory llvm/utils/fpcmp: Makefile updated: 1.1 -> 1.2 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/utils/fpcmp/Makefile diff -u llvm/utils/fpcmp/Makefile:1.1 llvm/utils/fpcmp/Makefile:1.2 --- llvm/utils/fpcmp/Makefile:1.1 Tue Apr 13 15:55:49 2004 +++ llvm/utils/fpcmp/Makefile Wed Oct 27 18:18:45 2004 @@ -9,7 +9,7 @@ LEVEL = ../.. TOOLNAME = fpcmp -USEDLIBS = support.a +USEDLIBS = LLVMSupport.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-bcanalyzer/Makefile Message-ID: <200410272319.SAA02866@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-bcanalyzer: Makefile updated: 1.2 -> 1.3 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/tools/llvm-bcanalyzer/Makefile diff -u llvm/tools/llvm-bcanalyzer/Makefile:1.2 llvm/tools/llvm-bcanalyzer/Makefile:1.3 --- llvm/tools/llvm-bcanalyzer/Makefile:1.2 Sun Aug 29 14:29:38 2004 +++ llvm/tools/llvm-bcanalyzer/Makefile Wed Oct 27 18:18:45 2004 @@ -9,5 +9,5 @@ LEVEL = ../.. TOOLNAME = llvm-bcanalyzer -USEDLIBS = bcreader vmcore support.a LLVMsystem.a +USEDLIBS = LLVMBCReader LLVMCore LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/tools/opt/Makefile Message-ID: <200410272319.SAA02871@zion.cs.uiuc.edu> Changes in directory llvm/tools/opt: Makefile updated: 1.46 -> 1.47 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+5 -4) Index: llvm/tools/opt/Makefile diff -u llvm/tools/opt/Makefile:1.46 llvm/tools/opt/Makefile:1.47 --- llvm/tools/opt/Makefile:1.46 Sun Aug 29 14:29:38 2004 +++ llvm/tools/opt/Makefile Wed Oct 27 18:18:45 2004 @@ -9,10 +9,11 @@ LEVEL = ../.. TOOLNAME = opt -USEDLIBS = bcreader bcwriter \ - instrument profpaths scalaropts \ - ipo ipa datastructure transforms target.a analysis \ - transformutils vmcore support LLVMsystem.a +USEDLIBS = LLVMBCReader LLVMBCWriter LLVMInstrumentation LLVMProfilePaths \ + LLVMScalarOpts LLVMipo LLVMipa LLVMDataStructure LLVMTransforms \ + LLVMTarget.a LLVMAnalysis LLVMTransformUtils LLVMCore LLVMSupport.a \ + LLVMSystem.a + TOOLLINKOPTS = $(PLATFORMLIBDL) include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/System/Unix/MappedFile.cpp Message-ID: <200410272319.SAA02846@zion.cs.uiuc.edu> Changes in directory llvm/lib/System/Unix: MappedFile.cpp updated: 1.4 -> 1.5 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+0 -1) Index: llvm/lib/System/Unix/MappedFile.cpp diff -u llvm/lib/System/Unix/MappedFile.cpp:1.4 llvm/lib/System/Unix/MappedFile.cpp:1.5 --- llvm/lib/System/Unix/MappedFile.cpp:1.4 Tue Oct 5 13:46:59 2004 +++ llvm/lib/System/Unix/MappedFile.cpp Wed Oct 27 18:18:44 2004 @@ -20,7 +20,6 @@ #include "Unix.h" #include #include -#include namespace llvm { using namespace sys; From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/SparcV9/InstrSched/Makefile Message-ID: <200410272319.SAA02830@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/SparcV9/InstrSched: Makefile updated: 1.4 -> 1.5 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/SparcV9/InstrSched/Makefile diff -u llvm/lib/Target/SparcV9/InstrSched/Makefile:1.4 llvm/lib/Target/SparcV9/InstrSched/Makefile:1.5 --- llvm/lib/Target/SparcV9/InstrSched/Makefile:1.4 Fri Oct 8 13:10:01 2004 +++ llvm/lib/Target/SparcV9/InstrSched/Makefile Wed Oct 27 18:18:45 2004 @@ -9,6 +9,6 @@ LEVEL = ../../../.. DIRS = -LIBRARYNAME = sparcv9sched +LIBRARYNAME = LLVMSparcV9InstrSched include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/Makefile Message-ID: <200410272319.SAA02856@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: Makefile updated: 1.24 -> 1.25 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/CodeGen/Makefile diff -u llvm/lib/CodeGen/Makefile:1.24 llvm/lib/CodeGen/Makefile:1.25 --- llvm/lib/CodeGen/Makefile:1.24 Sun Oct 10 18:37:40 2004 +++ llvm/lib/CodeGen/Makefile Wed Oct 27 18:18:44 2004 @@ -9,6 +9,6 @@ LEVEL = ../.. PARALLEL_DIRS = SelectionDAG -LIBRARYNAME = codegen +LIBRARYNAME = LLVMCodeGen include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/SparcV9/ModuloScheduling/Makefile Message-ID: <200410272319.SAA02869@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/SparcV9/ModuloScheduling: Makefile updated: 1.3 -> 1.4 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/SparcV9/ModuloScheduling/Makefile diff -u llvm/lib/Target/SparcV9/ModuloScheduling/Makefile:1.3 llvm/lib/Target/SparcV9/ModuloScheduling/Makefile:1.4 --- llvm/lib/Target/SparcV9/ModuloScheduling/Makefile:1.3 Sun Oct 10 18:34:36 2004 +++ llvm/lib/Target/SparcV9/ModuloScheduling/Makefile Wed Oct 27 18:18:45 2004 @@ -9,6 +9,6 @@ LEVEL = ../../../.. DIRS = -LIBRARYNAME = sparcv9modulosched +LIBRARYNAME = LLVMSparcV9ModuloSched include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/tools/bugpoint/Makefile Message-ID: <200410272319.SAA02867@zion.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: Makefile updated: 1.8 -> 1.9 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+5 -4) Index: llvm/tools/bugpoint/Makefile diff -u llvm/tools/bugpoint/Makefile:1.8 llvm/tools/bugpoint/Makefile:1.9 --- llvm/tools/bugpoint/Makefile:1.8 Tue Oct 12 14:17:11 2004 +++ llvm/tools/bugpoint/Makefile Wed Oct 27 18:18:45 2004 @@ -10,11 +10,12 @@ TOOLNAME = bugpoint -OPTLIBS = transforms instrument profpaths -ANALIBS = datastructure ipa target.a +OPTLIBS = LLVMTransforms LLVMInstrumentation LLVMProfilePaths +ANALIBS = LLVMDataStructure LLVMipa LLVMTarget.a -USEDLIBS = ipo scalaropts analysis $(OPTLIBS) $(ANALIBS) transformutils \ - asmparser bcreader bcwriter vmcore support LLVMsystem.a +USEDLIBS = LLVMipo LLVMScalarOpts LLVMAnalysis $(OPTLIBS) $(ANALIBS) \ + LLVMTransformUtils LLVMAsmParser LLVMBCReader LLVMBCWriter LLVMCore \ + LLVMSupport.a LLVMSystem.a TOOLLINKOPTS = $(PLATFORMLIBDL) From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/Makefile Message-ID: <200410272319.SAA02810@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation: Makefile updated: 1.5 -> 1.6 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Transforms/Instrumentation/Makefile diff -u llvm/lib/Transforms/Instrumentation/Makefile:1.5 llvm/lib/Transforms/Instrumentation/Makefile:1.6 --- llvm/lib/Transforms/Instrumentation/Makefile:1.5 Mon Oct 20 17:26:57 2003 +++ llvm/lib/Transforms/Instrumentation/Makefile Wed Oct 27 18:18:45 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = instrument +LIBRARYNAME = LLVMInstrumentation PARALLEL_DIRS = ProfilePaths BUILD_ARCHIVE = 1 From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Makefile Message-ID: <200410272319.SAA02844@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms: Makefile updated: 1.8 -> 1.9 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Transforms/Makefile diff -u llvm/lib/Transforms/Makefile:1.8 llvm/lib/Transforms/Makefile:1.9 --- llvm/lib/Transforms/Makefile:1.8 Mon Oct 20 17:26:57 2003 +++ llvm/lib/Transforms/Makefile Wed Oct 27 18:18:45 2004 @@ -8,7 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. PARALLEL_DIRS = Utils Instrumentation Scalar IPO -LIBRARYNAME = transforms +LIBRARYNAME = LLVMTransforms BUILD_ARCHIVE = 1 include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-link/Makefile Message-ID: <200410272319.SAA02875@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-link: Makefile updated: 1.9 -> 1.10 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/tools/llvm-link/Makefile diff -u llvm/tools/llvm-link/Makefile:1.9 llvm/tools/llvm-link/Makefile:1.10 --- llvm/tools/llvm-link/Makefile:1.9 Sun Aug 29 14:29:38 2004 +++ llvm/tools/llvm-link/Makefile Wed Oct 27 18:18:45 2004 @@ -9,6 +9,6 @@ LEVEL = ../.. TOOLNAME = llvm-link -USEDLIBS = bcreader bcwriter vmcore support.a LLVMsystem.a +USEDLIBS = LLVMBCReader LLVMBCWriter LLVMCore LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/SparcV9/Makefile Message-ID: <200410272319.SAA02840@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/SparcV9: Makefile updated: 1.50 -> 1.51 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/SparcV9/Makefile diff -u llvm/lib/Target/SparcV9/Makefile:1.50 llvm/lib/Target/SparcV9/Makefile:1.51 --- llvm/lib/Target/SparcV9/Makefile:1.50 Fri Oct 22 18:24:39 2004 +++ llvm/lib/Target/SparcV9/Makefile Wed Oct 27 18:18:45 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = sparcv9 +LIBRARYNAME = LLVMSparcV9 PARALLEL_DIRS = InstrSched LiveVar ModuloScheduling RegAlloc BUILT_SOURCES = \ From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/tools/llc/Makefile Message-ID: <200410272319.SAA02842@zion.cs.uiuc.edu> Changes in directory llvm/tools/llc: Makefile updated: 1.59 -> 1.60 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+22 -21) Index: llvm/tools/llc/Makefile diff -u llvm/tools/llc/Makefile:1.59 llvm/tools/llc/Makefile:1.60 --- llvm/tools/llc/Makefile:1.59 Fri Oct 8 13:14:56 2004 +++ llvm/tools/llc/Makefile Wed Oct 27 18:18:45 2004 @@ -10,27 +10,28 @@ LEVEL = ../.. TOOLNAME = llc USEDLIBS = \ - cwriter \ - powerpc \ - sparcv9 \ - x86 \ - skeleton \ - selectiondag \ - sparcv9regalloc \ - sparcv9sched \ - codegen \ - target.a \ - sparcv9livevar \ - ipa.a \ - transforms.a \ - scalaropts.a \ - analysis.a \ - transformutils.a \ - bcreader \ - bcwriter \ - vmcore \ - support.a \ - LLVMsystem.a + LLVMCBackend \ + LLVMPowerPC \ + LLVMSparcV9 \ + LLVMX86 \ + LLVMSkeleton \ + LLVMSelectionDAG \ + LLVMSparcV9RegAlloc \ + LLVMSparcV9InstrSched \ + LLVMCodeGen \ + LLVMTarget.a \ + LLVMSparcV9LiveVar \ + LLVMipa.a \ + LLVMTransforms.a \ + LLVMScalarOpts.a \ + LLVMAnalysis.a \ + LLVMTransformUtils.a \ + LLVMBCReader \ + LLVMBCWriter \ + LLVMCore \ + LLVMSupport.a \ + LLVMSystem.a + TOOLLINKOPTS = $(PLATFORMLIBDL) include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/Makefile Message-ID: <200410272319.SAA02835@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: Makefile updated: 1.18 -> 1.19 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/Makefile diff -u llvm/lib/Target/Makefile:1.18 llvm/lib/Target/Makefile:1.19 --- llvm/lib/Target/Makefile:1.18 Sat Oct 16 13:21:50 2004 +++ llvm/lib/Target/Makefile Wed Oct 27 18:18:45 2004 @@ -8,7 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. PARALLEL_DIRS = CBackend X86 SparcV9 PowerPC Skeleton -LIBRARYNAME = target +LIBRARYNAME = LLVMTarget BUILD_ARCHIVE = 1 include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/projects/Stacker/tools/stkrc/Makefile Message-ID: <200410272319.SAA02848@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/tools/stkrc: Makefile updated: 1.4 -> 1.5 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+5 -4) Index: llvm/projects/Stacker/tools/stkrc/Makefile diff -u llvm/projects/Stacker/tools/stkrc/Makefile:1.4 llvm/projects/Stacker/tools/stkrc/Makefile:1.5 --- llvm/projects/Stacker/tools/stkrc/Makefile:1.4 Sat Sep 4 14:48:50 2004 +++ llvm/projects/Stacker/tools/stkrc/Makefile Wed Oct 27 18:18:45 2004 @@ -8,10 +8,11 @@ # # Give the name of a library. This will build a dynamic version. # -TOOLNAME=stkrc -LLVMLIBS= asmparser bcwriter transforms ipo.a ipa.a \ - scalaropts analysis.a target.a transformutils \ - vmcore support.a LLVMsystem.a +TOOLNAME = stkrc +LLVMLIBS = LLVMAsmParser LLVMBCWriter LLVMTransforms LLVMipo.a LLVMipa.a \ + LLVMScalarOpts LLVMAnalysis.a LLVMTarget.a LLVMTransformUtils \ + LLVMCore LLVMSupport.a LLVMSystem.a + USEDLIBS=stkr_compiler From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/SparcV9/RegAlloc/Makefile Message-ID: <200410272319.SAA02834@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/SparcV9/RegAlloc: Makefile updated: 1.6 -> 1.7 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/SparcV9/RegAlloc/Makefile diff -u llvm/lib/Target/SparcV9/RegAlloc/Makefile:1.6 llvm/lib/Target/SparcV9/RegAlloc/Makefile:1.7 --- llvm/lib/Target/SparcV9/RegAlloc/Makefile:1.6 Fri Oct 8 13:11:14 2004 +++ llvm/lib/Target/SparcV9/RegAlloc/Makefile Wed Oct 27 18:18:45 2004 @@ -9,7 +9,7 @@ LEVEL = ../../../.. DIRS = -LIBRARYNAME = sparcv9regalloc +LIBRARYNAME = LLVMSparcV9RegAlloc BUILD_ARCHIVE = 1 include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-db/Makefile Message-ID: <200410272319.SAA02854@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-db: Makefile updated: 1.6 -> 1.7 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/tools/llvm-db/Makefile diff -u llvm/tools/llvm-db/Makefile:1.6 llvm/tools/llvm-db/Makefile:1.7 --- llvm/tools/llvm-db/Makefile:1.6 Thu Oct 14 14:01:25 2004 +++ llvm/tools/llvm-db/Makefile Wed Oct 27 18:18:45 2004 @@ -9,7 +9,7 @@ LEVEL = ../.. TOOLNAME = llvm-db -USEDLIBS = debugger +USEDLIBS = LLVMDebugger # Enable JIT support include ../Makefile.JIT From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-nm/Makefile Message-ID: <200410272319.SAA02864@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-nm: Makefile updated: 1.3 -> 1.4 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/tools/llvm-nm/Makefile diff -u llvm/tools/llvm-nm/Makefile:1.3 llvm/tools/llvm-nm/Makefile:1.4 --- llvm/tools/llvm-nm/Makefile:1.3 Sun Aug 29 14:29:38 2004 +++ llvm/tools/llvm-nm/Makefile Wed Oct 27 18:18:45 2004 @@ -9,5 +9,5 @@ LEVEL = ../.. TOOLNAME = llvm-nm -USEDLIBS = bcreader vmcore support.a LLVMsystem.a +USEDLIBS = LLVMBCReader LLVMCore LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-dis/Makefile Message-ID: <200410272319.SAA02874@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-dis: Makefile updated: 1.15 -> 1.16 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/tools/llvm-dis/Makefile diff -u llvm/tools/llvm-dis/Makefile:1.15 llvm/tools/llvm-dis/Makefile:1.16 --- llvm/tools/llvm-dis/Makefile:1.15 Sun Aug 29 14:29:38 2004 +++ llvm/tools/llvm-dis/Makefile Wed Oct 27 18:18:45 2004 @@ -9,5 +9,5 @@ LEVEL = ../.. TOOLNAME = llvm-dis -USEDLIBS = bcreader vmcore support.a LLVMsystem.a +USEDLIBS = LLVMBCReader LLVMCore LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:07 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:07 -0500 Subject: [llvm-commits] CVS: llvm/tools/gccas/Makefile Message-ID: <200410272319.SAA02837@zion.cs.uiuc.edu> Changes in directory llvm/tools/gccas: Makefile updated: 1.17 -> 1.18 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+3 -2) Index: llvm/tools/gccas/Makefile diff -u llvm/tools/gccas/Makefile:1.17 llvm/tools/gccas/Makefile:1.18 --- llvm/tools/gccas/Makefile:1.17 Sun Aug 29 14:29:38 2004 +++ llvm/tools/gccas/Makefile Wed Oct 27 18:18:45 2004 @@ -9,7 +9,8 @@ LEVEL = ../.. TOOLNAME = gccas -USEDLIBS = asmparser bcwriter transforms ipo.a ipa.a scalaropts analysis.a \ - target.a transformutils vmcore support.a LLVMsystem.a +USEDLIBS = LLVMAsmParser LLVMBCWriter LLVMTransforms LLVMipo.a LLVMipa.a \ + LLVMScalarOpts LLVMAnalysis.a LLVMTarget.a LLVMTransformUtils \ + LLVMCore LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/PowerPC/Makefile Message-ID: <200410272319.SAA02872@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/PowerPC: Makefile updated: 1.15 -> 1.16 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/PowerPC/Makefile diff -u llvm/lib/Target/PowerPC/Makefile:1.15 llvm/lib/Target/PowerPC/Makefile:1.16 --- llvm/lib/Target/PowerPC/Makefile:1.15 Fri Oct 22 23:59:22 2004 +++ llvm/lib/Target/PowerPC/Makefile Wed Oct 27 18:18:45 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = powerpc +LIBRARYNAME = LLVMPowerPC TARGET = PowerPC # Make sure that tblgen is run, first thing. From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-as/Makefile Message-ID: <200410272319.SAA02855@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-as: Makefile updated: 1.13 -> 1.14 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/tools/llvm-as/Makefile diff -u llvm/tools/llvm-as/Makefile:1.13 llvm/tools/llvm-as/Makefile:1.14 --- llvm/tools/llvm-as/Makefile:1.13 Sun Aug 29 14:29:38 2004 +++ llvm/tools/llvm-as/Makefile Wed Oct 27 18:18:45 2004 @@ -8,6 +8,6 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. TOOLNAME = llvm-as -USEDLIBS = asmparser bcwriter vmcore support.a LLVMsystem.a +USEDLIBS = LLVMAsmParser LLVMBCWriter LLVMCore LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/Makefile Message-ID: <200410272319.SAA02868@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: Makefile updated: 1.3 -> 1.4 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Transforms/Utils/Makefile diff -u llvm/lib/Transforms/Utils/Makefile:1.3 llvm/lib/Transforms/Utils/Makefile:1.4 --- llvm/lib/Transforms/Utils/Makefile:1.3 Mon Oct 20 17:26:57 2003 +++ llvm/lib/Transforms/Utils/Makefile Wed Oct 27 18:18:45 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = transformutils +LIBRARYNAME = LLVMTransformUtils BUILD_ARCHIVE = 1 include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 18:19:08 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 18:19:08 -0500 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/Makefile Message-ID: <200410272319.SAA02865@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: Makefile updated: 1.3 -> 1.4 --- Log message: Change Library Names Not To Conflict With Others When Installed --- Diffs of the changes: (+1 -1) Index: llvm/lib/Transforms/IPO/Makefile diff -u llvm/lib/Transforms/IPO/Makefile:1.3 llvm/lib/Transforms/IPO/Makefile:1.4 --- llvm/lib/Transforms/IPO/Makefile:1.3 Mon Oct 20 17:26:57 2003 +++ llvm/lib/Transforms/IPO/Makefile Wed Oct 27 18:18:45 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = ipo +LIBRARYNAME = LLVMipo BUILD_ARCHIVE = 1 include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 19:11:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 19:11:54 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvmc/Makefile Message-ID: <200410280011.TAA04705@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvmc: Makefile updated: 1.7 -> 1.8 --- Log message: Update for library name change. --- Diffs of the changes: (+1 -1) Index: llvm/tools/llvmc/Makefile diff -u llvm/tools/llvmc/Makefile:1.7 llvm/tools/llvmc/Makefile:1.8 --- llvm/tools/llvmc/Makefile:1.7 Mon Oct 25 22:12:11 2004 +++ llvm/tools/llvmc/Makefile Wed Oct 27 19:11:43 2004 @@ -8,7 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. TOOLNAME = llvmc -USEDLIBS = bcreader vmcore support.a LLVMsystem.a +USEDLIBS = LLVMBCReader LLVMCore LLVMSupport.a LLVMSystem.a CONFIG_FILES = st ll EXTRA_DIST = st ll From reid at x10sys.com Wed Oct 27 19:41:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 19:41:54 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410280041.TAA05161@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.218 -> 1.219 --- Log message: Bug Fixes: * Ensure that BUILT_SOURCES depends on OBJ_DIR/Makefile so that they do not get built before the Makefile is updated. * Fix build script for yacc & lex files by stopping it from thwarting the dependencies on the file. If the .y file changes, it needs to be rebuilt. This also cleans up the problem with llvmAsmParser ALWAYS rebuilding its Yacc files just to throw them away because there's no change. --- Diffs of the changes: (+7 -9) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.218 llvm/Makefile.rules:1.219 --- llvm/Makefile.rules:1.218 Wed Oct 27 17:48:58 2004 +++ llvm/Makefile.rules Wed Oct 27 19:41:43 2004 @@ -61,7 +61,7 @@ # PRECONDITIONS: that which must be built/checked first ################################################################################ -SRCMKFILES := $(filter-out Makefile.rules %.in,\ +SRCMKFILES := $(BUILD_SRC_DIR)/Makefile $(filter-out Makefile.rules %.in,\ $(wildcard $(BUILD_SRC_DIR)/Makefile.*)) OBJMKFILES := $(subst $(BUILD_SRC_DIR),$(BUILD_OBJ_DIR),$(SRCMKFILES)) CONFIGURE := $(LLVM_SRC_ROOT)/configure @@ -82,6 +82,8 @@ $(VERB) $(RM) -f $(BUILT_SOURCES) endif +$(BUILT_SOURCES) : $(BUILD_OBJ_ROOT)/Makefile + #------------------------------------------------------------------------ # Make sure we're not using a stale configuration #------------------------------------------------------------------------ @@ -806,21 +808,17 @@ $(SED) 's/void yyunput/inline void yyunput/' | \ $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \ $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \ - > $@.tmp - $(VERB) cmp -s $@ $@.tmp > /dev/null || $(MV) -f $@.tmp $@ - @# remove the output of flex if it didn't get moved over... - @rm -f $@.tmp + > $@ # Rule for building the bison parsers... %.c: %.y # Cancel built-in rules for yacc +%.cpp: %.y # Cancel built-in rules for yacc %.h: %.y # Cancel built-in rules for yacc %.cpp %.h : %.y @$(ECHO) "Bisoning $*.y" $(VERB) $(BISON) -v -d -p $( /dev/null || $(MV) -f $*.tab.c $*.cpp - $(VERB) cmp -s $*.tab.h $*.h > /dev/null || $(MV) -f $*.tab.h $*.h - @# If the files were not updated, don't leave them lying around... - @rm -f $*.tab.c $*.tab.h + $(VERB) $(MV) -f $*.tab.c $*.cpp + $(VERB) $(MV) -f $*.tab.h $*.h # To create the directories... %/.dir: From reid at x10sys.com Wed Oct 27 19:43:35 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 19:43:35 -0500 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/Makefile Message-ID: <200410280043.TAA05220@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Makefile updated: 1.5 -> 1.6 --- Log message: Make sure that the yacc and lex output are specified as BUILT_SOURCES. Correct the dependency of the Lexer.o file on the constructed llvmAsmParser.h header file. It is not the Lexer.cpp file that depends on the header, its the output of compiling Lexer.cpp, Lexer.o --- Diffs of the changes: (+7 -8) Index: llvm/lib/AsmParser/Makefile diff -u llvm/lib/AsmParser/Makefile:1.5 llvm/lib/AsmParser/Makefile:1.6 --- llvm/lib/AsmParser/Makefile:1.5 Wed Oct 27 18:18:44 2004 +++ llvm/lib/AsmParser/Makefile Wed Oct 27 19:43:24 2004 @@ -7,15 +7,14 @@ # ##===----------------------------------------------------------------------===## -LEVEL = ../.. - -LIBRARYNAME = LLVMAsmParser +LEVEL := ../.. +LIBRARYNAME := LLVMAsmParser +BUILT_SOURCES := llvmAsmParser.cpp llvmAsmParser.h Lexer.cpp include $(LEVEL)/Makefile.common # -# Make the source code file for the lexer depend upon the header file generated -# by the Bison parser. This prevents the generation of dependencies from -# being performed until after the header file has been created. -# -Lexer.cpp: llvmAsmParser.h +# Make the object code file for the lexer depend upon the header file generated +# by the Bison parser. This prevents the Lexer from being compiled before the +# header file it needs is built. +$(OBJDIR)/Lexer.o: llvmAsmParser.h From reid at x10sys.com Wed Oct 27 20:25:39 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 20:25:39 -0500 Subject: [llvm-commits] CVS: llvm/projects/Stacker/lib/compiler/Makefile Message-ID: <200410280125.UAA05771@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/lib/compiler: Makefile updated: 1.4 -> 1.5 --- Log message: Get rid of drivel. Ensure the lex/yacc output are specified as BUILT_SOURCES so they get built first. --- Diffs of the changes: (+3 -12) Index: llvm/projects/Stacker/lib/compiler/Makefile diff -u llvm/projects/Stacker/lib/compiler/Makefile:1.4 llvm/projects/Stacker/lib/compiler/Makefile:1.5 --- llvm/projects/Stacker/lib/compiler/Makefile:1.4 Fri Oct 22 16:02:08 2004 +++ llvm/projects/Stacker/lib/compiler/Makefile Wed Oct 27 20:25:28 2004 @@ -1,18 +1,9 @@ ##===- projects/Stacker/lib/compiler/Makefile --------------*- Makefile -*-===## -# -# Indicate where we are relative to the top of the source tree. -# -LEVEL=../.. +LEVEL := ../.. +LIBRARYNAME := stkr_compiler +BUILT_SOURCES := StackerParser.cpp StackerParser.h Lexer.cpp -# -# Give the name of a library. This will build a dynamic version. -# -LIBRARYNAME=stkr_compiler - -# -# Include Makefile.common so we know what to do. -# include $(LEVEL)/Makefile.common ifdef PARSE_DEBUG From criswell at cs.uiuc.edu Wed Oct 27 21:02:02 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed, 27 Oct 2004 21:02:02 -0500 (CDT) Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200410280202.VAA07066@seraph.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.31 -> 1.32 --- Log message: Use intptr_t to get an integer that is big enough to hold the pointer. This is used for Solaris. More changes may become necessary due to pointer size changes. --- Diffs of the changes: (+4 -2) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.31 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.32 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.31 Fri Nov 14 16:36:06 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Wed Oct 27 21:01:51 2004 @@ -19,6 +19,8 @@ #include #include +#include "llvm/Support/DataTypes.h" + //===----------------------------------------------------------------------===// // // PoolSlab implementation @@ -117,7 +119,7 @@ // // Convert the node pointer into a slab pointer. // - return reinterpret_cast(reinterpret_cast(p.Next) & ~(PageSize - 1)); + return reinterpret_cast(reinterpret_cast(p.Next) & ~(PageSize - 1)); } // @@ -129,7 +131,7 @@ inline struct SlabHeader * DataOwner (unsigned int PageSize, void * p) { - return reinterpret_cast(reinterpret_cast(p) & ~(PageSize - 1)); + return reinterpret_cast(reinterpret_cast(p) & ~(PageSize - 1)); } //===----------------------------------------------------------------------===// From reid at x10sys.com Wed Oct 27 22:50:54 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 22:50:54 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvm-ld/Makefile Message-ID: <200410280350.WAA07622@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ld: Makefile updated: 1.2 -> 1.3 --- Log message: Convert to new library names. --- Diffs of the changes: (+3 -2) Index: llvm/tools/llvm-ld/Makefile diff -u llvm/tools/llvm-ld/Makefile:1.2 llvm/tools/llvm-ld/Makefile:1.3 --- llvm/tools/llvm-ld/Makefile:1.2 Mon Sep 13 16:15:19 2004 +++ llvm/tools/llvm-ld/Makefile Wed Oct 27 22:50:43 2004 @@ -10,7 +10,8 @@ LEVEL = ../.. TOOLNAME = llvm-ld -USEDLIBS = ipo.a transforms.a scalaropts.a analysis.a ipa.a transformutils.a \ - target.a bcreader bcwriter vmcore support.a LLVMsystem.a +USEDLIBS = LLVMipo.a LLVMTransforms.a LLVMScalarOpts.a LLVMAnalysis.a LLVMipa.a \ + LLVMTransformUtils.a LLVMTarget.a LLVMBCReader LLVMBCWriter LLVMCore \ + LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 22:53:12 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 22:53:12 -0500 Subject: [llvm-commits] CVS: llvm/tools/Makefile Message-ID: <200410280353.WAA07712@zion.cs.uiuc.edu> Changes in directory llvm/tools: Makefile updated: 1.33 -> 1.34 --- Log message: Add llvm-ld to the subdirs to be built --- Diffs of the changes: (+3 -3) Index: llvm/tools/Makefile diff -u llvm/tools/Makefile:1.33 llvm/tools/Makefile:1.34 --- llvm/tools/Makefile:1.33 Mon Oct 25 22:12:11 2004 +++ llvm/tools/Makefile Wed Oct 27 22:53:02 2004 @@ -8,9 +8,9 @@ ##===----------------------------------------------------------------------===## LEVEL := .. -PARALLEL_DIRS := llvmc llvm-as llvm-dis opt gccas llc llvm-link lli gccld \ - llvm-stub analyze extract bugpoint llvm-nm llvm-prof llvm-db \ - llvm-ar llvm-bcanalyzer llee +PARALLEL_DIRS := llvm-as llvm-dis opt gccas llc llvm-link lli gccld llvm-stub \ + analyze extract bugpoint llvm-nm llvm-prof llvm-db \ + llvm-ar llvm-bcanalyzer llee llvmc llvm-ld EXTRA_DIST := Makefile.JIT From reid at x10sys.com Wed Oct 27 22:56:27 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 22:56:27 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvmc/llvmc.cpp Message-ID: <200410280356.WAA07771@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvmc: llvmc.cpp updated: 1.16 -> 1.17 --- Log message: Eliminate the -F option (for forcing output) .. not needed Create GCC compatible -Wx, aliases for the existing -T options. --- Diffs of the changes: (+10 -6) Index: llvm/tools/llvmc/llvmc.cpp diff -u llvm/tools/llvmc/llvmc.cpp:1.16 llvm/tools/llvmc/llvmc.cpp:1.17 --- llvm/tools/llvmc/llvmc.cpp:1.16 Mon Sep 13 20:58:45 2004 +++ llvm/tools/llvmc/llvmc.cpp Wed Oct 27 22:56:16 2004 @@ -74,6 +74,9 @@ cl::desc("Pass specific options to the pre-processor"), cl::value_desc("option")); +cl::alias PreprocessorToolOptsAlias("Wp,", cl::ZeroOrMore, + cl::desc("Alias for -Tpre"), cl::aliasopt(PreprocessorToolOpts)); + cl::list TranslatorToolOpts("Ttrn", cl::ZeroOrMore, cl::desc("Pass specific options to the assembler"), cl::value_desc("option")); @@ -82,6 +85,9 @@ cl::desc("Pass specific options to the assembler"), cl::value_desc("option")); +cl::alias AssemblerToolOptsAlias("Wa,", cl::ZeroOrMore, + cl::desc("Alias for -Tasm"), cl::aliasopt(AssemblerToolOpts)); + cl::list OptimizerToolOpts("Topt", cl::ZeroOrMore, cl::desc("Pass specific options to the optimizer"), cl::value_desc("option")); @@ -90,6 +96,9 @@ cl::desc("Pass specific options to the linker"), cl::value_desc("option")); +cl::alias LinkerToolOptsAlias("Wl,", cl::ZeroOrMore, + cl::desc("Alias for -Tlnk"), cl::aliasopt(LinkerToolOpts)); + cl::list fOpts("f", cl::ZeroOrMore, cl::Prefix, cl::desc("Pass through -f options to compiler tools"), cl::value_desc("optimization option")); @@ -120,7 +129,6 @@ cl::desc("Specify a symbol to define for source configuration"), cl::value_desc("symbol definition")); - //===------------------------------------------------------------------------=== //=== OUTPUT OPTIONS //===------------------------------------------------------------------------=== @@ -128,12 +136,9 @@ cl::opt OutputFilename("o", cl::desc("Override output filename"), cl::value_desc("filename")); -cl::opt ForceOutput("F", cl::Optional, cl::init(false), - cl::desc("Force output files to be overridden")); - cl::opt OutputMachine("m", cl::Prefix, cl::desc("Specify a target machine"), cl::value_desc("machine")); - + cl::opt Native("native", cl::init(false), cl::desc("Generative native object and executables instead of bytecode")); @@ -268,7 +273,6 @@ if (Verbose) flags |= CompilerDriver::VERBOSE_FLAG; if (Debug) flags |= CompilerDriver::DEBUG_FLAG; if (DryRun) flags |= CompilerDriver::DRY_RUN_FLAG; - if (ForceOutput) flags |= CompilerDriver::FORCE_FLAG; if (Native) flags |= CompilerDriver::EMIT_NATIVE_FLAG; if (EmitRawCode) flags |= CompilerDriver::EMIT_RAW_FLAG; if (KeepTemps) flags |= CompilerDriver::KEEP_TEMPS_FLAG; From reid at x10sys.com Wed Oct 27 22:57:59 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 22:57:59 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvmc/st Message-ID: <200410280357.WAA07817@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvmc: st updated: 1.7 -> 1.8 --- Log message: Pass -f to stkrc to ensure the output file is always written. --- Diffs of the changes: (+4 -4) Index: llvm/tools/llvmc/st diff -u llvm/tools/llvmc/st:1.7 llvm/tools/llvmc/st:1.8 --- llvm/tools/llvmc/st:1.7 Mon Sep 13 21:00:24 2004 +++ llvm/tools/llvmc/st Wed Oct 27 22:57:49 2004 @@ -25,8 +25,8 @@ # To compile stacker source, we just run the stacker # compiler with a default stack size of 2048 entries. - translator.command=stkrc -s 2048 %in% -o %out% %opt% \ - %time% %stats% %force% %args% + translator.command=stkrc -s 2048 %in% -f -o %out% %opt% \ + %time% %stats% %args% # stkrc doesn't preprocess but we set this to true so # that we don't run the cp command by default. @@ -43,8 +43,8 @@ ########################################################## # For optimization, we use the LLVM "opt" program - optimizer.command=stkrc -s 2048 %in% -o %out% %opt% \ - %time% %stats% %force% %args% + optimizer.command=stkrc -s 2048 %in% -f -o %out% %opt% \ + %time% %stats% %args% optimizer.required = yes From reid at x10sys.com Wed Oct 27 23:04:49 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 23:04:49 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvmc/CompilerDriver.h ConfigLexer.l Configuration.cpp Message-ID: <200410280404.XAA07989@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvmc: CompilerDriver.h updated: 1.12 -> 1.13 ConfigLexer.l updated: 1.9 -> 1.10 Configuration.cpp updated: 1.13 -> 1.14 --- Log message: Eliminate the force flag, configuration item, and related support --- Diffs of the changes: (+24 -26) Index: llvm/tools/llvmc/CompilerDriver.h diff -u llvm/tools/llvmc/CompilerDriver.h:1.12 llvm/tools/llvmc/CompilerDriver.h:1.13 --- llvm/tools/llvmc/CompilerDriver.h:1.12 Mon Sep 13 20:58:45 2004 +++ llvm/tools/llvmc/CompilerDriver.h Wed Oct 27 23:04:38 2004 @@ -120,17 +120,16 @@ /// @brief Driver specific flags enum DriverFlags { DRY_RUN_FLAG = 0x0001, ///< Do everything but execute actions - FORCE_FLAG = 0x0002, ///< Force overwrite of output files - VERBOSE_FLAG = 0x0004, ///< Print each action - DEBUG_FLAG = 0x0008, ///< Print debug information - TIME_PASSES_FLAG = 0x0010, ///< Time the passes as they execute - TIME_ACTIONS_FLAG = 0x0020, ///< Time the actions as they execute - SHOW_STATS_FLAG = 0x0040, ///< Show pass statistics - EMIT_NATIVE_FLAG = 0x0080, ///< Emit native code instead of bc - EMIT_RAW_FLAG = 0x0100, ///< Emit raw, unoptimized bytecode - KEEP_TEMPS_FLAG = 0x0200, ///< Don't delete temporary files - STRIP_OUTPUT_FLAG = 0x0400, ///< Strip symbols from linked output - DRIVER_FLAGS_MASK = 0x07FF, ///< Union of the above flags + VERBOSE_FLAG = 0x0002, ///< Print each action + DEBUG_FLAG = 0x0004, ///< Print debug information + TIME_PASSES_FLAG = 0x0008, ///< Time the passes as they execute + TIME_ACTIONS_FLAG = 0x0010, ///< Time the actions as they execute + SHOW_STATS_FLAG = 0x0020, ///< Show pass statistics + EMIT_NATIVE_FLAG = 0x0040, ///< Emit native code instead of bc + EMIT_RAW_FLAG = 0x0080, ///< Emit raw, unoptimized bytecode + KEEP_TEMPS_FLAG = 0x0100, ///< Don't delete temporary files + STRIP_OUTPUT_FLAG = 0x0200, ///< Strip symbols from linked output + DRIVER_FLAGS_MASK = 0x03FF, ///< Union of the above flags }; /// @} Index: llvm/tools/llvmc/ConfigLexer.l diff -u llvm/tools/llvmc/ConfigLexer.l:1.9 llvm/tools/llvmc/ConfigLexer.l:1.10 --- llvm/tools/llvmc/ConfigLexer.l:1.9 Mon Sep 13 20:59:31 2004 +++ llvm/tools/llvmc/ConfigLexer.l Wed Oct 27 23:04:38 2004 @@ -134,7 +134,7 @@ return EQUALS; } -{VERSION} { return handleNameContext(VERSION); } +{VERSION} { return handleNameContext(VERSION_TOK); } {LANG} { return handleNameContext(LANG); } {NAME} { return handleNameContext(NAME); } @@ -161,7 +161,6 @@ %args% { return handleSubstitution(ARGS_SUBST); } %defs% { return handleSubstitution(DEFS_SUBST); } -%force% { return handleSubstitution(FORCE_SUBST); } %in% { return handleSubstitution(IN_SUBST); } %incls% { return handleSubstitution(INCLS_SUBST); } %libs% { return handleSubstitution(LIBS_SUBST); } Index: llvm/tools/llvmc/Configuration.cpp diff -u llvm/tools/llvmc/Configuration.cpp:1.13 llvm/tools/llvmc/Configuration.cpp:1.14 --- llvm/tools/llvmc/Configuration.cpp:1.13 Wed Sep 1 17:55:40 2004 +++ llvm/tools/llvmc/Configuration.cpp Wed Oct 27 23:04:38 2004 @@ -71,8 +71,8 @@ std::ifstream F; }; - cl::opt DumpTokens("dump-tokens", cl::Optional, cl::Hidden, cl::init(false), - cl::desc("Dump lexical tokens (debug use only).")); + cl::opt DumpTokens("dump-tokens", cl::Optional, cl::Hidden, + cl::init(false), cl::desc("Dump lexical tokens (debug use only).")); struct Parser { @@ -157,7 +157,6 @@ switch (token) { case ARGS_SUBST: optList.push_back("%args%"); break; case DEFS_SUBST: optList.push_back("%defs%"); break; - case FORCE_SUBST: optList.push_back("%force%"); break; case IN_SUBST: optList.push_back("%in%"); break; case INCLS_SUBST: optList.push_back("%incls%"); break; case LIBS_SUBST: optList.push_back("%libs%"); break; @@ -349,8 +348,8 @@ confDat->Translator.clear(CompilerDriver::OUTPUT_IS_ASM_FLAG); break; default: - error(std::string("Expecting 'command', 'preprocesses', ") + - "'translates' or 'output' but found '" + + error(std::string("Expecting 'command', 'preprocesses', " + "'translates' or 'output' but found '") + ConfigLexerState.StringVal + "' instead"); break; } @@ -381,7 +380,7 @@ void parseAssignment() { switch (token) { - case VERSION: parseVersion(); break; + case VERSION_TOK: parseVersion(); break; case LANG: parseLang(); break; case PREPROCESSOR: parsePreprocessor(); break; case TRANSLATOR: parseTranslator(); break; @@ -407,14 +406,15 @@ } }; - void - ParseConfigData(InputProvider& provider, CompilerDriver::ConfigData& confDat) { - Parser p; - p.token = EOFTOK; - p.provider = &provider; - p.confDat = &confDat; - p.parseFile(); +void +ParseConfigData(InputProvider& provider, CompilerDriver::ConfigData& confDat) { + Parser p; + p.token = EOFTOK; + p.provider = &provider; + p.confDat = &confDat; + p.parseFile(); } + } CompilerDriver::ConfigData* From reid at x10sys.com Wed Oct 27 23:05:17 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 23:05:17 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvmc/CompilerDriver.cpp Message-ID: <200410280405.XAA08012@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvmc: CompilerDriver.cpp updated: 1.15 -> 1.16 --- Log message: Implement linking. --- Diffs of the changes: (+748 -737) Index: llvm/tools/llvmc/CompilerDriver.cpp diff -u llvm/tools/llvmc/CompilerDriver.cpp:1.15 llvm/tools/llvmc/CompilerDriver.cpp:1.16 --- llvm/tools/llvmc/CompilerDriver.cpp:1.15 Mon Sep 13 20:58:45 2004 +++ llvm/tools/llvmc/CompilerDriver.cpp Wed Oct 27 23:05:06 2004 @@ -26,812 +26,823 @@ namespace { - void WriteAction(CompilerDriver::Action* action ) { - std::cerr << action->program.c_str(); - std::vector::iterator I = action->args.begin(); - while (I != action->args.end()) { - std::cerr << " " + *I; - ++I; - } - std::cerr << "\n"; +void WriteAction(CompilerDriver::Action* action ) { + std::cerr << action->program.c_str(); + std::vector::iterator I = action->args.begin(); + while (I != action->args.end()) { + std::cerr << " " + *I; + ++I; } + std::cerr << "\n"; +} - void DumpAction(CompilerDriver::Action* action) { - std::cerr << "command = " << action->program.c_str(); - std::vector::iterator I = action->args.begin(); - while (I != action->args.end()) { - std::cerr << " " + *I; - ++I; - } - std::cerr << "\n"; - std::cerr << "flags = " << action->flags << "\n"; +void DumpAction(CompilerDriver::Action* action) { + std::cerr << "command = " << action->program.c_str(); + std::vector::iterator I = action->args.begin(); + while (I != action->args.end()) { + std::cerr << " " + *I; + ++I; } + std::cerr << "\n"; + std::cerr << "flags = " << action->flags << "\n"; +} - void DumpConfigData(CompilerDriver::ConfigData* cd, const std::string& type ){ - std::cerr << "Configuration Data For '" << cd->langName << "' (" << type - << ")\n"; - std::cerr << "PreProcessor: "; - DumpAction(&cd->PreProcessor); - std::cerr << "Translator: "; - DumpAction(&cd->Translator); - std::cerr << "Optimizer: "; - DumpAction(&cd->Optimizer); - std::cerr << "Assembler: "; - DumpAction(&cd->Assembler); - std::cerr << "Linker: "; - DumpAction(&cd->Linker); - } - - /// This specifies the passes to run for OPT_FAST_COMPILE (-O1) - /// which should reduce the volume of code and make compilation - /// faster. This is also safe on any llvm module. - static const char* DefaultFastCompileOptimizations[] = { - "-simplifycfg", "-mem2reg", "-instcombine" - }; - - class CompilerDriverImpl : public CompilerDriver { - /// @name Constructors - /// @{ - public: - CompilerDriverImpl(ConfigDataProvider& confDatProv ) - : cdp(&confDatProv) - , finalPhase(LINKING) - , optLevel(OPT_FAST_COMPILE) - , Flags(0) - , machine() - , LibraryPaths() - , TempDir() - , AdditionalArgs() - { - TempDir = sys::Path::GetTemporaryDirectory(); - sys::RemoveDirectoryOnSignal(TempDir); - AdditionalArgs.reserve(NUM_PHASES); - StringVector emptyVec; - for (unsigned i = 0; i < NUM_PHASES; ++i) - AdditionalArgs.push_back(emptyVec); - } +void DumpConfigData(CompilerDriver::ConfigData* cd, const std::string& type ){ + std::cerr << "Configuration Data For '" << cd->langName << "' (" << type + << ")\n"; + std::cerr << "PreProcessor: "; + DumpAction(&cd->PreProcessor); + std::cerr << "Translator: "; + DumpAction(&cd->Translator); + std::cerr << "Optimizer: "; + DumpAction(&cd->Optimizer); + std::cerr << "Assembler: "; + DumpAction(&cd->Assembler); + std::cerr << "Linker: "; + DumpAction(&cd->Linker); +} - virtual ~CompilerDriverImpl() { - cleanup(); - cdp = 0; - LibraryPaths.clear(); - AdditionalArgs.clear(); - } +/// This specifies the passes to run for OPT_FAST_COMPILE (-O1) +/// which should reduce the volume of code and make compilation +/// faster. This is also safe on any llvm module. +static const char* DefaultFastCompileOptimizations[] = { + "-simplifycfg", "-mem2reg", "-instcombine" +}; + +class CompilerDriverImpl : public CompilerDriver { +/// @name Constructors +/// @{ +public: + CompilerDriverImpl(ConfigDataProvider& confDatProv ) + : cdp(&confDatProv) + , finalPhase(LINKING) + , optLevel(OPT_FAST_COMPILE) + , Flags(0) + , machine() + , LibraryPaths() + , TempDir() + , AdditionalArgs() + { + TempDir = sys::Path::GetTemporaryDirectory(); + sys::RemoveDirectoryOnSignal(TempDir); + AdditionalArgs.reserve(NUM_PHASES); + StringVector emptyVec; + for (unsigned i = 0; i < NUM_PHASES; ++i) + AdditionalArgs.push_back(emptyVec); + } - /// @} - /// @name Methods - /// @{ - public: - virtual void setFinalPhase( Phases phase ) { - finalPhase = phase; - } + virtual ~CompilerDriverImpl() { + cleanup(); + cdp = 0; + LibraryPaths.clear(); + IncludePaths.clear(); + Defines.clear(); + TempDir.clear(); + AdditionalArgs.clear(); + fOptions.clear(); + MOptions.clear(); + WOptions.clear(); + } - virtual void setOptimization( OptimizationLevels level ) { - optLevel = level; - } +/// @} +/// @name Methods +/// @{ +public: + virtual void setFinalPhase( Phases phase ) { + finalPhase = phase; + } - virtual void setDriverFlags( unsigned flags ) { - Flags = flags & DRIVER_FLAGS_MASK; - } + virtual void setOptimization( OptimizationLevels level ) { + optLevel = level; + } - virtual void setOutputMachine( const std::string& machineName ) { - machine = machineName; - } + virtual void setDriverFlags( unsigned flags ) { + Flags = flags & DRIVER_FLAGS_MASK; + } - virtual void setPhaseArgs(Phases phase, const StringVector& opts) { - assert(phase <= LINKING && phase >= PREPROCESSING); - AdditionalArgs[phase] = opts; - } + virtual void setOutputMachine( const std::string& machineName ) { + machine = machineName; + } - virtual void setIncludePaths(const StringVector& paths) { - StringVector::const_iterator I = paths.begin(); - StringVector::const_iterator E = paths.end(); - while (I != E) { - sys::Path tmp; - tmp.set_directory(*I); - IncludePaths.push_back(tmp); - ++I; - } - } + virtual void setPhaseArgs(Phases phase, const StringVector& opts) { + assert(phase <= LINKING && phase >= PREPROCESSING); + AdditionalArgs[phase] = opts; + } - virtual void setSymbolDefines(const StringVector& defs) { - Defines = defs; - } + virtual void setIncludePaths(const StringVector& paths) { + StringVector::const_iterator I = paths.begin(); + StringVector::const_iterator E = paths.end(); + while (I != E) { + sys::Path tmp; + tmp.set_directory(*I); + IncludePaths.push_back(tmp); + ++I; + } + } - virtual void setLibraryPaths(const StringVector& paths) { - StringVector::const_iterator I = paths.begin(); - StringVector::const_iterator E = paths.end(); - while (I != E) { - sys::Path tmp; - tmp.set_directory(*I); - LibraryPaths.push_back(tmp); - ++I; - } - } + virtual void setSymbolDefines(const StringVector& defs) { + Defines = defs; + } - virtual void addLibraryPath( const sys::Path& libPath ) { - LibraryPaths.push_back(libPath); - } + virtual void setLibraryPaths(const StringVector& paths) { + StringVector::const_iterator I = paths.begin(); + StringVector::const_iterator E = paths.end(); + while (I != E) { + sys::Path tmp; + tmp.set_directory(*I); + LibraryPaths.push_back(tmp); + ++I; + } + } - virtual void setfPassThrough(const StringVector& fOpts) { - fOptions = fOpts; - } + virtual void addLibraryPath( const sys::Path& libPath ) { + LibraryPaths.push_back(libPath); + } - /// @brief Set the list of -M options to be passed through - virtual void setMPassThrough(const StringVector& MOpts) { - MOptions = MOpts; - } + virtual void setfPassThrough(const StringVector& fOpts) { + fOptions = fOpts; + } - /// @brief Set the list of -W options to be passed through - virtual void setWPassThrough(const StringVector& WOpts) { - WOptions = WOpts; - } - /// @} - /// @name Functions - /// @{ - private: - bool isSet(DriverFlags flag) { - return 0 != ((flag & DRIVER_FLAGS_MASK) & Flags); - } + /// @brief Set the list of -M options to be passed through + virtual void setMPassThrough(const StringVector& MOpts) { + MOptions = MOpts; + } - void cleanup() { - if (!isSet(KEEP_TEMPS_FLAG)) { - if (TempDir.is_directory() && TempDir.writable()) - TempDir.destroy_directory(/*remove_contents=*/true); - } else { - std::cout << "Temporary files are in " << TempDir.get() << "\n"; - } - } + /// @brief Set the list of -W options to be passed through + virtual void setWPassThrough(const StringVector& WOpts) { + WOptions = WOpts; + } +/// @} +/// @name Functions +/// @{ +private: + bool isSet(DriverFlags flag) { + return 0 != ((flag & DRIVER_FLAGS_MASK) & Flags); + } - sys::Path MakeTempFile(const std::string& basename, const std::string& suffix ) { - sys::Path result(TempDir); - if (!result.append_file(basename)) - throw basename + ": can't use this file name"; - if (!result.append_suffix(suffix)) - throw suffix + ": can't use this file suffix"; - return result; - } + void cleanup() { + if (!isSet(KEEP_TEMPS_FLAG)) { + if (TempDir.is_directory() && TempDir.writable()) + TempDir.destroy_directory(/*remove_contents=*/true); + } else { + std::cout << "Temporary files are in " << TempDir.get() << "\n"; + } + } - Action* GetAction(ConfigData* cd, - const sys::Path& input, - const sys::Path& output, - Phases phase) - { - Action* pat = 0; ///< The pattern/template for the action - Action* action = new Action; ///< The actual action to execute - - // Get the action pattern - switch (phase) { - case PREPROCESSING: pat = &cd->PreProcessor; break; - case TRANSLATION: pat = &cd->Translator; break; - case OPTIMIZATION: pat = &cd->Optimizer; break; - case ASSEMBLY: pat = &cd->Assembler; break; - case LINKING: pat = &cd->Linker; break; + sys::Path MakeTempFile(const std::string& basename, + const std::string& suffix ) { + sys::Path result(TempDir); + if (!result.append_file(basename)) + throw basename + ": can't use this file name"; + if (!result.append_suffix(suffix)) + throw suffix + ": can't use this file suffix"; + return result; + } + + Action* GetAction(ConfigData* cd, + const sys::Path& input, + const sys::Path& output, + Phases phase) + { + Action* pat = 0; ///< The pattern/template for the action + Action* action = new Action; ///< The actual action to execute + + // Get the action pattern + switch (phase) { + case PREPROCESSING: pat = &cd->PreProcessor; break; + case TRANSLATION: pat = &cd->Translator; break; + case OPTIMIZATION: pat = &cd->Optimizer; break; + case ASSEMBLY: pat = &cd->Assembler; break; + case LINKING: pat = &cd->Linker; break; + default: + assert(!"Invalid driver phase!"); + break; + } + assert(pat != 0 && "Invalid command pattern"); + + // Copy over some pattern things that don't need to change + action->program = pat->program; + action->flags = pat->flags; + + // Do the substitutions from the pattern to the actual + StringVector::iterator PI = pat->args.begin(); + StringVector::iterator PE = pat->args.end(); + while (PI != PE) { + if ((*PI)[0] == '%' && PI->length() >2) { + bool found = true; + switch ((*PI)[1]) { + case 'a': + if (*PI == "%args%") { + if (AdditionalArgs.size() > unsigned(phase)) + if (!AdditionalArgs[phase].empty()) { + // Get specific options for each kind of action type + StringVector& addargs = AdditionalArgs[phase]; + // Add specific options for each kind of action type + action->args.insert(action->args.end(), addargs.begin(), + addargs.end()); + } + } else + found = false; + break; + case 'd': + if (*PI == "%defs%") { + StringVector::iterator I = Defines.begin(); + StringVector::iterator E = Defines.end(); + while (I != E) { + action->args.push_back( std::string("-D") + *I); + ++I; + } + } else + found = false; + break; + case 'f': + if (*PI == "%fOpts%") { + action->args.insert(action->args.end(), fOptions.begin(), + fOptions.end()); + } else + found = false; + break; + case 'i': + if (*PI == "%in%") { + action->args.push_back(input.get()); + } else if (*PI == "%incls%") { + PathVector::iterator I = IncludePaths.begin(); + PathVector::iterator E = IncludePaths.end(); + while (I != E) { + action->args.push_back( std::string("-I") + I->get() ); + ++I; + } + } else + found = false; + break; + case 'l': + if (*PI == "%libs%") { + PathVector::iterator I = LibraryPaths.begin(); + PathVector::iterator E = LibraryPaths.end(); + while (I != E) { + action->args.push_back( std::string("-L") + I->get() ); + ++I; + } + } else + found = false; + break; + case 'o': + if (*PI == "%out%") { + action->args.push_back(output.get()); + } else if (*PI == "%opt%") { + if (!isSet(EMIT_RAW_FLAG)) { + if (cd->opts.size() > static_cast(optLevel) && + !cd->opts[optLevel].empty()) + action->args.insert(action->args.end(), + cd->opts[optLevel].begin(), + cd->opts[optLevel].end()); + else + throw std::string("Optimization options for level ") + + utostr(unsigned(optLevel)) + " were not specified"; + } + } else + found = false; + break; + case 's': + if (*PI == "%stats%") { + if (isSet(SHOW_STATS_FLAG)) + action->args.push_back("-stats"); + } else + found = false; + break; + case 't': + if (*PI == "%target%") { + action->args.push_back(std::string("-march=") + machine); + } else if (*PI == "%time%") { + if (isSet(TIME_PASSES_FLAG)) + action->args.push_back("-time-passes"); + } else + found = false; + break; + case 'v': + if (*PI == "%verbose%") { + if (isSet(VERBOSE_FLAG)) + action->args.push_back("-v"); + } else + found = false; + break; + case 'M': + if (*PI == "%Mopts") { + action->args.insert(action->args.end(), MOptions.begin(), + MOptions.end()); + } else + found = false; + break; + case 'W': + if (*PI == "%Wopts") { + action->args.insert(action->args.end(), WOptions.begin(), + WOptions.end()); + } else + found = false; + break; default: - assert(!"Invalid driver phase!"); + found = false; break; } - assert(pat != 0 && "Invalid command pattern"); - - // Copy over some pattern things that don't need to change - action->program = pat->program; - action->flags = pat->flags; - - // Do the substitutions from the pattern to the actual - StringVector::iterator PI = pat->args.begin(); - StringVector::iterator PE = pat->args.end(); - while (PI != PE) { - if ((*PI)[0] == '%' && PI->length() >2) { - bool found = true; - switch ((*PI)[1]) { - case 'a': - if (*PI == "%args%") { - if (AdditionalArgs.size() > unsigned(phase)) - if (!AdditionalArgs[phase].empty()) { - // Get specific options for each kind of action type - StringVector& addargs = AdditionalArgs[phase]; - // Add specific options for each kind of action type - action->args.insert(action->args.end(), addargs.begin(), addargs.end()); - } - } else - found = false; - break; - case 'd': - if (*PI == "%defs%") { - StringVector::iterator I = Defines.begin(); - StringVector::iterator E = Defines.end(); - while (I != E) { - action->args.push_back( std::string("-D") + *I); - ++I; - } - } else - found = false; - break; - case 'f': - if (*PI == "%force%") { - if (isSet(FORCE_FLAG)) - action->args.push_back("-f"); - } else if (*PI == "%fOpts%") { - action->args.insert(action->args.end(), fOptions.begin(), - fOptions.end()); - } else - found = false; - break; - case 'i': - if (*PI == "%in%") { - action->args.push_back(input.get()); - } else if (*PI == "%incls%") { - PathVector::iterator I = IncludePaths.begin(); - PathVector::iterator E = IncludePaths.end(); - while (I != E) { - action->args.push_back( std::string("-I") + I->get() ); - ++I; - } - } else - found = false; - break; - case 'l': - if (*PI == "%libs%") { - PathVector::iterator I = LibraryPaths.begin(); - PathVector::iterator E = LibraryPaths.end(); - while (I != E) { - action->args.push_back( std::string("-L") + I->get() ); - ++I; - } - } else - found = false; - break; - case 'o': - if (*PI == "%out%") { - action->args.push_back(output.get()); - } else if (*PI == "%opt%") { - if (!isSet(EMIT_RAW_FLAG)) { - if (cd->opts.size() > static_cast(optLevel) && - !cd->opts[optLevel].empty()) - action->args.insert(action->args.end(), cd->opts[optLevel].begin(), - cd->opts[optLevel].end()); - else - throw std::string("Optimization options for level ") + - utostr(unsigned(optLevel)) + " were not specified"; - } - } else - found = false; - break; - case 's': - if (*PI == "%stats%") { - if (isSet(SHOW_STATS_FLAG)) - action->args.push_back("-stats"); - } else - found = false; - break; - case 't': - if (*PI == "%target%") { - action->args.push_back(std::string("-march=") + machine); - } else if (*PI == "%time%") { - if (isSet(TIME_PASSES_FLAG)) - action->args.push_back("-time-passes"); - } else - found = false; - break; - case 'v': - if (*PI == "%verbose%") { - if (isSet(VERBOSE_FLAG)) - action->args.push_back("-v"); - } else - found = false; - break; - case 'M': - if (*PI == "%Mopts") { - action->args.insert(action->args.end(), MOptions.begin(), - MOptions.end()); - } else - found = false; - break; - case 'W': - if (*PI == "%Wopts") { - action->args.insert(action->args.end(), WOptions.begin(), - WOptions.end()); - } else - found = false; - break; - default: - found = false; - break; - } - if (!found) { - // Did it even look like a substitution? - if (PI->length()>1 && (*PI)[0] == '%' && - (*PI)[PI->length()-1] == '%') { - throw std::string("Invalid substitution token: '") + *PI + - "' for command '" + pat->program.get() + "'"; - } else { - // It's not a legal substitution, just pass it through - action->args.push_back(*PI); - } - } + if (!found) { + // Did it even look like a substitution? + if (PI->length()>1 && (*PI)[0] == '%' && + (*PI)[PI->length()-1] == '%') { + throw std::string("Invalid substitution token: '") + *PI + + "' for command '" + pat->program.get() + "'"; } else { - // Its not a substitution, just put it in the action + // It's not a legal substitution, just pass it through action->args.push_back(*PI); } - PI++; } - - // Finally, we're done - return action; + } else { + // Its not a substitution, just put it in the action + action->args.push_back(*PI); } + PI++; + } - bool DoAction(Action*action) { - assert(action != 0 && "Invalid Action!"); - if (isSet(VERBOSE_FLAG)) - WriteAction(action); - if (!isSet(DRY_RUN_FLAG)) { - action->program = sys::Program::FindProgramByName(action->program.get()); - if (action->program.is_empty()) - throw std::string("Can't find program '") + action->program.get() + "'"; - - // Invoke the program - if (isSet(TIME_ACTIONS_FLAG)) { - Timer timer(action->program.get()); - timer.startTimer(); - int resultCode = sys::Program::ExecuteAndWait(action->program,action->args); - timer.stopTimer(); - timer.print(timer,std::cerr); - return resultCode == 0; - } - else - return 0 == sys::Program::ExecuteAndWait(action->program, action->args); - } - return true; - } + // Finally, we're done + return action; + } - /// This method tries various variants of a linkage item's file - /// name to see if it can find an appropriate file to link with - /// in the directory specified. - llvm::sys::Path GetPathForLinkageItem(const std::string& link_item, - const sys::Path& dir, - bool native = false) { - sys::Path fullpath(dir); - fullpath.append_file(link_item); - if (native) { - fullpath.append_suffix("a"); - } else { - fullpath.append_suffix("bc"); - if (fullpath.readable()) - return fullpath; - fullpath.elide_suffix(); - fullpath.append_suffix("o"); - if (fullpath.readable()) - return fullpath; - fullpath = dir; - fullpath.append_file(std::string("lib") + link_item); - fullpath.append_suffix("a"); - if (fullpath.readable()) - return fullpath; - fullpath.elide_suffix(); - fullpath.append_suffix("so"); - if (fullpath.readable()) - return fullpath; - } + bool DoAction(Action*action) { + assert(action != 0 && "Invalid Action!"); + if (isSet(VERBOSE_FLAG)) + WriteAction(action); + if (!isSet(DRY_RUN_FLAG)) { + sys::Path progpath = sys::Program::FindProgramByName( + action->program.get()); + if (progpath.is_empty()) + throw std::string("Can't find program '"+progpath.get()+"'"); + else if (progpath.executable()) + action->program = progpath; + else + throw std::string("Program '"+progpath.get()+"' is not executable."); + + // Invoke the program + if (isSet(TIME_ACTIONS_FLAG)) { + Timer timer(action->program.get()); + timer.startTimer(); + int resultCode = + sys::Program::ExecuteAndWait(action->program,action->args); + timer.stopTimer(); + timer.print(timer,std::cerr); + return resultCode == 0; + } + else + return 0 == + sys::Program::ExecuteAndWait(action->program, action->args); + } + return true; + } - // Didn't find one. - fullpath.clear(); + /// This method tries various variants of a linkage item's file + /// name to see if it can find an appropriate file to link with + /// in the directory specified. + llvm::sys::Path GetPathForLinkageItem(const std::string& link_item, + const sys::Path& dir, + bool native = false) { + sys::Path fullpath(dir); + fullpath.append_file(link_item); + if (native) { + fullpath.append_suffix("a"); + } else { + fullpath.append_suffix("bc"); + if (fullpath.readable()) return fullpath; - } + fullpath.elide_suffix(); + fullpath.append_suffix("o"); + if (fullpath.readable()) + return fullpath; + fullpath = dir; + fullpath.append_file(std::string("lib") + link_item); + fullpath.append_suffix("a"); + if (fullpath.readable()) + return fullpath; + fullpath.elide_suffix(); + fullpath.append_suffix("so"); + if (fullpath.readable()) + return fullpath; + } - /// This method processes a linkage item. The item could be a - /// Bytecode file needing translation to native code and that is - /// dependent on other bytecode libraries, or a native code - /// library that should just be linked into the program. - bool ProcessLinkageItem(const llvm::sys::Path& link_item, - SetVector& set, - std::string& err) { - // First, see if the unadorned file name is not readable. If so, - // we must track down the file in the lib search path. - sys::Path fullpath; - if (!link_item.readable()) { - // First, look for the library using the -L arguments specified - // on the command line. - PathVector::iterator PI = LibraryPaths.begin(); - PathVector::iterator PE = LibraryPaths.end(); - while (PI != PE && fullpath.is_empty()) { - fullpath = GetPathForLinkageItem(link_item.get(),*PI); - ++PI; - } + // Didn't find one. + fullpath.clear(); + return fullpath; + } - // If we didn't find the file in any of the library search paths - // so we have to bail. No where else to look. - if (fullpath.is_empty()) { - err = std::string("Can't find linkage item '") + link_item.get() + "'"; - return false; - } - } else { - fullpath = link_item; - } + /// This method processes a linkage item. The item could be a + /// Bytecode file needing translation to native code and that is + /// dependent on other bytecode libraries, or a native code + /// library that should just be linked into the program. + bool ProcessLinkageItem(const llvm::sys::Path& link_item, + SetVector& set, + std::string& err) { + // First, see if the unadorned file name is not readable. If so, + // we must track down the file in the lib search path. + sys::Path fullpath; + if (!link_item.readable()) { + // First, look for the library using the -L arguments specified + // on the command line. + PathVector::iterator PI = LibraryPaths.begin(); + PathVector::iterator PE = LibraryPaths.end(); + while (PI != PE && fullpath.is_empty()) { + fullpath = GetPathForLinkageItem(link_item.get(),*PI); + ++PI; + } + + // If we didn't find the file in any of the library search paths + // so we have to bail. No where else to look. + if (fullpath.is_empty()) { + err = + std::string("Can't find linkage item '") + link_item.get() + "'"; + return false; + } + } else { + fullpath = link_item; + } - // If we got here fullpath is the path to the file, and its readable. - set.insert(fullpath); + // If we got here fullpath is the path to the file, and its readable. + set.insert(fullpath); - // If its an LLVM bytecode file ... - if (fullpath.is_bytecode_file()) { - // Process the dependent libraries recursively - Module::LibraryListType modlibs; - if (GetBytecodeDependentLibraries(fullpath.get(),modlibs)) { - // Traverse the dependent libraries list - Module::lib_iterator LI = modlibs.begin(); - Module::lib_iterator LE = modlibs.end(); - while ( LI != LE ) { - if (!ProcessLinkageItem(sys::Path(*LI),set,err)) { - if (err.empty()) { - err = std::string("Library '") + *LI + - "' is not valid for linking but is required by file '" + - fullpath.get() + "'"; - } else { - err += " which is required by file '" + fullpath.get() + "'"; - } - return false; - } - ++LI; + // If its an LLVM bytecode file ... + if (fullpath.is_bytecode_file()) { + // Process the dependent libraries recursively + Module::LibraryListType modlibs; + if (GetBytecodeDependentLibraries(fullpath.get(),modlibs)) { + // Traverse the dependent libraries list + Module::lib_iterator LI = modlibs.begin(); + Module::lib_iterator LE = modlibs.end(); + while ( LI != LE ) { + if (!ProcessLinkageItem(sys::Path(*LI),set,err)) { + if (err.empty()) { + err = std::string("Library '") + *LI + + "' is not valid for linking but is required by file '" + + fullpath.get() + "'"; + } else { + err += " which is required by file '" + fullpath.get() + "'"; } - } else if (err.empty()) { - err = std::string("The dependent libraries could not be extracted from '") - + fullpath.get(); return false; } + ++LI; } - return true; + } else if (err.empty()) { + err = std::string( + "The dependent libraries could not be extracted from '") + + fullpath.get(); + return false; } + } + return true; + } - /// @} - /// @name Methods - /// @{ - public: - virtual int execute(const InputList& InpList, const sys::Path& Output ) { - try { - // Echo the configuration of options if we're running verbose - if (isSet(DEBUG_FLAG)) { - std::cerr << "Compiler Driver Options:\n"; - std::cerr << "DryRun = " << isSet(DRY_RUN_FLAG) << "\n"; - std::cerr << "Verbose = " << isSet(VERBOSE_FLAG) << " \n"; - std::cerr << "TimeActions = " << isSet(TIME_ACTIONS_FLAG) << "\n"; - std::cerr << "TimePasses = " << isSet(TIME_PASSES_FLAG) << "\n"; - std::cerr << "ShowStats = " << isSet(SHOW_STATS_FLAG) << "\n"; - std::cerr << "EmitRawCode = " << isSet(EMIT_RAW_FLAG) << "\n"; - std::cerr << "EmitNativeCode = " << isSet(EMIT_NATIVE_FLAG) << "\n"; - std::cerr << "ForceOutput = " << isSet(FORCE_FLAG) << "\n"; - std::cerr << "KeepTemps = " << isSet(KEEP_TEMPS_FLAG) << "\n"; - std::cerr << "OutputMachine = " << machine << "\n"; - InputList::const_iterator I = InpList.begin(); - while ( I != InpList.end() ) { - std::cerr << "Input: " << I->first.get() << "(" << I->second << ")\n"; - ++I; - } - std::cerr << "Output: " << Output.get() << "\n"; - } +/// @} +/// @name Methods +/// @{ +public: + virtual int execute(const InputList& InpList, const sys::Path& Output ) { + try { + // Echo the configuration of options if we're running verbose + if (isSet(DEBUG_FLAG)) { + std::cerr << "Compiler Driver Options:\n"; + std::cerr << "DryRun = " << isSet(DRY_RUN_FLAG) << "\n"; + std::cerr << "Verbose = " << isSet(VERBOSE_FLAG) << " \n"; + std::cerr << "TimeActions = " << isSet(TIME_ACTIONS_FLAG) << "\n"; + std::cerr << "TimePasses = " << isSet(TIME_PASSES_FLAG) << "\n"; + std::cerr << "ShowStats = " << isSet(SHOW_STATS_FLAG) << "\n"; + std::cerr << "EmitRawCode = " << isSet(EMIT_RAW_FLAG) << "\n"; + std::cerr << "EmitNativeCode = " << isSet(EMIT_NATIVE_FLAG) << "\n"; + std::cerr << "KeepTemps = " << isSet(KEEP_TEMPS_FLAG) << "\n"; + std::cerr << "OutputMachine = " << machine << "\n"; + InputList::const_iterator I = InpList.begin(); + while ( I != InpList.end() ) { + std::cerr << "Input: " << I->first.get() << "(" << I->second + << ")\n"; + ++I; + } + std::cerr << "Output: " << Output.get() << "\n"; + } - // If there's no input, we're done. - if (InpList.empty()) - throw std::string("Nothing to compile."); - - // If they are asking for linking and didn't provide an output - // file then its an error (no way for us to "make up" a meaningful - // file name based on the various linker input files). - if (finalPhase == LINKING && Output.is_empty()) + // If there's no input, we're done. + if (InpList.empty()) + throw std::string("Nothing to compile."); + + // If they are asking for linking and didn't provide an output + // file then its an error (no way for us to "make up" a meaningful + // file name based on the various linker input files). + if (finalPhase == LINKING && Output.is_empty()) + throw std::string( + "An output file name must be specified for linker output"); + + // If they are not asking for linking, provided an output file and + // there is more than one input file, its an error + if (finalPhase != LINKING && !Output.is_empty() && InpList.size() > 1) + throw std::string("An output file name cannot be specified ") + + "with more than one input file name when not linking"; + + // This vector holds all the resulting actions of the following loop. + std::vector actions; + + /// PRE-PROCESSING / TRANSLATION / OPTIMIZATION / ASSEMBLY phases + // for each input item + SetVector LinkageItems; + std::vector LibFiles; + InputList::const_iterator I = InpList.begin(); + while ( I != InpList.end() ) { + // Get the suffix of the file name + const std::string& ftype = I->second; + + // If its a library, bytecode file, or object file, save + // it for linking below and short circuit the + // pre-processing/translation/assembly phases + if (ftype.empty() || ftype == "o" || ftype == "bc" || ftype=="a") { + // We shouldn't get any of these types of files unless we're + // later going to link. Enforce this limit now. + if (finalPhase != LINKING) { throw std::string( - "An output file name must be specified for linker output"); - - // If they are not asking for linking, provided an output file and - // there is more than one input file, its an error - if (finalPhase != LINKING && !Output.is_empty() && - InpList.size() > 1) - throw std::string("An output file name cannot be specified ") + - "with more than one input file name when not linking"; - - // This vector holds all the resulting actions of the following loop. - std::vector actions; - - /// PRE-PROCESSING / TRANSLATION / OPTIMIZATION / ASSEMBLY phases - // for each input item - SetVector LinkageItems; - std::vector LibFiles; - sys::Path OutFile(Output); - InputList::const_iterator I = InpList.begin(); - while ( I != InpList.end() ) { - // Get the suffix of the file name - const std::string& ftype = I->second; - - // If its a library, bytecode file, or object file, save - // it for linking below and short circuit the - // pre-processing/translation/assembly phases - if (ftype.empty() || ftype == "o" || ftype == "bc" || ftype=="a") { - // We shouldn't get any of these types of files unless we're - // later going to link. Enforce this limit now. - if (finalPhase != LINKING) { - throw std::string( - "Pre-compiled objects found but linking not requested"); - } - if (ftype.empty()) - LibFiles.push_back(I->first.get()); - else - LinkageItems.insert(I->first); - ++I; continue; // short circuit remainder of loop - } + "Pre-compiled objects found but linking not requested"); + } + if (ftype.empty()) + LibFiles.push_back(I->first.get()); + else + LinkageItems.insert(I->first); + ++I; continue; // short circuit remainder of loop + } - // At this point, we know its something we need to translate - // and/or optimize. See if we can get the configuration data - // for this kind of file. - ConfigData* cd = cdp->ProvideConfigData(I->second); - if (cd == 0) - throw std::string("Files of type '") + I->second + - "' are not recognized."; - if (isSet(DEBUG_FLAG)) - DumpConfigData(cd,I->second); - - // Initialize the input file - sys::Path InFile(I->first); - - // PRE-PROCESSING PHASE - Action& action = cd->PreProcessor; - - // Get the preprocessing action, if needed, or error if appropriate - if (!action.program.is_empty()) { - if (action.isSet(REQUIRED_FLAG) || finalPhase == PREPROCESSING) { - if (finalPhase == PREPROCESSING) { - if (OutFile.is_empty()) { - OutFile = I->first; - OutFile.append_suffix("E"); - } - actions.push_back(GetAction(cd,InFile,OutFile,PREPROCESSING)); - } else { - sys::Path TempFile(MakeTempFile(I->first.get(),"E")); - actions.push_back(GetAction(cd,InFile,TempFile,PREPROCESSING)); - InFile = TempFile; - } - } - } else if (finalPhase == PREPROCESSING) { - throw cd->langName + " does not support pre-processing"; - } else if (action.isSet(REQUIRED_FLAG)) { - throw std::string("Don't know how to pre-process ") + - cd->langName + " files"; + // At this point, we know its something we need to translate + // and/or optimize. See if we can get the configuration data + // for this kind of file. + ConfigData* cd = cdp->ProvideConfigData(I->second); + if (cd == 0) + throw std::string("Files of type '") + I->second + + "' are not recognized."; + if (isSet(DEBUG_FLAG)) + DumpConfigData(cd,I->second); + + // Initialize the input and output files + sys::Path InFile(I->first); + sys::Path OutFile(I->first.get_basename()); + + // PRE-PROCESSING PHASE + Action& action = cd->PreProcessor; + + // Get the preprocessing action, if needed, or error if appropriate + if (!action.program.is_empty()) { + if (action.isSet(REQUIRED_FLAG) || finalPhase == PREPROCESSING) { + if (finalPhase == PREPROCESSING) { + OutFile.append_suffix("E"); + actions.push_back(GetAction(cd,InFile,OutFile,PREPROCESSING)); + } else { + sys::Path TempFile(MakeTempFile(I->first.get_basename(),"E")); + actions.push_back(GetAction(cd,InFile,TempFile, + PREPROCESSING)); + InFile = TempFile; } + } + } else if (finalPhase == PREPROCESSING) { + throw cd->langName + " does not support pre-processing"; + } else if (action.isSet(REQUIRED_FLAG)) { + throw std::string("Don't know how to pre-process ") + + cd->langName + " files"; + } - // Short-circuit remaining actions if all they want is pre-processing - if (finalPhase == PREPROCESSING) { ++I; continue; }; - - /// TRANSLATION PHASE - action = cd->Translator; - - // Get the translation action, if needed, or error if appropriate - if (!action.program.is_empty()) { - if (action.isSet(REQUIRED_FLAG) || finalPhase == TRANSLATION) { - if (finalPhase == TRANSLATION) { - if (OutFile.is_empty()) { - OutFile = I->first; - OutFile.append_suffix("o"); - } - actions.push_back(GetAction(cd,InFile,OutFile,TRANSLATION)); - } else { - sys::Path TempFile(MakeTempFile(I->first.get(),"trans")); - actions.push_back(GetAction(cd,InFile,TempFile,TRANSLATION)); - InFile = TempFile; - } - - // ll -> bc Helper - if (action.isSet(OUTPUT_IS_ASM_FLAG)) { - /// The output of the translator is an LLVM Assembly program - /// We need to translate it to bytecode - Action* action = new Action(); - action->program.set_file("llvm-as"); - action->args.push_back(InFile.get()); - action->args.push_back("-o"); - InFile.append_suffix("bc"); - action->args.push_back(InFile.get()); - actions.push_back(action); - } - } - } else if (finalPhase == TRANSLATION) { - throw cd->langName + " does not support translation"; - } else if (action.isSet(REQUIRED_FLAG)) { - throw std::string("Don't know how to translate ") + - cd->langName + " files"; + // Short-circuit remaining actions if all they want is + // pre-processing + if (finalPhase == PREPROCESSING) { ++I; continue; }; + + /// TRANSLATION PHASE + action = cd->Translator; + + // Get the translation action, if needed, or error if appropriate + if (!action.program.is_empty()) { + if (action.isSet(REQUIRED_FLAG) || finalPhase == TRANSLATION) { + if (finalPhase == TRANSLATION) { + OutFile.append_suffix("o"); + actions.push_back(GetAction(cd,InFile,OutFile,TRANSLATION)); + } else { + sys::Path TempFile(MakeTempFile(I->first.get_basename(),"trans")); + actions.push_back(GetAction(cd,InFile,TempFile,TRANSLATION)); + InFile = TempFile; + } + + // ll -> bc Helper + if (action.isSet(OUTPUT_IS_ASM_FLAG)) { + /// The output of the translator is an LLVM Assembly program + /// We need to translate it to bytecode + Action* action = new Action(); + action->program.set_file("llvm-as"); + action->args.push_back(InFile.get()); + action->args.push_back("-o"); + InFile.append_suffix("bc"); + action->args.push_back(InFile.get()); + actions.push_back(action); } + } + } else if (finalPhase == TRANSLATION) { + throw cd->langName + " does not support translation"; + } else if (action.isSet(REQUIRED_FLAG)) { + throw std::string("Don't know how to translate ") + + cd->langName + " files"; + } - // Short-circuit remaining actions if all they want is translation - if (finalPhase == TRANSLATION) { ++I; continue; } + // Short-circuit remaining actions if all they want is translation + if (finalPhase == TRANSLATION) { ++I; continue; } - /// OPTIMIZATION PHASE - action = cd->Optimizer; + /// OPTIMIZATION PHASE + action = cd->Optimizer; - // Get the optimization action, if needed, or error if appropriate - if (!isSet(EMIT_RAW_FLAG)) { - if (!action.program.is_empty()) { - if (action.isSet(REQUIRED_FLAG) || finalPhase == OPTIMIZATION) { - if (finalPhase == OPTIMIZATION) { - if (OutFile.is_empty()) { - OutFile = I->first; - OutFile.append_suffix("o"); - } - actions.push_back(GetAction(cd,InFile,OutFile,OPTIMIZATION)); - } else { - sys::Path TempFile(MakeTempFile(I->first.get(),"opt")); - actions.push_back(GetAction(cd,InFile,TempFile,OPTIMIZATION)); - InFile = TempFile; - } - // ll -> bc Helper - if (action.isSet(OUTPUT_IS_ASM_FLAG)) { - /// The output of the optimizer is an LLVM Assembly program - /// We need to translate it to bytecode with llvm-as - Action* action = new Action(); - action->program.set_file("llvm-as"); - action->args.push_back(InFile.get()); - action->args.push_back("-f"); - action->args.push_back("-o"); - InFile.append_suffix("bc"); - action->args.push_back(InFile.get()); - actions.push_back(action); - } - } - } else if (finalPhase == OPTIMIZATION) { - throw cd->langName + " does not support optimization"; - } else if (action.isSet(REQUIRED_FLAG)) { - throw std::string("Don't know how to optimize ") + - cd->langName + " files"; + // Get the optimization action, if needed, or error if appropriate + if (!isSet(EMIT_RAW_FLAG)) { + if (!action.program.is_empty()) { + if (action.isSet(REQUIRED_FLAG) || finalPhase == OPTIMIZATION) { + if (finalPhase == OPTIMIZATION) { + OutFile.append_suffix("o"); + actions.push_back(GetAction(cd,InFile,OutFile,OPTIMIZATION)); + } else { + sys::Path TempFile(MakeTempFile(I->first.get_basename(),"opt")); + actions.push_back(GetAction(cd,InFile,TempFile,OPTIMIZATION)); + InFile = TempFile; } - } - - // Short-circuit remaining actions if all they want is optimization - if (finalPhase == OPTIMIZATION) { ++I; continue; } - - /// ASSEMBLY PHASE - action = cd->Assembler; - - if (finalPhase == ASSEMBLY) { - if (isSet(EMIT_NATIVE_FLAG)) { - // Use llc to get the native assembly file + // ll -> bc Helper + if (action.isSet(OUTPUT_IS_ASM_FLAG)) { + /// The output of the optimizer is an LLVM Assembly program + /// We need to translate it to bytecode with llvm-as Action* action = new Action(); - action->program.set_file("llc"); + action->program.set_file("llvm-as"); action->args.push_back(InFile.get()); action->args.push_back("-f"); action->args.push_back("-o"); - if (OutFile.is_empty()) { - OutFile = I->first; - OutFile.append_suffix("s"); - } - action->args.push_back(OutFile.get()); - } else { - // Just convert back to llvm assembly with llvm-dis - Action* action = new Action(); - action->program.set_file("llvm-dis"); + InFile.append_suffix("bc"); action->args.push_back(InFile.get()); - action->args.push_back("-f"); - action->args.push_back("-o"); - action->args.push_back(OutFile.get()); actions.push_back(action); } - - // Short circuit the rest of the loop, we don't want to link - ++I; - continue; } + } else if (finalPhase == OPTIMIZATION) { + throw cd->langName + " does not support optimization"; + } else if (action.isSet(REQUIRED_FLAG)) { + throw std::string("Don't know how to optimize ") + + cd->langName + " files"; + } + } - // Register the result of the actions as a link candidate - LinkageItems.insert(InFile); + // Short-circuit remaining actions if all they want is optimization + if (finalPhase == OPTIMIZATION) { ++I; continue; } - // Go to next file to be processed - ++I; - } // end while loop over each input file - - /// RUN THE COMPILATION ACTIONS - std::vector::iterator AI = actions.begin(); - std::vector::iterator AE = actions.end(); - while (AI != AE) { - if (!DoAction(*AI)) - throw std::string("Action failed"); - AI++; + /// ASSEMBLY PHASE + action = cd->Assembler; + + if (finalPhase == ASSEMBLY) { + if (isSet(EMIT_NATIVE_FLAG)) { + // Use llc to get the native assembly file + Action* action = new Action(); + action->program.set_file("llc"); + action->args.push_back(InFile.get()); + action->args.push_back("-f"); + action->args.push_back("-o"); + OutFile.append_suffix("s"); + action->args.push_back(OutFile.get()); + } else { + // Just convert back to llvm assembly with llvm-dis + Action* action = new Action(); + action->program.set_file("llvm-dis"); + action->args.push_back(InFile.get()); + action->args.push_back("-f"); + action->args.push_back("-o"); + OutFile.append_suffix("ll"); + action->args.push_back(OutFile.get()); + actions.push_back(action); } - /// LINKING PHASE - if (finalPhase == LINKING) { - // Insert the platform-specific system libraries to the path list - LibraryPaths.push_back(sys::Path::GetSystemLibraryPath1()); - LibraryPaths.push_back(sys::Path::GetSystemLibraryPath2()); - - // We're emitting native code so let's build an gccld Action - Action* link = new Action(); - link->program.set_file("llvm-ld"); - - // Add in the optimization level requested - switch (optLevel) { - case OPT_FAST_COMPILE: - link->args.push_back("-O1"); - break; - case OPT_SIMPLE: - link->args.push_back("-O2"); - break; - case OPT_AGGRESSIVE: - link->args.push_back("-O3"); - break; - case OPT_LINK_TIME: - link->args.push_back("-O4"); - break; - case OPT_AGGRESSIVE_LINK_TIME: - link->args.push_back("-O5"); - break; - case OPT_NONE: - break; - } + // Short circuit the rest of the loop, we don't want to link + ++I; + continue; + } - // Add in all the linkage items we generated. This includes the - // output from the translation/optimization phases as well as any - // -l arguments specified. - for (PathVector::const_iterator I=LinkageItems.begin(), - E=LinkageItems.end(); I != E; ++I ) - link->args.push_back(I->get()); - - // Add in all the libraries we found. - for (std::vector::const_iterator I=LibFiles.begin(), - E=LibFiles.end(); I != E; ++I ) - link->args.push_back(std::string("-l")+*I); - - // Add in all the library paths to the command line - for (PathVector::const_iterator I=LibraryPaths.begin(), - E=LibraryPaths.end(); I != E; ++I) - link->args.push_back( std::string("-L") + I->get()); - - // Add in other optional flags - if (isSet(EMIT_NATIVE_FLAG)) - link->args.push_back("-native"); - if (isSet(VERBOSE_FLAG)) - link->args.push_back("-v"); - if (isSet(TIME_PASSES_FLAG)) - link->args.push_back("-time-passes"); - if (isSet(SHOW_STATS_FLAG)) - link->args.push_back("-stats"); - if (isSet(STRIP_OUTPUT_FLAG)) - link->args.push_back("-s"); - if (isSet(DEBUG_FLAG)) { - link->args.push_back("-debug"); - link->args.push_back("-debug-pass=Details"); - } + // Register the result of the actions as a link candidate + LinkageItems.insert(InFile); - // Add in mandatory flags - link->args.push_back("-o"); - link->args.push_back(OutFile.get()); - - // Execute the link - if (!DoAction(link)) - throw std::string("Action failed"); - } - } catch (std::string& msg) { - cleanup(); - throw; - } catch (...) { - cleanup(); - throw std::string("Unspecified error"); + // Go to next file to be processed + ++I; + } // end while loop over each input file + + /// RUN THE COMPILATION ACTIONS + std::vector::iterator AI = actions.begin(); + std::vector::iterator AE = actions.end(); + while (AI != AE) { + if (!DoAction(*AI)) + throw std::string("Action failed"); + AI++; + } + + /// LINKING PHASE + if (finalPhase == LINKING) { + + // Insert the platform-specific system libraries to the path list + LibraryPaths.push_back(sys::Path::GetSystemLibraryPath1()); + LibraryPaths.push_back(sys::Path::GetSystemLibraryPath2()); + + // Set up the linking action with llvm-ld + Action* link = new Action(); + link->program.set_file("llvm-ld"); + + // Add in the optimization level requested + switch (optLevel) { + case OPT_FAST_COMPILE: + link->args.push_back("-O1"); + break; + case OPT_SIMPLE: + link->args.push_back("-O2"); + break; + case OPT_AGGRESSIVE: + link->args.push_back("-O3"); + break; + case OPT_LINK_TIME: + link->args.push_back("-O4"); + break; + case OPT_AGGRESSIVE_LINK_TIME: + link->args.push_back("-O5"); + break; + case OPT_NONE: + break; } - cleanup(); - return 0; - } - /// @} - /// @name Data - /// @{ - private: - ConfigDataProvider* cdp; ///< Where we get configuration data from - Phases finalPhase; ///< The final phase of compilation - OptimizationLevels optLevel; ///< The optimization level to apply - unsigned Flags; ///< The driver flags - std::string machine; ///< Target machine name - PathVector LibraryPaths; ///< -L options - PathVector IncludePaths; ///< -I options - StringVector Defines; ///< -D options - sys::Path TempDir; ///< Name of the temporary directory. - StringTable AdditionalArgs; ///< The -Txyz options - StringVector fOptions; ///< -f options - StringVector MOptions; ///< -M options - StringVector WOptions; ///< -W options + // Add in all the linkage items we generated. This includes the + // output from the translation/optimization phases as well as any + // -l arguments specified. + for (PathVector::const_iterator I=LinkageItems.begin(), + E=LinkageItems.end(); I != E; ++I ) + link->args.push_back(I->get()); + + // Add in all the libraries we found. + for (std::vector::const_iterator I=LibFiles.begin(), + E=LibFiles.end(); I != E; ++I ) + link->args.push_back(std::string("-l")+*I); + + // Add in all the library paths to the command line + for (PathVector::const_iterator I=LibraryPaths.begin(), + E=LibraryPaths.end(); I != E; ++I) + link->args.push_back( std::string("-L") + I->get()); + + // Add in the additional linker arguments requested + for (StringVector::const_iterator I=AdditionalArgs[LINKING].begin(), + E=AdditionalArgs[LINKING].end(); I != E; ++I) + link->args.push_back( *I ); + + // Add in other optional flags + if (isSet(EMIT_NATIVE_FLAG)) + link->args.push_back("-native"); + if (isSet(VERBOSE_FLAG)) + link->args.push_back("-v"); + if (isSet(TIME_PASSES_FLAG)) + link->args.push_back("-time-passes"); + if (isSet(SHOW_STATS_FLAG)) + link->args.push_back("-stats"); + if (isSet(STRIP_OUTPUT_FLAG)) + link->args.push_back("-s"); + if (isSet(DEBUG_FLAG)) { + link->args.push_back("-debug"); + link->args.push_back("-debug-pass=Details"); + } + + // Add in mandatory flags + link->args.push_back("-o"); + link->args.push_back(Output.get()); + + // Execute the link + if (!DoAction(link)) + throw std::string("Action failed"); + } + } catch (std::string& msg) { + cleanup(); + throw; + } catch (...) { + cleanup(); + throw std::string("Unspecified error"); + } + cleanup(); + return 0; + } + +/// @} +/// @name Data +/// @{ +private: + ConfigDataProvider* cdp; ///< Where we get configuration data from + Phases finalPhase; ///< The final phase of compilation + OptimizationLevels optLevel; ///< The optimization level to apply + unsigned Flags; ///< The driver flags + std::string machine; ///< Target machine name + PathVector LibraryPaths; ///< -L options + PathVector IncludePaths; ///< -I options + StringVector Defines; ///< -D options + sys::Path TempDir; ///< Name of the temporary directory. + StringTable AdditionalArgs; ///< The -Txyz options + StringVector fOptions; ///< -f options + StringVector MOptions; ///< -M options + StringVector WOptions; ///< -W options - /// @} - }; +/// @} +}; } CompilerDriver::~CompilerDriver() { From reid at x10sys.com Wed Oct 27 23:06:26 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 23:06:26 -0500 Subject: [llvm-commits] CVS: llvm/tools/llvmc/ConfigLexer.h Message-ID: <200410280406.XAA08047@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvmc: ConfigLexer.h updated: 1.9 -> 1.10 --- Log message: Remove the FORCE token, rename VERSION to VERSION_TOK so it doesn't conflict with configuration variables and #defines. --- Diffs of the changes: (+1 -2) Index: llvm/tools/llvmc/ConfigLexer.h diff -u llvm/tools/llvmc/ConfigLexer.h:1.9 llvm/tools/llvmc/ConfigLexer.h:1.10 --- llvm/tools/llvmc/ConfigLexer.h:1.9 Mon Sep 13 20:59:31 2004 +++ llvm/tools/llvmc/ConfigLexer.h Wed Oct 27 23:06:15 2004 @@ -60,7 +60,6 @@ EQUALS, ///< The equals sign, = FALSETOK, ///< A boolean false value (false/no/off) FOPTS_SUBST, ///< The substitution item %fOpts% - FORCE_SUBST, ///< The substitution item %force% IN_SUBST, ///< The substitution item %in% INCLS_SUBST, ///< The substitution item %incls% INTEGER, ///< An integer @@ -93,7 +92,7 @@ TRANSLATOR, ///< The name "translator" (and variants) TRUETOK, ///< A boolean true value (true/yes/on) VERBOSE_SUBST,///< The substitution item %verbose% - VERSION, ///< The name "version" (and variants) + VERSION_TOK, ///< The name "version" (and variants) WOPTS_SUBST, ///< The %WOpts% substitution }; From reid at x10sys.com Wed Oct 27 23:08:04 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 23:08:04 -0500 Subject: [llvm-commits] CVS: llvm/projects/Stacker/Makefile Message-ID: <200410280408.XAA08103@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker: Makefile updated: 1.7 -> 1.8 --- Log message: Add the samples directory to the build --- Diffs of the changes: (+2 -2) Index: llvm/projects/Stacker/Makefile diff -u llvm/projects/Stacker/Makefile:1.7 llvm/projects/Stacker/Makefile:1.8 --- llvm/projects/Stacker/Makefile:1.7 Tue Oct 26 02:04:18 2004 +++ llvm/projects/Stacker/Makefile Wed Oct 27 23:07:54 2004 @@ -5,7 +5,7 @@ ##===----------------------------------------------------------------------===## LEVEL = . -DIRS = lib tools -EXTRA_DIST = samples test +DIRS = lib tools samples +EXTRA_DIST = test include $(LEVEL)/Makefile.common From reid at x10sys.com Wed Oct 27 23:08:16 2004 From: reid at x10sys.com (Reid Spencer) Date: Wed, 27 Oct 2004 23:08:16 -0500 Subject: [llvm-commits] CVS: llvm/projects/Stacker/samples/Makefile Message-ID: <200410280408.XAA08126@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/samples: Makefile updated: 1.4 -> 1.5 --- Log message: Use llvmc to compile the Stacker programs --- Diffs of the changes: (+7 -30) Index: llvm/projects/Stacker/samples/Makefile diff -u llvm/projects/Stacker/samples/Makefile:1.4 llvm/projects/Stacker/samples/Makefile:1.5 --- llvm/projects/Stacker/samples/Makefile:1.4 Wed Oct 27 18:18:45 2004 +++ llvm/projects/Stacker/samples/Makefile Wed Oct 27 23:08:05 2004 @@ -16,49 +16,26 @@ SAMPLES = fibonacci hello prime -LLC_EXEC = $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)/llc -OPT_EXEC = $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)/opt -STKRC_EXEC = $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)/stkrc -LLVMDIS_EXEC = $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION)/llvm-dis +LLVMC_EXEC = $(TOOLDIR)/llvmc all :: $(SAMPLES) ifdef OPTIMIZE % : %.st - @$(ECHO) "Compiling and Optimizing $< to $*.bc" - $(VERB)$(STKRC_EXEC) -e -o - $< | opt -stats -q -f -o $*.bc \ - -aa-eval -adce -branch-combine -cee -constmerge -constprop -dce -die -ds-aa \ - -ds-opt -gcse -globaldce -indvars -inline -instcombine \ - -ipconstprop -licm -loopsimplify -mem2reg -pre -sccp -simplifycfg \ - -tailcallelim -verify + @$(ECHO) "Compiling and Optimizing $( Changes in directory llvm/autoconf/m4: func_isinf.m4 updated: 1.2 -> 1.3 --- Log message: It's spelled IEEEFP --- Diffs of the changes: (+1 -1) Index: llvm/autoconf/m4/func_isinf.m4 diff -u llvm/autoconf/m4/func_isinf.m4:1.2 llvm/autoconf/m4/func_isinf.m4:1.3 --- llvm/autoconf/m4/func_isinf.m4:1.2 Wed Oct 27 18:03:44 2004 +++ llvm/autoconf/m4/func_isinf.m4 Wed Oct 27 23:17:05 2004 @@ -28,7 +28,7 @@ [finite], [], [float f; finite(f);]) if test "$ac_cv_func_finite_in_ieefp_h" = "yes" ; then - AC_DEFINE([HAVE_FINITE_IN_IEEFP_H],1,[Set to 1 if the finite function is found in ]) + AC_DEFINE([HAVE_FINITE_IN_IEEEFP_H],1,[Set to 1 if the finite function is found in ]) fi ]) From reid at x10sys.com Thu Oct 28 00:04:30 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 28 Oct 2004 00:04:30 -0500 Subject: [llvm-commits] CVS: llvm/autoconf/m4/func_isinf.m4 Message-ID: <200410280504.AAA09575@zion.cs.uiuc.edu> Changes in directory llvm/autoconf/m4: func_isinf.m4 updated: 1.3 -> 1.4 --- Log message: Make sure we test the right variable for the AC_DEFINE --- Diffs of the changes: (+1 -1) Index: llvm/autoconf/m4/func_isinf.m4 diff -u llvm/autoconf/m4/func_isinf.m4:1.3 llvm/autoconf/m4/func_isinf.m4:1.4 --- llvm/autoconf/m4/func_isinf.m4:1.3 Wed Oct 27 23:17:05 2004 +++ llvm/autoconf/m4/func_isinf.m4 Thu Oct 28 00:04:20 2004 @@ -27,7 +27,7 @@ AC_SINGLE_CXX_CHECK([ac_cv_func_finite_in_ieeefp_h], [finite], [], [float f; finite(f);]) -if test "$ac_cv_func_finite_in_ieefp_h" = "yes" ; then +if test "$ac_cv_func_finite_in_ieeefp_h" = "yes" ; then AC_DEFINE([HAVE_FINITE_IN_IEEEFP_H],1,[Set to 1 if the finite function is found in ]) fi From gaeke at cs.uiuc.edu Thu Oct 28 00:06:24 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu, 28 Oct 2004 00:06:24 -0500 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200410280506.AAA09844@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.132 -> 1.133 --- Log message: Regenerated after fixing typo. --- Diffs of the changes: (+2 -2) Index: llvm/configure diff -u llvm/configure:1.132 llvm/configure:1.133 --- llvm/configure:1.132 Wed Oct 27 18:03:44 2004 +++ llvm/configure Thu Oct 28 00:06:13 2004 @@ -23063,10 +23063,10 @@ echo "$as_me:$LINENO: result: $ac_cv_func_finite_in_ieeefp_h" >&5 echo "${ECHO_T}$ac_cv_func_finite_in_ieeefp_h" >&6 -if test "$ac_cv_func_finite_in_ieefp_h" = "yes" ; then +if test "$ac_cv_func_finite_in_ieeefp_h" = "yes" ; then cat >>confdefs.h <<\_ACEOF -#define HAVE_FINITE_IN_IEEFP_H 1 +#define HAVE_FINITE_IN_IEEEFP_H 1 _ACEOF fi From gaeke at cs.uiuc.edu Thu Oct 28 00:06:55 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu, 28 Oct 2004 00:06:55 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Config/config.h.in Message-ID: <200410280506.AAA09860@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Config: config.h.in updated: 1.33 -> 1.34 --- Log message: Regenerated after fixing typo. --- Diffs of the changes: (+1 -1) Index: llvm/include/llvm/Config/config.h.in diff -u llvm/include/llvm/Config/config.h.in:1.33 llvm/include/llvm/Config/config.h.in:1.34 --- llvm/include/llvm/Config/config.h.in:1.33 Wed Oct 27 18:09:31 2004 +++ llvm/include/llvm/Config/config.h.in Thu Oct 28 00:06:45 2004 @@ -40,7 +40,7 @@ #undef HAVE_FCNTL_H /* Set to 1 if the finite function is found in */ -#undef HAVE_FINITE_IN_IEEFP_H +#undef HAVE_FINITE_IN_IEEEFP_H /* Does not have forward iterator */ #undef HAVE_FWD_ITERATOR From reid at x10sys.com Thu Oct 28 00:31:04 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 28 Oct 2004 00:31:04 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Makefile Message-ID: <200410280531.AAA10235@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: Makefile updated: 1.3 -> 1.4 --- Log message: Fix name of library --- Diffs of the changes: (+1 -1) Index: llvm/lib/Bytecode/Writer/Makefile diff -u llvm/lib/Bytecode/Writer/Makefile:1.3 llvm/lib/Bytecode/Writer/Makefile:1.4 --- llvm/lib/Bytecode/Writer/Makefile:1.3 Mon Oct 20 17:26:56 2003 +++ llvm/lib/Bytecode/Writer/Makefile Thu Oct 28 00:30:54 2004 @@ -7,6 +7,6 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = bcwriter +LIBRARYNAME = LLVMBCWriter include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Oct 28 00:32:12 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 28 Oct 2004 00:32:12 -0500 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Makefile Message-ID: <200410280532.AAA10259@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Makefile updated: 1.3 -> 1.4 --- Log message: Fix library name. --- Diffs of the changes: (+1 -1) Index: llvm/lib/Bytecode/Reader/Makefile diff -u llvm/lib/Bytecode/Reader/Makefile:1.3 llvm/lib/Bytecode/Reader/Makefile:1.4 --- llvm/lib/Bytecode/Reader/Makefile:1.3 Mon Oct 20 17:26:56 2003 +++ llvm/lib/Bytecode/Reader/Makefile Thu Oct 28 00:32:01 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = bcreader +LIBRARYNAME = LLVMBCReader include $(LEVEL)/Makefile.common From alkis at cs.uiuc.edu Thu Oct 28 00:36:59 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 00:36:59 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/Makefile Message-ID: <200410280536.AAA10400@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: Makefile updated: 1.3 -> 1.4 --- Log message: Fix library name. --- Diffs of the changes: (+1 -1) Index: llvm/lib/Analysis/IPA/Makefile diff -u llvm/lib/Analysis/IPA/Makefile:1.3 llvm/lib/Analysis/IPA/Makefile:1.4 --- llvm/lib/Analysis/IPA/Makefile:1.3 Mon Oct 20 17:26:55 2003 +++ llvm/lib/Analysis/IPA/Makefile Thu Oct 28 00:36:47 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = ipa +LIBRARYNAME = LLVMipa BUILD_ARCHIVE = 1 include $(LEVEL)/Makefile.common From alkis at cs.uiuc.edu Thu Oct 28 00:36:59 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 00:36:59 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Makefile Message-ID: <200410280536.AAA10403@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Makefile updated: 1.3 -> 1.4 --- Log message: Fix library name. --- Diffs of the changes: (+1 -1) Index: llvm/lib/Analysis/DataStructure/Makefile diff -u llvm/lib/Analysis/DataStructure/Makefile:1.3 llvm/lib/Analysis/DataStructure/Makefile:1.4 --- llvm/lib/Analysis/DataStructure/Makefile:1.3 Mon Oct 20 17:26:55 2003 +++ llvm/lib/Analysis/DataStructure/Makefile Thu Oct 28 00:36:48 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = datastructure +LIBRARYNAME = LLVMDataStructure BUILD_ARCHIVE = 1 include $(LEVEL)/Makefile.common From reid at x10sys.com Thu Oct 28 00:37:35 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 28 Oct 2004 00:37:35 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/Makefile Message-ID: <200410280537.AAA10484@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: Makefile updated: 1.4 -> 1.5 --- Log message: Fix library name. --- Diffs of the changes: (+1 -1) Index: llvm/lib/ExecutionEngine/JIT/Makefile diff -u llvm/lib/ExecutionEngine/JIT/Makefile:1.4 llvm/lib/ExecutionEngine/JIT/Makefile:1.5 --- llvm/lib/ExecutionEngine/JIT/Makefile:1.4 Mon Oct 20 17:26:56 2003 +++ llvm/lib/ExecutionEngine/JIT/Makefile Thu Oct 28 00:37:24 2004 @@ -7,7 +7,7 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = lli-jit +LIBRARYNAME = LLVMJIT # Get the $(ARCH) setting include $(LEVEL)/Makefile.config From reid at x10sys.com Thu Oct 28 00:37:35 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 28 Oct 2004 00:37:35 -0500 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Makefile Message-ID: <200410280537.AAA10483@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: Makefile updated: 1.2 -> 1.3 --- Log message: Fix library name. --- Diffs of the changes: (+1 -1) Index: llvm/lib/ExecutionEngine/Interpreter/Makefile diff -u llvm/lib/ExecutionEngine/Interpreter/Makefile:1.2 llvm/lib/ExecutionEngine/Interpreter/Makefile:1.3 --- llvm/lib/ExecutionEngine/Interpreter/Makefile:1.2 Mon Oct 20 17:26:56 2003 +++ llvm/lib/ExecutionEngine/Interpreter/Makefile Thu Oct 28 00:37:24 2004 @@ -7,6 +7,6 @@ # ##===----------------------------------------------------------------------===## LEVEL = ../../.. -LIBRARYNAME = lli-interpreter +LIBRARYNAME = LLVMInterpreter include $(LEVEL)/Makefile.common From alkis at cs.uiuc.edu Thu Oct 28 00:57:49 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 00:57:49 -0500 Subject: [llvm-commits] CVS: llvm-java/tools/classdump/Makefile Message-ID: <200410280557.AAA10942@zion.cs.uiuc.edu> Changes in directory llvm-java/tools/classdump: Makefile updated: 1.4 -> 1.5 --- Log message: Use new library names. --- Diffs of the changes: (+1 -1) Index: llvm-java/tools/classdump/Makefile diff -u llvm-java/tools/classdump/Makefile:1.4 llvm-java/tools/classdump/Makefile:1.5 --- llvm-java/tools/classdump/Makefile:1.4 Sun Aug 29 23:08:49 2004 +++ llvm-java/tools/classdump/Makefile Thu Oct 28 00:57:38 2004 @@ -11,6 +11,6 @@ TOOLNAME := classdump USEDLIBS := classfile -LLVMLIBS := support vmcore LLVMsystem +LLVMLIBS := LLVMSupport LLVMCore LLVMSystem include $(LEVEL)/Makefile.common From alkis at cs.uiuc.edu Thu Oct 28 00:57:49 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 00:57:49 -0500 Subject: [llvm-commits] CVS: llvm-java/tools/class2llvm/Makefile Message-ID: <200410280557.AAA10941@zion.cs.uiuc.edu> Changes in directory llvm-java/tools/class2llvm: Makefile updated: 1.3 -> 1.4 --- Log message: Use new library names. --- Diffs of the changes: (+1 -1) Index: llvm-java/tools/class2llvm/Makefile diff -u llvm-java/tools/class2llvm/Makefile:1.3 llvm-java/tools/class2llvm/Makefile:1.4 --- llvm-java/tools/class2llvm/Makefile:1.3 Sun Aug 29 23:08:49 2004 +++ llvm-java/tools/class2llvm/Makefile Thu Oct 28 00:57:38 2004 @@ -11,6 +11,6 @@ TOOLNAME := class2llvm USEDLIBS := classfile compiler -LLVMLIBS := support vmcore bcwriter LLVMsystem +LLVMLIBS := LLVMSupport LLVMCore LLVMBCWriter LLVMSystem include $(LEVEL)/Makefile.common From alkis at cs.uiuc.edu Thu Oct 28 01:24:57 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 01:24:57 -0500 Subject: [llvm-commits] CVS: llvm-java/tools/class2llvm/Makefile Message-ID: <200410280624.BAA11295@zion.cs.uiuc.edu> Changes in directory llvm-java/tools/class2llvm: Makefile updated: 1.4 -> 1.5 --- Log message: Don't link in all of LLVMSupport and LLVMSystem. --- Diffs of the changes: (+1 -1) Index: llvm-java/tools/class2llvm/Makefile diff -u llvm-java/tools/class2llvm/Makefile:1.4 llvm-java/tools/class2llvm/Makefile:1.5 --- llvm-java/tools/class2llvm/Makefile:1.4 Thu Oct 28 00:57:38 2004 +++ llvm-java/tools/class2llvm/Makefile Thu Oct 28 01:24:47 2004 @@ -11,6 +11,6 @@ TOOLNAME := class2llvm USEDLIBS := classfile compiler -LLVMLIBS := LLVMSupport LLVMCore LLVMBCWriter LLVMSystem +LLVMLIBS := LLVMBCWriter LLVMCore LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From alkis at cs.uiuc.edu Thu Oct 28 01:24:57 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 01:24:57 -0500 Subject: [llvm-commits] CVS: llvm-java/tools/classdump/Makefile Message-ID: <200410280624.BAA11294@zion.cs.uiuc.edu> Changes in directory llvm-java/tools/classdump: Makefile updated: 1.5 -> 1.6 --- Log message: Don't link in all of LLVMSupport and LLVMSystem. --- Diffs of the changes: (+1 -1) Index: llvm-java/tools/classdump/Makefile diff -u llvm-java/tools/classdump/Makefile:1.5 llvm-java/tools/classdump/Makefile:1.6 --- llvm-java/tools/classdump/Makefile:1.5 Thu Oct 28 00:57:38 2004 +++ llvm-java/tools/classdump/Makefile Thu Oct 28 01:24:47 2004 @@ -11,6 +11,6 @@ TOOLNAME := classdump USEDLIBS := classfile -LLVMLIBS := LLVMSupport LLVMCore LLVMSystem +LLVMLIBS := LLVMCore LLVMSystem.a LLVMSupport.a include $(LEVEL)/Makefile.common From alkis at cs.uiuc.edu Thu Oct 28 01:31:14 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 01:31:14 -0500 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Makefile Message-ID: <200410280631.BAA11461@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Makefile updated: 1.1 -> 1.2 --- Log message: Conform to the new library naming scheme. --- Diffs of the changes: (+1 -1) Index: llvm-java/lib/Compiler/Makefile diff -u llvm-java/lib/Compiler/Makefile:1.1 llvm-java/lib/Compiler/Makefile:1.2 --- llvm-java/lib/Compiler/Makefile:1.1 Sat May 22 02:00:16 2004 +++ llvm-java/lib/Compiler/Makefile Thu Oct 28 01:31:04 2004 @@ -8,7 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL := ../.. -LIBRARYNAME := compiler +LIBRARYNAME := LLVMJavaCompiler BUILD_ARCHIVE = 1 From alkis at cs.uiuc.edu Thu Oct 28 01:31:14 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 01:31:14 -0500 Subject: [llvm-commits] CVS: llvm-java/lib/ClassFile/Makefile Message-ID: <200410280631.BAA11467@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/ClassFile: Makefile updated: 1.2 -> 1.3 --- Log message: Conform to the new library naming scheme. --- Diffs of the changes: (+1 -1) Index: llvm-java/lib/ClassFile/Makefile diff -u llvm-java/lib/ClassFile/Makefile:1.2 llvm-java/lib/ClassFile/Makefile:1.3 --- llvm-java/lib/ClassFile/Makefile:1.2 Thu Apr 15 23:03:45 2004 +++ llvm-java/lib/ClassFile/Makefile Thu Oct 28 01:31:04 2004 @@ -8,7 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL := ../.. -LIBRARYNAME := classfile +LIBRARYNAME := LLVMJavaClassfile BUILD_ARCHIVE = 1 From alkis at cs.uiuc.edu Thu Oct 28 01:31:14 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 01:31:14 -0500 Subject: [llvm-commits] CVS: llvm-java/tools/classdump/Makefile Message-ID: <200410280631.BAA11452@zion.cs.uiuc.edu> Changes in directory llvm-java/tools/classdump: Makefile updated: 1.6 -> 1.7 --- Log message: Conform to the new library naming scheme. --- Diffs of the changes: (+1 -1) Index: llvm-java/tools/classdump/Makefile diff -u llvm-java/tools/classdump/Makefile:1.6 llvm-java/tools/classdump/Makefile:1.7 --- llvm-java/tools/classdump/Makefile:1.6 Thu Oct 28 01:24:47 2004 +++ llvm-java/tools/classdump/Makefile Thu Oct 28 01:31:04 2004 @@ -10,7 +10,7 @@ TOOLNAME := classdump -USEDLIBS := classfile +USEDLIBS := LLVMJavaClassfile LLVMLIBS := LLVMCore LLVMSystem.a LLVMSupport.a include $(LEVEL)/Makefile.common From alkis at cs.uiuc.edu Thu Oct 28 01:31:14 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 01:31:14 -0500 Subject: [llvm-commits] CVS: llvm-java/tools/class2llvm/Makefile Message-ID: <200410280631.BAA11458@zion.cs.uiuc.edu> Changes in directory llvm-java/tools/class2llvm: Makefile updated: 1.5 -> 1.6 --- Log message: Conform to the new library naming scheme. --- Diffs of the changes: (+1 -1) Index: llvm-java/tools/class2llvm/Makefile diff -u llvm-java/tools/class2llvm/Makefile:1.5 llvm-java/tools/class2llvm/Makefile:1.6 --- llvm-java/tools/class2llvm/Makefile:1.5 Thu Oct 28 01:24:47 2004 +++ llvm-java/tools/class2llvm/Makefile Thu Oct 28 01:31:04 2004 @@ -10,7 +10,7 @@ TOOLNAME := class2llvm -USEDLIBS := classfile compiler +USEDLIBS := LLVMJavaClassfile LLVMJavaCompiler LLVMLIBS := LLVMBCWriter LLVMCore LLVMSupport.a LLVMSystem.a include $(LEVEL)/Makefile.common From gaeke at cs.uiuc.edu Thu Oct 28 01:39:28 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu, 28 Oct 2004 01:39:28 -0500 (CDT) Subject: [llvm-commits] CVS: llvm/tools/Makefile.JIT Message-ID: <200410280639.BAA18386@kain.cs.uiuc.edu> Changes in directory llvm/tools: Makefile.JIT updated: 1.3 -> 1.4 --- Log message: Fix library names for sparc --- Diffs of the changes: (+3 -3) Index: llvm/tools/Makefile.JIT diff -u llvm/tools/Makefile.JIT:1.3 llvm/tools/Makefile.JIT:1.4 --- llvm/tools/Makefile.JIT:1.3 Wed Oct 27 18:18:45 2004 +++ llvm/tools/Makefile.JIT Thu Oct 28 01:39:10 2004 @@ -44,9 +44,9 @@ # What the Sparc JIT requires ifdef ENABLE_SPARCV9_JIT JITLIBS += LLVMSparcV9 - ARCHLIBS += LLVMSparcV9sched LLVMSparcV9livevar LLVMInstrumentation.a \ - LLVMProfilePaths LLVMBCWriter LLVMTransforms.a LLVMipo.a LLVMipa.a \ - LLVMDataStructure.a LLVMSparcV9regalloc + ARCHLIBS += LLVMSparcV9InstrSched LLVMSparcV9LiveVar LLVMInstrumentation.a \ + LLVMProfilePaths LLVMBCWriter LLVMTransforms.a LLVMipo.a \ + LLVMipa.a LLVMDataStructure.a LLVMSparcV9RegAlloc endif # You can enable the PowerPC JIT on a non-PowerPC host by setting the flag From reid at x10sys.com Thu Oct 28 01:42:44 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 28 Oct 2004 01:42:44 -0500 Subject: [llvm-commits] CVS: llvm/projects/Stacker/samples/Makefile Message-ID: <200410280642.BAA11729@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/samples: Makefile updated: 1.5 -> 1.6 --- Log message: Make sure the sources get distributed (use EXTRA_DIST) Add the goof.st sample. --- Diffs of the changes: (+3 -5) Index: llvm/projects/Stacker/samples/Makefile diff -u llvm/projects/Stacker/samples/Makefile:1.5 llvm/projects/Stacker/samples/Makefile:1.6 --- llvm/projects/Stacker/samples/Makefile:1.5 Wed Oct 27 23:08:05 2004 +++ llvm/projects/Stacker/samples/Makefile Thu Oct 28 01:42:34 2004 @@ -8,13 +8,11 @@ # Indicates our relative path to the top of the project's root directory. # LEVEL = ../../.. - -# -# Directories that needs to be built. -# DIRS = -SAMPLES = fibonacci hello prime +EXTRA_DIST = fibonacci.st hello.st prime.st goof.st + +SAMPLES = fibonacci hello prime goof LLVMC_EXEC = $(TOOLDIR)/llvmc From alkis at cs.uiuc.edu Thu Oct 28 01:43:48 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 01:43:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp Message-ID: <200410280643.BAA11754@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Constants.cpp updated: 1.110 -> 1.111 --- Log message: Gep indices must be of int, uint, long or ulong type. --- Diffs of the changes: (+1 -1) Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.110 llvm/lib/VMCore/Constants.cpp:1.111 --- llvm/lib/VMCore/Constants.cpp:1.110 Sat Oct 23 22:02:16 2004 +++ llvm/lib/VMCore/Constants.cpp Thu Oct 28 01:43:38 2004 @@ -1249,7 +1249,7 @@ return getCast( getGetElementPtr( getNullValue(PointerType::get(Ty)), - std::vector(1, ConstantInt::get(Type::UByteTy, 1))), + std::vector(1, ConstantInt::get(Type::UIntTy, 1))), Type::UIntTy); } From alkis at cs.uiuc.edu Thu Oct 28 02:49:16 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 02:49:16 -0500 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200410280749.CAA12162@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.129 -> 1.130 --- Log message: Make all invokespecial calls statically bound. --- Diffs of the changes: (+5 -12) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.129 llvm-java/lib/Compiler/Compiler.cpp:1.130 --- llvm-java/lib/Compiler/Compiler.cpp:1.129 Tue Oct 26 23:10:34 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Thu Oct 28 02:49:05 2004 @@ -1456,18 +1456,11 @@ std::string funcName = className + '/' + methodDescr; const ClassInfo& ci = getClassInfo(ClassFile::get(className)); - // Constructor calls are statically bound. - if (methodName == "") { - FunctionType* funcTy = - cast(getType(nameAndType->getDescriptor(), ci.type)); - Function* function = module_.getOrInsertFunction(funcName, funcTy); - toCompileFunctions_.insert(function); - makeCall(function, getParams(funcTy)); - } - // Otherwise we call the superclass' implementation of the method. - else { - assert(0 && "not implemented"); - } + FunctionType* funcTy = + cast(getType(nameAndType->getDescriptor(), ci.type)); + Function* function = module_.getOrInsertFunction(funcName, funcTy); + toCompileFunctions_.insert(function); + makeCall(function, getParams(funcTy)); } void do_invokestatic(unsigned index) { From reid at x10sys.com Thu Oct 28 02:57:39 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 28 Oct 2004 02:57:39 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410280757.CAA12263@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.219 -> 1.220 --- Log message: Make parallel "install" and "uninstall" targets not step on itself. --- Diffs of the changes: (+20 -47) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.219 llvm/Makefile.rules:1.220 --- llvm/Makefile.rules:1.219 Wed Oct 27 19:41:43 2004 +++ llvm/Makefile.rules Thu Oct 28 02:57:28 2004 @@ -29,11 +29,7 @@ printvars uninstall-local TOPLEV_TARGETS := dist dist-check dist-clean tags USER_TARGETS := $(RECURSIVE_TARGETS) $(LOCAL_TARGETS) $(TOPLEV_TARGETS) -INTERNAL_TARGETS := preconditions \ - install-config-dir install-shared-library install-bytecode-library \ - install-archive-library install-relinked-library install-tool \ - uninstall-config-dir uninstall-shared-library uninstall-bytecode-library \ - uninstall-archive-library uninstall-relinked-library uninstall-tool +INTERNAL_TARGETS := preconditions ############################################################################### # INITIALIZATION: Basic things the makefile needs @@ -373,17 +369,13 @@ #--------------------------------------------------------- ifdef CONFIG_FILES -install-local:: install-config-dir - -install-config-dir: $(sysconfdir) $(CONFIG_FILES) +install-local:: $(sysconfdir) $(CONFIG_FILES) $(VERB)$(ECHO) Installing Configuration Files To $(sysconfdir) $(VERB)for file in $(CONFIG_FILES); do \ $(INSTALL) $(BUILD_SRC_DIR)/$${file} $(sysconfdir) ; \ done -uninstall-local:: uninstall-config-dir - -uninstall-config-dir: +uninstall-local:: $(VERB)$(ECHO) Uninstalling Configuration Files From $(sysconfdir) $(VERB)for file in $(CONFIG_FILES); do \ $(RM) -f $(sysconfdir)/$${file} ; \ @@ -437,18 +429,15 @@ endif DestSharedLib = $(libdir)/lib$(LIBRARYNAME)$(SHLIBEXT) -install-local:: install-shared-library -install-shared-library: $(libdir) $(DestSharedLib) +install-local:: $(DestSharedLib) -$(DestSharedLib): $(LIBNAME_LA) +$(DestSharedLib): $(libdir) $(LIBNAME_LA) @$(ECHO) Installing $(CONFIGURATION) Shared Library $(DestSharedLib) $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $(LIBNAME_LA) $(DestSharedLib) $(VERB) $(LIBTOOL) --finish $(libdir) -uninstall-local:: uninstall-shared-library - -uninstall-shared-library: +uninstall-local:: @$(ECHO) Uninstalling $(CONFIGURATION) Shared Library $(DestSharedLib) $(VERB) $(RM) -f $(DestSharedLib) @@ -485,17 +474,13 @@ DestBytecodeLib = $(bytecode_libdir)/lib$(LIBRARYNAME).bc -install-local:: install-bytecode-library - -install-bytecode-library: $(bytecode_libdir) $(DestBytecodeLib) +install-local:: $(DestBytecodeLib) -$(DestBytecodeLib): $(LIBNAME_BC) $(bytecode_libdir) +$(DestBytecodeLib): $(bytecode_libdir) $(LIBNAME_BC) @$(ECHO) Installing $(CONFIGURATION) Bytecode Library $(DestBytecodeLib) - $(VERB) $(INSTALL) $< $@ + $(VERB) $(INSTALL) $(LIBNAME_BC) $@ -uninstall-local:: uninstall-bytecode-library - -uninstall-bytecode-library: +uninstall-local:: @$(ECHO) Uninstalling $(CONFIGURATION) Bytecode Library $(DestBytecodeLib) $(VERB) $(RM) -f $(DestBytecodeLib) @@ -516,18 +501,13 @@ DestRelinkedLib = $(libdir)/$(LIBRARYNAME).o -install-local:: install-relinked-library +install-local:: $(DestRelinkedLib) -install-relinked-library: $(libdir) $(DestRelinkedLib) - -$(DestRelinkedLib): $(LIBNAME_O) +$(DestRelinkedLib): $(libdir) $(LIBNAME_O) @$(ECHO) Installing $(CONFIGURATION) Object Library $(DestRelinkedLib) - $(VERB) $(MKDIR) $(libdir) $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $(LIBNAME_O) $(DestRelinkedLib) -uninstall-local:: uninstall-relinked-library - -uninstall-relinked-library: +uninstall-local:: @$(ECHO) Uninstalling $(CONFIGURATION) Object Library $(DestRelinkedLib) $(VERB) $(RM) -f $(DestRelinkedLib) @@ -550,17 +530,14 @@ DestArchiveLib := $(libdir)/lib$(LIBRARYNAME).a -install-local:: install-archive-library - -install-archive-library: $(libdir) $(DestArchiveLib) +install-local:: $(DestArchiveLib) -$(DestArchiveLib): $(LIBNAME_A) +$(DestArchiveLib): $(libdir) $(LIBNAME_A) @$(ECHO) Installing $(CONFIGURATION) Archive Library $(DestArchiveLib) + $(VERB) $(MKDIR) $(libdir) $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $(LIBNAME_A) $(DestArchiveLib) -uninstall-local:: uninstall-archive-library - -uninstall-archive-library: +uninstall-local:: @$(ECHO) Uninstalling $(CONFIGURATION) Archive Library $(DestArchiveLib) $(VERB) $(RM) -f $(DestArchiveLib) @@ -629,20 +606,16 @@ DestTool = $(bindir)/$(TOOLNAME) -install-local:: install-tool - -install-tool: $(bindir) $(DestTool) +install-local:: $(DestTool) -$(DestTool): $(TOOLEXENAME) +$(DestTool): $(bindir) $(TOOLEXENAME) @$(ECHO) Installing $(CONFIGURATION) $(DestTool) $(VERB) $(INSTALL) $(TOOLEXENAME) $(DestTool) $(bindir): $(VERB) $(MKDIR) $(bindir) -uninstall-local:: uninstall-tool - -uninstall-tool: +uninstall-local:: @$(ECHO) Uninstalling $(CONFIGURATION) $(DestTool) $(VERB) $(RM) -f $(DestTool) From alkis at cs.uiuc.edu Thu Oct 28 03:26:43 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 03:26:43 -0500 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/BasicBlockBuilder.h Message-ID: <200410280826.DAA28962@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: BasicBlockBuilder.h updated: 1.1 -> 1.2 --- Log message: Make exception handler targets start of basic blocks. --- Diffs of the changes: (+4 -0) Index: llvm-java/lib/Compiler/BasicBlockBuilder.h diff -u llvm-java/lib/Compiler/BasicBlockBuilder.h:1.1 llvm-java/lib/Compiler/BasicBlockBuilder.h:1.2 --- llvm-java/lib/Compiler/BasicBlockBuilder.h:1.1 Mon Oct 18 11:38:37 2004 +++ llvm-java/lib/Compiler/BasicBlockBuilder.h Thu Oct 28 03:26:32 2004 @@ -46,6 +46,10 @@ BasicBlock* bb = getOrCreateBasicBlockAt(0); + const CodeAttribute::Exceptions& exceptions = c->getExceptions(); + for (unsigned i = 0, e = exceptions.size(); i != e; ++i) + getOrCreateBasicBlockAt(exceptions[i]->getHandlerPc()); + parse(c->getCode(), 0, c->getCodeSize()); for (BC2BBMap::const_iterator i = bc2bbMap_.begin(), e = bc2bbMap_.end(); From alkis at cs.uiuc.edu Thu Oct 28 03:54:59 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 03:54:59 -0500 Subject: [llvm-commits] CVS: llvm-java/docs/object-layout.txt Message-ID: <200410280854.DAA29098@zion.cs.uiuc.edu> Changes in directory llvm-java/docs: object-layout.txt updated: 1.7 -> 1.8 --- Log message: Update doc. The length field of an array is an int not an unsigned. --- Diffs of the changes: (+2 -2) Index: llvm-java/docs/object-layout.txt diff -u llvm-java/docs/object-layout.txt:1.7 llvm-java/docs/object-layout.txt:1.8 --- llvm-java/docs/object-layout.txt:1.7 Tue Oct 26 15:41:53 2004 +++ llvm-java/docs/object-layout.txt Thu Oct 28 03:54:49 2004 @@ -83,7 +83,7 @@ struct javaIntArray { struct java_lang_Object; - unsigned length; + int length; int array[0]; }; @@ -98,7 +98,7 @@ struct javaObjectArray { struct java_lang_Object; - unsigned length; + int length; java_lang_Object array[0]; }; From reid at x10sys.com Thu Oct 28 04:15:39 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 28 Oct 2004 04:15:39 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410280915.EAA29603@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.220 -> 1.221 --- Log message: Bug Fixes: * Move rules that build directories earlier in the file so that they are always built before the things that depend on them. This enables a parallel "dist-check" target. * Fix use of TOOLLINKOPTS and TOOLLINKOPTSB (thanks to Henrik Bach) * Standardize the output - some scripts using plain echo instead of $(ECHO) --- Diffs of the changes: (+34 -49) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.220 llvm/Makefile.rules:1.221 --- llvm/Makefile.rules:1.220 Thu Oct 28 02:57:28 2004 +++ llvm/Makefile.rules Thu Oct 28 04:15:28 2004 @@ -216,16 +216,7 @@ # Adjust linker flags for building an executable ifdef TOOLNAME - LDFLAGS += -rpath $(TOOLDIR) -export-dynamic $(TOOLLINKOPTS) -endif - -# Use TOOLLINKOPTSB to pass options to the linker like library search -# path etc. -# Note that this is different from TOOLLINKOPTS, these options -# are passed to the linker *before* the USEDLIBS options are passed. -# e.g. usage TOOLLINKOPTSB = -L/home/xxx/lib -ifdef TOOLLINKOPTSB -LDFLAGS += $(TOOLLINKOPTSB) + LDFLAGS += -rpath $(TOOLDIR) -export-dynamic endif #---------------------------------------------------------- @@ -251,7 +242,8 @@ BCCompile.C = $(LLVMGCC) $(CPPFLAGS) $(CompileCommonOpts) $(CFLAGS) -c Link = $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(CPPFLAGS) \ $(CompileCommonOpts) $(LDFLAGS) $(STRIP) -Relink = $(LIBTOOL) --tag=CXX --mode=link $(CXX) +Relink = $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(CPPFLAGS) \ + $(CompileCommonOpts) BCLinkLib = $(LLVMGCC) -shared -nostdlib Burg = $(BURG) -I $(BUILD_SRC_DIR) TableGen = $(TBLGEN) -I $(BUILD_SRC_DIR) @@ -289,6 +281,24 @@ ############################################################################### #--------------------------------------------------------- +# Provide rules to make install dirs. This must be early +# in the file so they get built before dependencies +#--------------------------------------------------------- + +$(bindir): + $(VERB) $(MKDIR) $(bindir) + +$(libdir): + $(VERB) $(MKDIR) $(libdir) + +$(bytecode_libdir): + $(VERB) $(MKDIR) $(bytecode_libdir) + +$(sysconfdir): + $(VERB) $(MKDIR) $(sysconfdir) + + +#--------------------------------------------------------- # Handle the DIRS options for sequential construction #--------------------------------------------------------- @@ -381,22 +391,12 @@ $(RM) -f $(sysconfdir)/$${file} ; \ done -$(sysconfdir): - $(VERB) $(MKDIR) $(sysconfdir) - endif ############################################################################### # Library Build Rules: Four ways to build a library ############################################################################### -$(libdir): - $(VERB) $(MKDIR) $(libdir) - -$(bytecode_libdir): - $(VERB) $(MKDIR) $(bytecode_libdir) - - # if we're building a library ... ifdef LIBRARYNAME @@ -552,16 +552,6 @@ ifdef TOOLNAME -#--------------------------------------------------------- -# TOOLLINKOPTSB to pass options to the linker like library search path etc -# Note that this is different from TOOLLINKOPTS, these options -# are passed to the linker *before* the USEDLIBS options are passed. -# e.g. usage TOOLLINKOPTSB = -L/home/xxx/lib -#--------------------------------------------------------- -ifdef TOOLLINKOPTSB -Link += $(TOOLLINKOPTSB) -endif - # TOOLEXENAME - This is the output filenames to generate TOOLEXENAME := $(TOOLDIR)/$(TOOLNAME) @@ -577,9 +567,6 @@ PROJ_LIBS_PATHS := $(addprefix $(LIBDIR)/,$(PROJ_USED_LIBS)) LLVM_LIBS_PATHS := $(addprefix $(LLVMLIBDIR)/,$(LLVM_USED_LIBS)) -# Concatenate all the optoins -LINK_OPTS := $(TOOLLINKOPTS) $(PROJ_LIBS_OPTIONS) $(LLVM_LIBS_OPTIONS) - # Handle compression libraries automatically ifeq ($(HAVE_BZIP2),1) LIBS += -lbz2 @@ -601,7 +588,8 @@ $(TOOLEXENAME): $(BUILT_SOURCES) $(ObjectsO) $(PROJ_LIBS_PATHS) $(LLVM_LIBS_PATHS) $(TOOLDIR)/.dir @$(ECHO) Linking $(CONFIGURATION) executable $(TOOLNAME) $(STRIP_WARN_MSG) - $(VERB) $(Link) -o $@ $(ObjectsO) $(PROJ_LIBS_OPTIONS) $(LLVM_LIBS_OPTIONS) $(LIBS) + $(VERB) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(PROJ_LIBS_OPTIONS) \ + $(LLVM_LIBS_OPTIONS) $(LIBS) $(TOOLLINKOPTSB) @$(ECHO) ======= Finished Linking $(CONFIGURATION) Executable $(TOOLNAME) $(STRIP_WARN_MSG) DestTool = $(bindir)/$(TOOLNAME) @@ -612,9 +600,6 @@ @$(ECHO) Installing $(CONFIGURATION) $(DestTool) $(VERB) $(INSTALL) $(TOOLEXENAME) $(DestTool) -$(bindir): - $(VERB) $(MKDIR) $(bindir) - uninstall-local:: @$(ECHO) Uninstalling $(CONFIGURATION) $(DestTool) $(VERB) $(RM) -f $(DestTool) @@ -713,43 +698,43 @@ $(INCFILES) : $(TBLGEN) $(TDFILES) %GenRegisterNames.inc : %.td - @echo "Building $( Changes in directory llvm: configure updated: 1.133 -> 1.134 --- Log message: Added the poolalloc module to the list of projects to configure, if present. --- Diffs of the changes: (+33 -28) Index: llvm/configure diff -u llvm/configure:1.133 llvm/configure:1.134 --- llvm/configure:1.133 Thu Oct 28 00:06:13 2004 +++ llvm/configure Thu Oct 28 08:34:58 2004 @@ -436,6 +436,7 @@ ac_subdirs_all="$ac_subdirs_all projects/Java" ac_subdirs_all="$ac_subdirs_all projects/llvm-tv" ac_subdirs_all="$ac_subdirs_all projects/llvm-fefw" +ac_subdirs_all="$ac_subdirs_all projects/poolalloc" # Factoring default headers for most tests. ac_includes_default="\ #include @@ -1587,6 +1588,10 @@ subdirs="$subdirs projects/llvm-fefw" ;; + "poolalloc") + +subdirs="$subdirs projects/poolalloc" + ;; *) { echo "$as_me:$LINENO: WARNING: Unknown project (${i}) won't be configured automatically" >&5 echo "$as_me: WARNING: Unknown project (${i}) won't be configured automatically" >&2;} @@ -4183,7 +4188,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4186 "configure"' > conftest.$ac_ext + echo '#line 4191 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5057,7 +5062,7 @@ # Provide some information about the compiler. -echo "$as_me:5060:" \ +echo "$as_me:5065:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6114,11 +6119,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6117: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6122: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6121: \$? = $ac_status" >&5 + echo "$as_me:6126: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6357,11 +6362,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6360: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6365: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6364: \$? = $ac_status" >&5 + echo "$as_me:6369: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6417,11 +6422,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6420: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6425: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6424: \$? = $ac_status" >&5 + echo "$as_me:6429: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8602,7 +8607,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:10901: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10900: \$? = $ac_status" >&5 + echo "$as_me:10905: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10953,11 +10958,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10956: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10961: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10960: \$? = $ac_status" >&5 + echo "$as_me:10965: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12314,7 +12319,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13257: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13256: \$? = $ac_status" >&5 + echo "$as_me:13261: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13309,11 +13314,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13312: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13317: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13316: \$? = $ac_status" >&5 + echo "$as_me:13321: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15348,11 +15353,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15351: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15356: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15355: \$? = $ac_status" >&5 + echo "$as_me:15360: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15591,11 +15596,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15594: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15599: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15598: \$? = $ac_status" >&5 + echo "$as_me:15603: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15651,11 +15656,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15654: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15659: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15658: \$? = $ac_status" >&5 + echo "$as_me:15663: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17836,7 +17841,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/autoconf: configure.ac updated: 1.126 -> 1.127 --- Log message: Added the poolalloc module to the list of projects to configure, if present. --- Diffs of the changes: (+1 -0) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.126 llvm/autoconf/configure.ac:1.127 --- llvm/autoconf/configure.ac:1.126 Wed Oct 27 18:03:44 2004 +++ llvm/autoconf/configure.ac Thu Oct 28 08:35:00 2004 @@ -31,6 +31,7 @@ "Java") AC_CONFIG_SUBDIRS([projects/Java]) ;; "llvm-tv") AC_CONFIG_SUBDIRS([projects/llvm-tv]) ;; "llvm-fefw") AC_CONFIG_SUBDIRS([projects/llvm-fefw]) ;; + "poolalloc") AC_CONFIG_SUBDIRS([projects/poolalloc]) ;; *) AC_MSG_WARN([Unknown project (${i}) won't be configured automatically]) ;; From gaeke at cs.uiuc.edu Thu Oct 28 11:14:38 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu, 28 Oct 2004 11:14:38 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/lib/WholeReoptimizer/Makefile Message-ID: <200410281614.LAA12223@kain.cs.uiuc.edu> Changes in directory reopt/lib/WholeReoptimizer: Makefile updated: 1.4 -> 1.5 --- Log message: The LLVM libraries to which the reoptimizer links have changed names. --- Diffs of the changes: (+9 -15) Index: reopt/lib/WholeReoptimizer/Makefile diff -u reopt/lib/WholeReoptimizer/Makefile:1.4 reopt/lib/WholeReoptimizer/Makefile:1.5 --- reopt/lib/WholeReoptimizer/Makefile:1.4 Tue Oct 26 14:02:26 2004 +++ reopt/lib/WholeReoptimizer/Makefile Thu Oct 28 11:14:27 2004 @@ -10,23 +10,17 @@ $(REOPTLIBDIR)/tracejit.o $(REOPTLIBDIR)/traceio.o # Object files that contain common LLVM code the Reoptimizer depends on -REOPTIMIZER_LLVMOBJS = $(LLVMLIBDIR)/vmcore.o \ - $(LLVMLIBDIR)/bcreader.o $(LLVMLIBDIR)/bcwriter.o \ - $(LLVMLIBDIR)/sparcv9.o \ - $(LLVMLIBDIR)/sparcv9livevar.o \ - $(LLVMLIBDIR)/sparcv9sched.o $(LLVMLIBDIR)/codegen.o \ - $(LLVMLIBDIR)/executionengine.o \ - $(LLVMLIBDIR)/lli-jit.o \ - $(LLVMLIBDIR)/lli-interpreter.o +REOPTIMIZER_LLVMOBJS = $(LLVMLIBDIR)/LLVMCore.o $(LLVMLIBDIR)/LLVMBCReader.o \ + $(LLVMLIBDIR)/LLVMBCWriter.o $(LLVMLIBDIR)/LLVMSparcV9.o \ + $(LLVMLIBDIR)/LLVMSparcV9LiveVar.o $(LLVMLIBDIR)/LLVMSparcV9InstrSched.o \ + $(LLVMLIBDIR)/LLVMCodeGen.o $(LLVMLIBDIR)/LLVMExecutionEngine.o \ + $(LLVMLIBDIR)/LLVMJIT.o $(LLVMLIBDIR)/LLVMInterpreter.o # Library archive files that contain common LLVM code the Reoptimizer depends on -REOPTIMIZER_LLVMLIBS = $(LLVMLIBDIR)/libsparcv9regalloc.a \ - $(LLVMLIBDIR)/libtarget.a \ - $(LLVMLIBDIR)/libscalaropts.a \ - $(LLVMLIBDIR)/libtransformutils.a \ - $(LLVMLIBDIR)/libanalysis.a \ - $(LLVMLIBDIR)/libsupport.a \ - $(LLVMLIBDIR)/libLLVMsystem.a +REOPTIMIZER_LLVMLIBS = $(LLVMLIBDIR)/libLLVMSparcV9RegAlloc.a \ + $(LLVMLIBDIR)/libLLVMTarget.a $(LLVMLIBDIR)/libLLVMScalarOpts.a \ + $(LLVMLIBDIR)/libLLVMTransformUtils.a $(LLVMLIBDIR)/libLLVMAnalysis.a \ + $(LLVMLIBDIR)/libLLVMSupport.a $(LLVMLIBDIR)/libLLVMSystem.a WHOLE_REOPTIMIZER_LIB = $(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION)/libwholereoptimizer.a From reid at x10sys.com Thu Oct 28 11:48:24 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 28 Oct 2004 11:48:24 -0500 Subject: [llvm-commits] CVS: llvm/utils/Burg/Makefile Message-ID: <200410281648.LAA03014@zion.cs.uiuc.edu> Changes in directory llvm/utils/Burg: Makefile updated: 1.28 -> 1.29 --- Log message: Fix the dependency of lex.o on gram.tab.h --- Diffs of the changes: (+1 -1) Index: llvm/utils/Burg/Makefile diff -u llvm/utils/Burg/Makefile:1.28 llvm/utils/Burg/Makefile:1.29 --- llvm/utils/Burg/Makefile:1.28 Mon Oct 25 22:12:11 2004 +++ llvm/utils/Burg/Makefile Thu Oct 28 11:48:13 2004 @@ -17,7 +17,7 @@ gram.tab.c gram.tab.h: gram.yc $(VERB) $(BISON) -o gram.tab.c -d $< -$(SourceDir)/lex.c: gram.tab.h +$(OBJDIR)/lex.o : gram.tab.h clean:: $(VERB) $(RM) -rf gram.tab.h gram.tab.c core* *.aux *.log *.dvi sample sample.c tmp From gaeke at cs.uiuc.edu Thu Oct 28 12:10:54 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu, 28 Oct 2004 12:10:54 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/tools/reopt-llc/Makefile Message-ID: <200410281710.MAA18795@kain.cs.uiuc.edu> Changes in directory reopt/tools/reopt-llc: Makefile updated: 1.3 -> 1.4 --- Log message: Update references to LLVM libraries whose names changed. Also, do not link cwriter with reopt-llc --- Diffs of the changes: (+20 -20) Index: reopt/tools/reopt-llc/Makefile diff -u reopt/tools/reopt-llc/Makefile:1.3 reopt/tools/reopt-llc/Makefile:1.4 --- reopt/tools/reopt-llc/Makefile:1.3 Mon Oct 18 23:36:53 2004 +++ reopt/tools/reopt-llc/Makefile Thu Oct 28 12:10:44 2004 @@ -1,26 +1,26 @@ LEVEL = ../.. TOOLNAME = reopt-llc +# LLVMCBackend LLVMLIBS = \ - cwriter \ - sparcv9 \ - sparcv9regalloc \ - sparcv9sched \ - target.a \ - codegen \ - sparcv9livevar \ - instrument \ - profpaths \ - ipo.a \ - ipa.a \ - transforms.a \ - scalaropts.a \ - analysis.a \ - transformutils.a \ - bcreader \ - bcwriter \ - vmcore \ - support.a \ - LLVMsystem.a + LLVMSparcV9 \ + LLVMSparcV9RegAlloc \ + LLVMSparcV9InstrSched \ + LLVMTarget.a \ + LLVMCodeGen \ + LLVMSparcV9LiveVar \ + LLVMInstrumentation \ + LLVMProfilePaths \ + LLVMipo.a \ + LLVMipa.a \ + LLVMTransforms.a \ + LLVMScalarOpts.a \ + LLVMAnalysis.a \ + LLVMTransformUtils.a \ + LLVMBCReader \ + LLVMBCWriter \ + LLVMCore \ + LLVMSupport.a \ + LLVMSystem.a TOOLLINKOPTS = $(PLATFORMLIBDL) From gaeke at cs.uiuc.edu Thu Oct 28 12:10:55 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu, 28 Oct 2004 12:10:55 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/tools/dumptrace/Makefile Message-ID: <200410281710.MAA18791@kain.cs.uiuc.edu> Changes in directory reopt/tools/dumptrace: Makefile updated: 1.3 -> 1.4 --- Log message: Update references to LLVM libraries whose names changed. Also, do not link cwriter with reopt-llc --- Diffs of the changes: (+2 -1) Index: reopt/tools/dumptrace/Makefile diff -u reopt/tools/dumptrace/Makefile:1.3 reopt/tools/dumptrace/Makefile:1.4 --- reopt/tools/dumptrace/Makefile:1.3 Mon Sep 20 17:48:57 2004 +++ reopt/tools/dumptrace/Makefile Thu Oct 28 12:10:44 2004 @@ -1,7 +1,8 @@ LEVEL = ../.. TOOLNAME = dumptrace USEDLIBS = traceio -LLVMLIBS = vmcore bcreader bcwriter analysis.a transformutils.a support.a LLVMsystem.a +LLVMLIBS = LLVMCore LLVMBCReader LLVMBCWriter LLVMAnalysis.a \ + LLVMTransformUtils.a LLVMSupport.a LLVMSystem.a TOOLLINKOPTS = $(PLATFORMLIBDL) From gaeke at cs.uiuc.edu Thu Oct 28 12:10:55 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu, 28 Oct 2004 12:10:55 -0500 (CDT) Subject: [llvm-commits] CVS: reopt/tools/ttftest/Makefile Message-ID: <200410281710.MAA18801@kain.cs.uiuc.edu> Changes in directory reopt/tools/ttftest: Makefile updated: 1.3 -> 1.4 --- Log message: Update references to LLVM libraries whose names changed. Also, do not link cwriter with reopt-llc --- Diffs of the changes: (+2 -1) Index: reopt/tools/ttftest/Makefile diff -u reopt/tools/ttftest/Makefile:1.3 reopt/tools/ttftest/Makefile:1.4 --- reopt/tools/ttftest/Makefile:1.3 Mon Sep 20 17:48:57 2004 +++ reopt/tools/ttftest/Makefile Thu Oct 28 12:10:44 2004 @@ -1,7 +1,8 @@ LEVEL = ../.. TOOLNAME = ttftest USEDLIBS = tracetofunction traceio -LLVMLIBS = vmcore bcreader bcwriter analysis.a transformutils.a support.a LLVMsystem.a +LLVMLIBS = LLVMCore LLVMBCReader LLVMBCWriter LLVMAnalysis.a \ + LLVMTransformUtils.a LLVMSupport.a LLVMSystem.a TOOLLINKOPTS = $(PLATFORMLIBDL) From criswell at cs.uiuc.edu Thu Oct 28 12:32:03 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 28 Oct 2004 12:32:03 -0500 (CDT) Subject: [llvm-commits] CVS: llvm/include/llvm/Support/MallocAllocator.h Message-ID: <200410281732.MAA23844@seraph.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: MallocAllocator.h updated: 1.8 -> 1.9 --- Log message: Only add the _Alloc_traits specialization in if we're compiling for Linux and not compiling for Sparc. This is still probably not correct, or portable, but it'll do for now. --- Diffs of the changes: (+2 -0) Index: llvm/include/llvm/Support/MallocAllocator.h diff -u llvm/include/llvm/Support/MallocAllocator.h:1.8 llvm/include/llvm/Support/MallocAllocator.h:1.9 --- llvm/include/llvm/Support/MallocAllocator.h:1.8 Wed Sep 1 17:55:35 2004 +++ llvm/include/llvm/Support/MallocAllocator.h Thu Oct 28 12:31:46 2004 @@ -72,6 +72,7 @@ } } // End llvm namespace +#if defined(__linux__) && !(defined (sparc) || defined (_sparc)) namespace std { template struct _Alloc_traits > { @@ -81,5 +82,6 @@ typedef ::llvm::MallocAllocator allocator_type; }; } +#endif #endif From criswell at cs.uiuc.edu Thu Oct 28 12:48:18 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 28 Oct 2004 12:48:18 -0500 (CDT) Subject: [llvm-commits] CVS: poolalloc/test/TEST.strace.Makefile Message-ID: <200410281748.MAA23911@seraph.cs.uiuc.edu> Changes in directory poolalloc/test: TEST.strace.Makefile updated: 1.3 -> 1.4 --- Log message: Corrected comment --- Diffs of the changes: (+2 -2) Index: poolalloc/test/TEST.strace.Makefile diff -u poolalloc/test/TEST.strace.Makefile:1.3 poolalloc/test/TEST.strace.Makefile:1.4 --- poolalloc/test/TEST.strace.Makefile:1.3 Wed Oct 27 10:49:11 2004 +++ poolalloc/test/TEST.strace.Makefile Thu Oct 28 12:48:07 2004 @@ -1,6 +1,6 @@ -##===- poolalloc/TEST.vtl.Makefile -------------------------*- Makefile -*-===## +##===- poolalloc/TEST.stract.Makefile ----------------------*- Makefile -*-===## # -# Makefile for getting performance metrics using Intel's VTune. +# Makefile for measuring system call activity with strace # ##===----------------------------------------------------------------------===## From criswell at cs.uiuc.edu Thu Oct 28 13:17:48 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 28 Oct 2004 13:17:48 -0500 Subject: [llvm-commits] CVS: poolalloc/test/TEST.p4perf.Makefile TEST.pavtl.Makefile TEST.perf.Makefile TEST.poolalloc.Makefile TEST.strace.Makefile Message-ID: <200410281817.NAA00952@choi.cs.uiuc.edu> Changes in directory poolalloc/test: TEST.p4perf.Makefile updated: 1.5 -> 1.6 TEST.pavtl.Makefile updated: 1.9 -> 1.10 TEST.perf.Makefile updated: 1.9 -> 1.10 TEST.poolalloc.Makefile updated: 1.24 -> 1.25 TEST.strace.Makefile updated: 1.4 -> 1.5 --- Log message: Correct path to LLVM test suite. Correct spelling of strace. --- Diffs of the changes: (+6 -6) Index: poolalloc/test/TEST.p4perf.Makefile diff -u poolalloc/test/TEST.p4perf.Makefile:1.5 poolalloc/test/TEST.p4perf.Makefile:1.6 --- poolalloc/test/TEST.p4perf.Makefile:1.5 Wed Oct 27 10:49:11 2004 +++ poolalloc/test/TEST.p4perf.Makefile Thu Oct 28 13:17:37 2004 @@ -6,7 +6,7 @@ TESTNAME = $* CURDIR := $(shell cd .; pwd) -PROGDIR := $(shell cd $(LEVEL)/projects/llvm-test; pwd)/ +PROGDIR := $(shell cd $(LLVM_OBJ_ROOT)/projects/llvm-test; pwd)/ RELDIR := $(subst $(PROGDIR),,$(CURDIR)) PERFEX := /home/vadve/criswell/local/Linux/bin/perfex Index: poolalloc/test/TEST.pavtl.Makefile diff -u poolalloc/test/TEST.pavtl.Makefile:1.9 poolalloc/test/TEST.pavtl.Makefile:1.10 --- poolalloc/test/TEST.pavtl.Makefile:1.9 Wed Oct 27 10:49:11 2004 +++ poolalloc/test/TEST.pavtl.Makefile Thu Oct 28 13:17:37 2004 @@ -6,7 +6,7 @@ TESTNAME = $* CURDIR := $(shell cd .; pwd) -PROGDIR := $(shell cd $(LEVEL)/projects/llvm-test; pwd)/ +PROGDIR := $(shell cd $(LLVM_OBJ_ROOT)/projects/llvm-test; pwd)/ RELDIR := $(subst $(PROGDIR),,$(CURDIR)) VTL := /opt/intel/vtune/bin/vtl Index: poolalloc/test/TEST.perf.Makefile diff -u poolalloc/test/TEST.perf.Makefile:1.9 poolalloc/test/TEST.perf.Makefile:1.10 --- poolalloc/test/TEST.perf.Makefile:1.9 Wed Oct 27 10:49:11 2004 +++ poolalloc/test/TEST.perf.Makefile Thu Oct 28 13:17:37 2004 @@ -6,7 +6,7 @@ TESTNAME = $* CURDIR := $(shell cd .; pwd) -PROGDIR := $(shell cd $(LEVEL)/projects/llvm-test; pwd)/ +PROGDIR := $(shell cd $(LLVM_OBJ_ROOT)/projects/llvm-test; pwd)/ RELDIR := $(subst $(PROGDIR),,$(CURDIR)) PERFEX := /home/vadve/criswell/local/Linux/bin/perfex Index: poolalloc/test/TEST.poolalloc.Makefile diff -u poolalloc/test/TEST.poolalloc.Makefile:1.24 poolalloc/test/TEST.poolalloc.Makefile:1.25 --- poolalloc/test/TEST.poolalloc.Makefile:1.24 Wed Oct 27 10:49:11 2004 +++ poolalloc/test/TEST.poolalloc.Makefile Thu Oct 28 13:17:37 2004 @@ -17,7 +17,7 @@ CURDIR := $(shell cd .; pwd) -PROGDIR := $(shell cd $(LEVEL)/projects/llvm-test; pwd)/ +PROGDIR := $(shell cd $(LLVM_OBJ_ROOT)/projects/llvm-test; pwd)/ RELDIR := $(subst $(PROGDIR),,$(CURDIR)) # Pool allocator pass shared object Index: poolalloc/test/TEST.strace.Makefile diff -u poolalloc/test/TEST.strace.Makefile:1.4 poolalloc/test/TEST.strace.Makefile:1.5 --- poolalloc/test/TEST.strace.Makefile:1.4 Thu Oct 28 12:48:07 2004 +++ poolalloc/test/TEST.strace.Makefile Thu Oct 28 13:17:37 2004 @@ -1,4 +1,4 @@ -##===- poolalloc/TEST.stract.Makefile ----------------------*- Makefile -*-===## +##===- poolalloc/TEST.strace.Makefile ----------------------*- Makefile -*-===## # # Makefile for measuring system call activity with strace # @@ -6,7 +6,7 @@ TESTNAME = $* CURDIR := $(shell cd .; pwd) -PROGDIR := $(shell cd $(LEVEL)/projects/llvm-test; pwd)/ +PROGDIR := $(shell cd $(LLVM_OBJ_ROOT)/projects/llvm-test; pwd)/ RELDIR := $(subst $(PROGDIR),,$(CURDIR)) STRACE := strace -c -f From criswell at cs.uiuc.edu Thu Oct 28 13:21:55 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 28 Oct 2004 13:21:55 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/MallocAllocator.h Message-ID: <200410281821.NAA01164@choi.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: MallocAllocator.h updated: 1.9 -> 1.10 --- Log message: Commented out the _Alloc_traits specialization entirely, as it is only supported by specific versions of GCC. It is left in place in case anyone wants to updated it for GCC 3.4 or re-use it for earlier versions of GCC where it works. --- Diffs of the changes: (+7 -1) Index: llvm/include/llvm/Support/MallocAllocator.h diff -u llvm/include/llvm/Support/MallocAllocator.h:1.9 llvm/include/llvm/Support/MallocAllocator.h:1.10 --- llvm/include/llvm/Support/MallocAllocator.h:1.9 Thu Oct 28 12:31:46 2004 +++ llvm/include/llvm/Support/MallocAllocator.h Thu Oct 28 13:21:41 2004 @@ -72,7 +72,13 @@ } } // End llvm namespace -#if defined(__linux__) && !(defined (sparc) || defined (_sparc)) +/* + * This specialization was used for optimization earlier, but doesn't appear + * to work with newer versions of GCC, Linux or otherwise. + * + * This can be re-enabled if desired, but by default, it won't be included. + */ +#if 0 namespace std { template struct _Alloc_traits > { From alkis at cs.uiuc.edu Thu Oct 28 14:13:01 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 14:13:01 -0500 Subject: [llvm-commits] CVS: llvm-java/include/llvm/Java/BytecodeParser.h Message-ID: <200410281913.OAA01126@zion.cs.uiuc.edu> Changes in directory llvm-java/include/llvm/Java: BytecodeParser.h updated: 1.11 -> 1.12 --- Log message: The order of evaluation is not specified in C/C++. Don't depend on it. --- Diffs of the changes: (+10 -4) Index: llvm-java/include/llvm/Java/BytecodeParser.h diff -u llvm-java/include/llvm/Java/BytecodeParser.h:1.11 llvm-java/include/llvm/Java/BytecodeParser.h:1.12 --- llvm-java/include/llvm/Java/BytecodeParser.h:1.11 Mon Oct 18 11:23:03 2004 +++ llvm-java/include/llvm/Java/BytecodeParser.h Thu Oct 28 14:12:50 2004 @@ -361,9 +361,12 @@ case LXOR: THIS->do_lxor(); break; - case IINC: - THIS->do_iinc(readUByte(code, i), readSByte(code, i)); + case IINC: { + unsigned index = wide ? readUShort(code, i) : readUByte(code, i); + int amount = wide ? readSShort(code, i) : readSByte(code, i); + THIS->do_iinc(index, amount); break; + } case I2L: THIS->do_i2l(); break; @@ -608,9 +611,12 @@ case WIDE: // FIXME: must throw something break; - case MULTIANEWARRAY: - THIS->do_multianewarray(readUShort(code, i), readUByte(code, i)); + case MULTIANEWARRAY: { + unsigned index = readUShort(code, i); + unsigned dims = readUByte(code, i); + THIS->do_multianewarray(index, dims); break; + } case IFNULL: { unsigned t = curBC + readUShort(code, i); THIS->do_ifnull(t, i + 1); From alkis at cs.uiuc.edu Thu Oct 28 14:37:34 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 14:37:34 -0500 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/OperandStack.cpp Message-ID: <200410281937.OAA02857@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: OperandStack.cpp updated: 1.1 -> 1.2 --- Log message: i2c, i2b and i2s truncate the value and cast it back to an int before pushing it on the operand stack. --- Diffs of the changes: (+2 -2) Index: llvm-java/lib/Compiler/OperandStack.cpp diff -u llvm-java/lib/Compiler/OperandStack.cpp:1.1 llvm-java/lib/Compiler/OperandStack.cpp:1.2 --- llvm-java/lib/Compiler/OperandStack.cpp:1.1 Fri Oct 15 21:38:07 2004 +++ llvm-java/lib/Compiler/OperandStack.cpp Thu Oct 28 14:37:24 2004 @@ -25,12 +25,12 @@ NULL, "opStack" + utostr(TheStack.size()), insertAtEnd)); - new StoreInst(value, TheStack.top(), false, insertAtEnd); + new StoreInst(value, TheStack.top(), insertAtEnd); } llvm::Value* OperandStack::pop(BasicBlock* insertAtEnd) { Value* val = TheStack.top(); TheStack.pop(); - return new LoadInst(val, "pop", false, insertAtEnd); + return new LoadInst(val, "pop", insertAtEnd); } From alkis at cs.uiuc.edu Thu Oct 28 14:37:51 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 14:37:51 -0500 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200410281937.OAA02887@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.130 -> 1.131 --- Log message: i2c, i2b and i2s truncate the value and cast it back to an int before pushing it on the operand stack. --- Diffs of the changes: (+10 -3) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.130 llvm-java/lib/Compiler/Compiler.cpp:1.131 --- llvm-java/lib/Compiler/Compiler.cpp:1.130 Thu Oct 28 02:49:05 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Thu Oct 28 14:37:41 2004 @@ -1200,9 +1200,9 @@ void do_d2i() { do_cast_common(Type::IntTy); } void do_d2l() { do_cast_common(Type::LongTy); } void do_d2f() { do_cast_common(Type::FloatTy); } - void do_i2b() { do_cast_common(Type::SByteTy); } - void do_i2c() { do_cast_common(Type::UShortTy); } - void do_i2s() { do_cast_common(Type::ShortTy); } + void do_i2b() { do_truncate_common(Type::SByteTy); } + void do_i2c() { do_truncate_common(Type::UShortTy); } + void do_i2s() { do_truncate_common(Type::ShortTy); } void do_cast_common(Type* type) { Value* v1 = currentOpStack_->pop(currentBB_); @@ -1210,6 +1210,13 @@ currentOpStack_->push(v1, currentBB_); } + void do_truncate_common(Type* type) { + Value* v1 = currentOpStack_->pop(currentBB_); + v1 = new CastInst(v1, type, TMP, currentBB_); + v1 = new CastInst(v1, Type::IntTy, TMP, currentBB_); + currentOpStack_->push(v1, currentBB_); + } + void do_lcmp() { Value* v2 = currentOpStack_->pop(currentBB_); Value* v1 = currentOpStack_->pop(currentBB_); From alkis at cs.uiuc.edu Thu Oct 28 14:38:44 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 14:38:44 -0500 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Locals.cpp Message-ID: <200410281938.OAA02951@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Locals.cpp updated: 1.1 -> 1.2 --- Log message: Use the shorter version of LoadInst and StoreInst constructors. --- Diffs of the changes: (+2 -2) Index: llvm-java/lib/Compiler/Locals.cpp diff -u llvm-java/lib/Compiler/Locals.cpp:1.1 llvm-java/lib/Compiler/Locals.cpp:1.2 --- llvm-java/lib/Compiler/Locals.cpp:1.1 Fri Oct 15 21:38:07 2004 +++ llvm-java/lib/Compiler/Locals.cpp Thu Oct 28 14:38:34 2004 @@ -34,11 +34,11 @@ "local" + utostr(i), insertAtEnd); - new StoreInst(value, TheLocals[i], false, insertAtEnd); + new StoreInst(value, TheLocals[i], insertAtEnd); } llvm::Value* Locals::load(unsigned i, BasicBlock* insertAtEnd) { assert(TheLocals[i] && "Attempt to load a non initialized global!"); - return new LoadInst(TheLocals[i], "load", false, insertAtEnd); + return new LoadInst(TheLocals[i], "load", insertAtEnd); } From lattner at cs.uiuc.edu Thu Oct 28 15:06:52 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 28 Oct 2004 15:06:52 -0500 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp TransformFunctionBody.cpp Message-ID: <200410282006.i9SK6q9l015232@apoc.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.74 -> 1.75 TransformFunctionBody.cpp updated: 1.28 -> 1.29 --- Log message: Header file is now moved to this directory --- Diffs of the changes: (+2 -2) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.74 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.75 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.74 Sun Sep 19 23:35:27 2004 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Thu Oct 28 15:06:41 2004 @@ -7,7 +7,7 @@ #define DEBUG_TYPE "PoolAllocator" #include "EquivClassGraphs.h" -#include "poolalloc/PoolAllocate.h" +#include "PoolAllocate.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Instructions.h" Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.28 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.29 --- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.28 Mon Sep 13 23:06:28 2004 +++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Thu Oct 28 15:06:41 2004 @@ -6,7 +6,7 @@ #define DEBUG_TYPE "PoolAllocator" #include "EquivClassGraphs.h" -#include "poolalloc/PoolAllocate.h" +#include "PoolAllocate.h" #include "llvm/Analysis/DataStructure//DataStructure.h" #include "llvm/Analysis/DataStructure/DSGraph.h" #include "llvm/Module.h" From lattner at cs.uiuc.edu Thu Oct 28 15:07:19 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 28 Oct 2004 15:07:19 -0500 Subject: [llvm-commits] CVS: poolalloc/include/poolalloc/PoolAllocate.h Message-ID: <200410282007.i9SK7JYA016903@apoc.cs.uiuc.edu> Changes in directory poolalloc/include/poolalloc: PoolAllocate.h (r1.25) removed --- Log message: This file is now in lib/PoolAllocate directly --- Diffs of the changes: (+0 -0) From alkis at cs.uiuc.edu Thu Oct 28 15:45:22 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 15:45:22 -0500 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200410282045.PAA06295@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.131 -> 1.132 --- Log message: Ignore monitorenter and monitorexit bytecodes. --- Diffs of the changes: (+2 -2) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.131 llvm-java/lib/Compiler/Compiler.cpp:1.132 --- llvm-java/lib/Compiler/Compiler.cpp:1.131 Thu Oct 28 14:37:41 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Thu Oct 28 15:45:12 2004 @@ -1611,11 +1611,11 @@ } void do_monitorenter() { - assert(0 && "not implemented"); + // assert(0 && "not implemented"); } void do_monitorexit() { - assert(0 && "not implemented"); + // assert(0 && "not implemented"); } void do_multianewarray(unsigned index, unsigned dims) { From alkis at cs.uiuc.edu Thu Oct 28 15:46:05 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu, 28 Oct 2004 15:46:05 -0500 Subject: [llvm-commits] CVS: llvm-java/lib/Compiler/Compiler.cpp Message-ID: <200410282046.PAA06325@zion.cs.uiuc.edu> Changes in directory llvm-java/lib/Compiler: Compiler.cpp updated: 1.132 -> 1.133 --- Log message: Add array of primitives support. --- Diffs of the changes: (+295 -11) Index: llvm-java/lib/Compiler/Compiler.cpp diff -u llvm-java/lib/Compiler/Compiler.cpp:1.132 llvm-java/lib/Compiler/Compiler.cpp:1.133 --- llvm-java/lib/Compiler/Compiler.cpp:1.132 Thu Oct 28 15:45:12 2004 +++ llvm-java/lib/Compiler/Compiler.cpp Thu Oct 28 15:45:55 2004 @@ -92,6 +92,7 @@ /// object). struct ClassInfo { ClassInfo() : type(NULL), interfaceIdx(0) { } + Type* type; unsigned interfaceIdx; typedef std::map Field2IndexMap; @@ -119,6 +120,7 @@ }; typedef std::map Class2VTableInfoMap; Class2VTableInfoMap c2viMap_; + Class2VTableInfoMap ac2viMap_; public: Compiler(Module& m) @@ -389,6 +391,71 @@ return ci; } + /// Creates a ClassInfo object for an array of the specified + /// element type. + ClassInfo buildArrayClassInfo(Type* elementTy) { + ClassInfo arrayInfo; + + std::vector elements; + elements.reserve(3); + elements.push_back(getClassInfo(ClassFile::get("java/lang/Object")).type); + elements.push_back(Type::UIntTy); + arrayInfo.f2iMap.insert(std::make_pair("", elements.size())); + elements.push_back(ArrayType::get(elementTy, 0)); + arrayInfo.f2iMap.insert(std::make_pair("", elements.size())); + + arrayInfo.type = StructType::get(elements); + + return arrayInfo; + } + + /// Returns the ClassInfo object associated with an array of the + /// specified element type. + const ClassInfo& getPrimitiveArrayInfo(JType type) { + switch (type) { + case BOOLEAN: { + static ClassInfo arrayInfo = buildArrayClassInfo(Type::BoolTy); + return arrayInfo; + } + case CHAR: { + static ClassInfo arrayInfo = buildArrayClassInfo(Type::UShortTy); + return arrayInfo; + } + case FLOAT: { + static ClassInfo arrayInfo = buildArrayClassInfo(Type::FloatTy); + return arrayInfo; + } + case DOUBLE: { + static ClassInfo arrayInfo = buildArrayClassInfo(Type::DoubleTy); + return arrayInfo; + } + case BYTE: { + static ClassInfo arrayInfo = buildArrayClassInfo(Type::SByteTy); + return arrayInfo; + } + case SHORT: { + static ClassInfo arrayInfo = buildArrayClassInfo(Type::ShortTy); + return arrayInfo; + } + case INT: { + static ClassInfo arrayInfo = buildArrayClassInfo(Type::IntTy); + return arrayInfo; + } + case LONG: { + static ClassInfo arrayInfo = buildArrayClassInfo(Type::LongTy); + return arrayInfo; + } + } + } + + /// Returns the ClassInfo object associated with an array of the + /// specified element type. + const ClassInfo& getObjectArrayInfo() { + static ClassInfo arrayInfo = buildArrayClassInfo( + getClassInfo(ClassFile::get("java/lang/Object")).type); + return arrayInfo; + } + /// Builds the super classes' vtable array for this classfile and /// its corresponding VTable. The most generic class goes first in /// the array. @@ -563,8 +630,8 @@ getVTableInfo(ClassFile::get(super->getName()->str())); // Copy the super vtables array. - vi.superVtables.push_back(superVI.vtable); vi.superVtables.reserve(superVI.superVtables.size() + 1); + vi.superVtables.push_back(superVI.vtable); std::copy(superVI.superVtables.begin(), superVI.superVtables.end(), std::back_inserter(vi.superVtables)); @@ -594,10 +661,10 @@ std::string funcName = className + '/' + methodDescr; - const FunctionType* funcTy = cast( - getType(method->getDescriptor(), getClassInfo(cf).type)); - Function* vfun = module_.getOrInsertFunction(funcName, funcTy); - toCompileFunctions_.insert(vfun); + const FunctionType* funcTy = cast( + getType(method->getDescriptor(), getClassInfo(cf).type)); + Function* vfun = module_.getOrInsertFunction(funcName, funcTy); + toCompileFunctions_.insert(vfun); unsigned& index = vi.m2iMap[methodDescr]; if (!index) { @@ -634,6 +701,138 @@ return vi; } + VTableInfo buildArrayVTableInfo(Type* elementTy) { + assert(elementTy->isPrimitiveType() && + "This should not be called for arrays of non-primitive types"); + + VTableInfo vi; + const VTableInfo& superVI = + getVTableInfo(ClassFile::get("java/lang/Object")); + + // Add java/lang/Object as its superclass. + vi.superVtables.reserve(1); + vi.superVtables.push_back(superVI.vtable); + + // Copy the constants from java/lang/Object vtable. + ConstantStruct* superInit = + cast(superVI.vtable->getInitializer()); + std::vector init(superInit->getNumOperands()); + // Use a null typeinfo struct for now. + init[0] = llvm::Constant::getNullValue(VTableInfo::TypeInfoTy); + // Fill in the function pointers as they are in the super + // class. overriden methods will be replaced later. + for (unsigned i = 0, e = superInit->getNumOperands(); i != e; ++i) + init[i] = superInit->getOperand(i); + vi.m2iMap = superVI.m2iMap; + +#ifndef NDEBUG + for (unsigned i = 0, e = init.size(); i != e; ++i) + assert(init[i] && "No elements in the initializer should be NULL!"); +#endif + + const std::string& globalName = + elementTy->getDescription() + ""; + + llvm::Constant* vtable = ConstantStruct::get(init); + module_.addTypeName(globalName, vtable->getType()); + vi.vtable = new GlobalVariable(vtable->getType(), + true, + GlobalVariable::ExternalLinkage, + vtable, + globalName, + &module_); + + // Construct the typeinfo now. + std::vector typeInfoInit; + typeInfoInit.push_back(ConstantSInt::get(Type::IntTy, 1)); + // Build the super classes' vtable array. + ArrayType* vtablesArrayTy = + ArrayType::get(PointerType::get(VTableInfo::VTableTy), + vi.superVtables.size()); + + GlobalVariable* vtablesArray = new GlobalVariable( + vtablesArrayTy, + true, + GlobalVariable::ExternalLinkage, + ConstantArray::get(vtablesArrayTy, vi.superVtables), + elementTy->getDescription() + "", + &module_); + + typeInfoInit.push_back( + ConstantExpr::getGetElementPtr( + vtablesArray, + std::vector(2, ConstantUInt::get(Type::UIntTy, 0)))); + typeInfoInit.push_back(ConstantSInt::get(Type::IntTy, 0)); + typeInfoInit.push_back( + llvm::Constant::getNullValue( + PointerType::get(PointerType::get(VTableInfo::VTableTy)))); + + init[0] = ConstantStruct::get(VTableInfo::TypeInfoTy, typeInfoInit); + vi.vtable->setInitializer(ConstantStruct::get(init)); + + return vi; + } + + // Returns the VTableInfo object for an array of the specified + // element type. + const VTableInfo& getPrimitiveArrayVTableInfo(JType type) { + switch (type) { + case BOOLEAN: { + static VTableInfo arrayInfo = buildArrayVTableInfo(Type::BoolTy); + return arrayInfo; + } + case CHAR: { + static VTableInfo arrayInfo = buildArrayVTableInfo(Type::UShortTy); + return arrayInfo; + } + case FLOAT: { + static VTableInfo arrayInfo = buildArrayVTableInfo(Type::FloatTy); + return arrayInfo; + } + case DOUBLE: { + static VTableInfo arrayInfo = buildArrayVTableInfo(Type::DoubleTy); + return arrayInfo; + } + case BYTE: { + static VTableInfo arrayInfo = buildArrayVTableInfo(Type::SByteTy); + return arrayInfo; + } + case SHORT: { + static VTableInfo arrayInfo = buildArrayVTableInfo(Type::ShortTy); + return arrayInfo; + } + case INT: { + static VTableInfo arrayInfo = buildArrayVTableInfo(Type::IntTy); + return arrayInfo; + } + case LONG: { + static VTableInfo arrayInfo = buildArrayVTableInfo(Type::LongTy); + return arrayInfo; + } + } + } + +// const VTableInfo& getArrayVTableInfo(ClassFile* cf) { +// Class2VTableInfoMap::iterator it = ac2viMap_.lower_bound(cf); +// if (it != ac2viMap_.end() && it->first == cf) +// return it->second; + +// const std::string& className = cf->getThisClass()->getName()->str(); +// DEBUG(std::cerr << "Building VTableInfo for: " << className << "[]\n"); +// VTableInfo& vi = ac2viMap_[cf]; + +// assert(!vi.vtable && vi.m2iMap.empty() && +// "got already initialized VTableInfo!"); + + +// ConstantClass* super = cf->getSuperClass(); +// if (!super) { +// } +// else { + +// } +// } + /// Emits the necessary code to get a pointer to a static field of /// an object. GlobalVariable* getStaticField(unsigned index) { @@ -780,7 +979,7 @@ } DEBUG(std::cerr << "Finished compilation of method: " - << classMethodDesc << '\n'); + << classMethodDesc << '\n'); DEBUG(function->dump()); return function; @@ -953,7 +1152,17 @@ void do_saload() { do_aload_common(); } void do_aload_common() { - assert(0 && "not implemented"); + Value* index = currentOpStack_->pop(currentBB_); + Value* arrayRef = currentOpStack_->pop(currentBB_); + + std::vector indices; + indices.reserve(2); + indices.push_back(ConstantUInt::get(Type::UIntTy, 2)); + indices.push_back(index); + Value* elementPtr = + new GetElementPtrInst(arrayRef, indices, TMP, currentBB_); + Value* result = new LoadInst(elementPtr, TMP, currentBB_); + currentOpStack_->push(result, currentBB_); } void do_istore(unsigned index) { do_store_common(index); } @@ -977,7 +1186,22 @@ void do_sastore() { do_astore_common(); } void do_astore_common() { - assert(0 && "not implemented"); + Value* value = currentOpStack_->pop(currentBB_); + Value* index = currentOpStack_->pop(currentBB_); + Value* arrayRef = currentOpStack_->pop(currentBB_); + + std::vector indices; + indices.reserve(2); + indices.push_back(ConstantUInt::get(Type::UIntTy, 2)); + indices.push_back(index); + Value* elementPtr = + new GetElementPtrInst(arrayRef, indices, TMP, currentBB_); + // We need this case because ints on the stack can be stored to + // arrays of bool, byte, short or char. + value = new CastInst( + value, cast(elementPtr->getType())->getElementType(), + TMP, currentBB_); + new StoreInst(value, elementPtr, currentBB_); } void do_pop() { @@ -1184,6 +1408,8 @@ void do_iinc(unsigned index, int amount) { Value* v = currentLocals_->load(index, currentBB_); Value* a = ConstantSInt::get(Type::IntTy, amount); + std::cerr << "v: " << *v << '\n'; + std::cerr << "a: " << *a << '\n'; BinaryOperator::createAdd(v, a, TMP, currentBB_); currentLocals_->store(index, v, currentBB_); } @@ -1381,6 +1607,9 @@ void do_putfield(unsigned index) { Value* v = currentOpStack_->pop(currentBB_); Value* p = currentOpStack_->pop(currentBB_); + Value* fp = getField(index, p); + const Type* ft = cast(fp->getType())->getElementType(); + v = new CastInst(v, ft, TMP, currentBB_); new StoreInst(v, getField(index, p), currentBB_); } @@ -1464,7 +1693,7 @@ const ClassInfo& ci = getClassInfo(ClassFile::get(className)); FunctionType* funcTy = - cast(getType(nameAndType->getDescriptor(), ci.type)); + cast(getType(nameAndType->getDescriptor(), ci.type)); Function* function = module_.getOrInsertFunction(funcName, funcTy); toCompileFunctions_.insert(function); makeCall(function, getParams(funcTy)); @@ -1561,8 +1790,56 @@ currentOpStack_->push(objRef, currentBB_); } + Value* getArrayLengthPtr(Value* arrayRef) const { + std::vector indices; + indices.reserve(2); + indices.push_back(ConstantUInt::get(Type::UIntTy, 0)); + indices.push_back(ConstantUInt::get(Type::UIntTy, 1)); + + return new GetElementPtrInst(arrayRef, indices, TMP, currentBB_); + } + + Value* getArrayObjectBasePtr(Value* arrayRef) const { + std::vector indices; + indices.reserve(2); + indices.push_back(ConstantUInt::get(Type::UIntTy, 0)); + indices.push_back(ConstantUInt::get(Type::UIntTy, 0)); + + return new GetElementPtrInst(arrayRef, indices, TMP, currentBB_); + } + void do_newarray(JType type) { - assert(0 && "not implemented"); + Value* count = currentOpStack_->pop(currentBB_); + count = new CastInst(count, Type::UIntTy, TMP, currentBB_); + + const ClassInfo& ci = getPrimitiveArrayInfo(type); + const VTableInfo& vi = getPrimitiveArrayVTableInfo(type); + + // The size of the array part of the struct. + Value* size = BinaryOperator::create( + Instruction::Mul, count, ConstantExpr::getSizeOf(getType(type)), + TMP, currentBB_); + // Plus the size of the rest of the struct. + size = BinaryOperator::create( + Instruction::Add, size, ConstantExpr::getSizeOf(ci.type), + TMP, currentBB_); + // Allocate memory for the object. + Value* objRef = new MallocInst(Type::SByteTy, size, TMP, currentBB_); + objRef = new CastInst(objRef, PointerType::get(ci.type), TMP, currentBB_); + + // Store the size. + Value* lengthPtr = getArrayLengthPtr(objRef); + new StoreInst(count, lengthPtr, currentBB_); + // Install the vtable pointer. + Value* objBase = getArrayObjectBasePtr(objRef); + Value* vtable = new CastInst(vi.vtable, + PointerType::get(VTableInfo::VTableTy), + TMP, currentBB_); + Function* f = module_.getOrInsertFunction( + LLVM_JAVA_SETOBJECTCLASS, Type::VoidTy, + objBase->getType(), PointerType::get(VTableInfo::VTableTy), NULL); + new CallInst(f, objBase, vtable, "", currentBB_); + currentOpStack_->push(objRef, currentBB_); } void do_anewarray(unsigned index) { @@ -1570,7 +1847,14 @@ } void do_arraylength() { - assert(0 && "not implemented"); + Value* arrayRef = currentOpStack_->pop(currentBB_); + const ClassInfo& ci = getObjectArrayInfo(); + arrayRef = + new CastInst(arrayRef, PointerType::get(ci.type), TMP, currentBB_); + Value* lengthPtr = getArrayLengthPtr(arrayRef); + Value* length = new LoadInst(lengthPtr, TMP, currentBB_); + length = new CastInst(length, Type::IntTy, TMP, currentBB_); + currentOpStack_->push(length, currentBB_); } void do_athrow() { From criswell at cs.uiuc.edu Thu Oct 28 16:11:59 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu, 28 Oct 2004 16:11:59 -0500 Subject: [llvm-commits] CVS: poolalloc/test/TEST.strace.Makefile Message-ID: <200410282111.QAA04957@choi.cs.uiuc.edu> Changes in directory poolalloc/test: TEST.strace.Makefile updated: 1.5 -> 1.6 --- Log message: Added dependencies that get the strace tests working again. --- Diffs of the changes: (+1 -2) Index: poolalloc/test/TEST.strace.Makefile diff -u poolalloc/test/TEST.strace.Makefile:1.5 poolalloc/test/TEST.strace.Makefile:1.6 --- poolalloc/test/TEST.strace.Makefile:1.5 Thu Oct 28 13:17:37 2004 +++ poolalloc/test/TEST.strace.Makefile Thu Oct 28 16:11:48 2004 @@ -42,9 +42,8 @@ $(VERB) cat $(STDIN_FILENAME) | $(STRACE) -o $@ $< $(RUN_OPTIONS) endif - $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \ -Output/%.$(TEST).report.txt: +Output/%.$(TEST).report.txt: Output/test.$(TEST).pa.% Output/test.$(TEST).% touch $@ $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \ From lattner at cs.uiuc.edu Thu Oct 28 22:46:52 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu, 28 Oct 2004 22:46:52 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410290346.i9T3kq9S015044@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.221 -> 1.222 --- Log message: This line breaks FreeBSD and apparently isn't useful anymore. --- Diffs of the changes: (+0 -1) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.221 llvm/Makefile.rules:1.222 --- llvm/Makefile.rules:1.221 Thu Oct 28 04:15:28 2004 +++ llvm/Makefile.rules Thu Oct 28 22:46:38 2004 @@ -762,7 +762,6 @@ %.cpp: %.l @$(ECHO) Flexing $< $(VERB) $(FLEX) -t $< | \ - $(SED) '/^find_rule/d' | \ $(SED) 's/void yyunput/inline void yyunput/' | \ $(SED) 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \ $(SED) 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' \ From brukman at cs.uiuc.edu Thu Oct 28 23:33:30 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu, 28 Oct 2004 23:33:30 -0500 Subject: [llvm-commits] CVS: llvm/docs/ProgrammersManual.html Message-ID: <200410290433.XAA13569@zion.cs.uiuc.edu> Changes in directory llvm/docs: ProgrammersManual.html updated: 1.68 -> 1.69 --- Log message: * Add spaces between function names for readability * Separate paragraphs, flush HTML text to left margin for ease of editing --- Diffs of the changes: (+46 -36) Index: llvm/docs/ProgrammersManual.html diff -u llvm/docs/ProgrammersManual.html:1.68 llvm/docs/ProgrammersManual.html:1.69 --- llvm/docs/ProgrammersManual.html:1.68 Wed Aug 4 00:10:48 2004 +++ llvm/docs/ProgrammersManual.html Thu Oct 28 23:33:19 2004 @@ -1200,42 +1200,52 @@
      -
    • BasicBlock(const std::string &Name = "", BasicBlock(const std::string &Name = "", Function *Parent = 0) -

      The BasicBlock constructor is used to create new basic -blocks for insertion into a function. The constructor optionally takes -a name for the new block, and a Function -to insert it into. If the Parent parameter is specified, the -new BasicBlock is automatically inserted at the end of the -specified Function, if not specified, -the BasicBlock must be manually inserted into the Function.

      -
    • -
    • BasicBlock::iterator - Typedef for instruction list -iterator
      - BasicBlock::const_iterator - Typedef for const_iterator.
      - begin(), end(), front(), back(),size(),empty(),rbegin(),rend() -- STL style functions for accessing the instruction list. -

      These methods and typedefs are forwarding functions that have -the same semantics as the standard library methods of the same names. -These methods expose the underlying instruction list of a basic block in -a way that is easy to manipulate. To get the full complement of -container operations (including operations to update the list), you must -use the getInstList() method.

    • -
    • BasicBlock::InstListType &getInstList() -

      This method is used to get access to the underlying container -that actually holds the Instructions. This method must be used when -there isn't a forwarding function in the BasicBlock class for -the operation that you would like to perform. Because there are no -forwarding functions for "updating" operations, you need to use this if -you want to update the contents of a BasicBlock.

    • -
    • Function *getParent() -

      Returns a pointer to Function -the block is embedded into, or a null pointer if it is homeless.

    • -
    • TerminatorInst *getTerminator() -

      Returns a pointer to the terminator instruction that appears at -the end of the BasicBlock. If there is no terminator -instruction, or if the last instruction in the block is not a -terminator, then a null pointer is returned.

    • + +

      The BasicBlock constructor is used to create new basic blocks for +insertion into a function. The constructor optionally takes a name for the new +block, and a Function to insert it into. If +the Parent parameter is specified, the new BasicBlock is +automatically inserted at the end of the specified Function, if not specified, the BasicBlock must be +manually inserted into the Function.

      + +
    • BasicBlock::iterator - Typedef for instruction list iterator
      +BasicBlock::const_iterator - Typedef for const_iterator.
      +begin(), end(), front(), back(), +size(), empty(), rbegin(), rend() - +STL-style functions for accessing the instruction list. + +

      These methods and typedefs are forwarding functions that have the same +semantics as the standard library methods of the same names. These methods +expose the underlying instruction list of a basic block in a way that is easy to +manipulate. To get the full complement of container operations (including +operations to update the list), you must use the getInstList() +method.

    • + +
    • BasicBlock::InstListType &getInstList() + +

      This method is used to get access to the underlying container that actually +holds the Instructions. This method must be used when there isn't a forwarding +function in the BasicBlock class for the operation that you would like +to perform. Because there are no forwarding functions for "updating" +operations, you need to use this if you want to update the contents of a +BasicBlock.

    • + +
    • Function *getParent() + +

      Returns a pointer to Function the block is +embedded into, or a null pointer if it is homeless.

    • + +
    • TerminatorInst *getTerminator() + +

      Returns a pointer to the terminator instruction that appears at the end of +the BasicBlock. If there is no terminator instruction, or if the last +instruction in the block is not a terminator, then a null pointer is +returned.

    • +
    @@ -2044,7 +2054,7 @@ Dinakar Dhurjati and Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/08/04 05:10:48 $ + Last modified: $Date: 2004/10/29 04:33:19 $ From reid at x10sys.com Thu Oct 28 23:47:43 2004 From: reid at x10sys.com (Reid Spencer) Date: Thu, 28 Oct 2004 23:47:43 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410290447.XAA13747@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.222 -> 1.223 --- Log message: Make the list of automatic Makefile* files updated explicit instead of generally wildcarded. --- Diffs of the changes: (+2 -2) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.222 llvm/Makefile.rules:1.223 --- llvm/Makefile.rules:1.222 Thu Oct 28 22:46:38 2004 +++ llvm/Makefile.rules Thu Oct 28 23:47:33 2004 @@ -57,8 +57,8 @@ # PRECONDITIONS: that which must be built/checked first ################################################################################ -SRCMKFILES := $(BUILD_SRC_DIR)/Makefile $(filter-out Makefile.rules %.in,\ - $(wildcard $(BUILD_SRC_DIR)/Makefile.*)) +SRCMKFILES := $(filter %Makefile %Makefile.rules %Makefile.tests \ + %Makefile.JIT,$(wildcard $(BUILD_SRC_DIR)/Makefile*)) OBJMKFILES := $(subst $(BUILD_SRC_DIR),$(BUILD_OBJ_DIR),$(SRCMKFILES)) CONFIGURE := $(LLVM_SRC_ROOT)/configure CONFIG_STATUS := $(LLVM_OBJ_ROOT)/config.status From reid at x10sys.com Fri Oct 29 01:54:49 2004 From: reid at x10sys.com (Reid Spencer) Date: Fri, 29 Oct 2004 01:54:49 -0500 Subject: [llvm-commits] CVS: llvm/projects/Stacker/samples/Makefile Message-ID: <200410290654.BAA15409@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/samples: Makefile updated: 1.6 -> 1.7 --- Log message: Make sure the LLVM_CONFIG_DIR environment variable is set so we don't get error messages from the compiler. --- Diffs of the changes: (+1 -1) Index: llvm/projects/Stacker/samples/Makefile diff -u llvm/projects/Stacker/samples/Makefile:1.6 llvm/projects/Stacker/samples/Makefile:1.7 --- llvm/projects/Stacker/samples/Makefile:1.6 Thu Oct 28 01:42:34 2004 +++ llvm/projects/Stacker/samples/Makefile Fri Oct 29 01:42:38 2004 @@ -14,7 +14,7 @@ SAMPLES = fibonacci hello prime goof -LLVMC_EXEC = $(TOOLDIR)/llvmc +LLVMC_EXEC = LLVM_CONFIG_DIR=$(BUILD_SRC_ROOT)/tools/llvmc $(TOOLDIR)/llvmc all :: $(SAMPLES) From lattner at cs.uiuc.edu Fri Oct 29 11:59:31 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 29 Oct 2004 11:59:31 -0500 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200410291659.i9TGxVe8004069@apoc.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.75 -> 1.76 --- Log message: Default to all nodes --- Diffs of the changes: (+1 -1) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.75 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.76 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.75 Thu Oct 28 15:06:41 2004 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Fri Oct 29 11:59:21 2004 @@ -69,7 +69,7 @@ clEnumVal(SmartCoallesceNodes, " Use the smart node merging heuristic"), clEnumVal(NoNodes, " Do not pool allocate anything"), clEnumValEnd), - cl::init(SmartCoallesceNodes)); + cl::init(AllNodes)); cl::opt DisableInitDestroyOpt("poolalloc-force-simple-pool-init", From vadve at cs.uiuc.edu Fri Oct 29 12:43:30 2004 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Fri, 29 Oct 2004 12:43:30 -0500 Subject: [llvm-commits] CVS: llvm/utils/cvsupdate Message-ID: <200410291743.i9THhUF4004969@apoc.cs.uiuc.edu> Changes in directory llvm/utils: cvsupdate updated: 1.6 -> 1.7 --- Log message: Print P and [AR] files on update. --- Diffs of the changes: (+0 -0) From gaeke at cs.uiuc.edu Fri Oct 29 13:23:02 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri, 29 Oct 2004 13:23:02 -0500 (CDT) Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/Emitter.cpp Message-ID: <200410291823.NAA04371@kain.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: Emitter.cpp updated: 1.45 -> 1.46 --- Log message: When emitting debug msgs for function stubs, don't truncate the printed pointer value if sizeof(unsigned) != pointer size. Instead, use uintptr_t. --- Diffs of the changes: (+1 -1) Index: llvm/lib/ExecutionEngine/JIT/Emitter.cpp diff -u llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.45 llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.46 --- llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.45 Mon Sep 13 17:38:12 2004 +++ llvm/lib/ExecutionEngine/JIT/Emitter.cpp Fri Oct 29 13:22:45 2004 @@ -187,7 +187,7 @@ void *Emitter::finishFunctionStub(const Function &F) { NumBytes += CurByte-CurBlock; DEBUG(std::cerr << "Finished CodeGen of [0x" << std::hex - << (unsigned)(intptr_t)CurBlock + << (uintptr_t)CurBlock << std::dec << "] Function stub for: " << F.getName() << ": " << CurByte-CurBlock << " bytes of text\n"); std::swap(CurBlock, SavedCurBlock); From brukman at cs.uiuc.edu Fri Oct 29 13:37:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 29 Oct 2004 13:37:01 -0500 Subject: [llvm-commits] CVS: llvm/tools/llee/Makefile Message-ID: <200410291837.NAA04979@zion.cs.uiuc.edu> Changes in directory llvm/tools/llee: Makefile updated: 1.10 -> 1.11 --- Log message: LLEE execve() wrapper library has changed its name and location --- Diffs of the changes: (+1 -1) Index: llvm/tools/llee/Makefile diff -u llvm/tools/llee/Makefile:1.10 llvm/tools/llee/Makefile:1.11 --- llvm/tools/llee/Makefile:1.10 Wed Oct 27 18:18:45 2004 +++ llvm/tools/llee/Makefile Fri Oct 29 13:36:51 2004 @@ -17,7 +17,7 @@ $(TOOLDIR)/llee: Makefile @$(ECHO) Constructing llee shell script - $(VERB) echo exec env LD_PRELOAD=$(TOOLDIR)/libexecve$(SHLIBEXT) $$\* > $@ + $(VERB) echo exec env LD_PRELOAD=$(LIBDIR)/libLLVMexecve$(SHLIBEXT) $$\* > $@ $(VERB) chmod u+x $@ clean:: From brukman at cs.uiuc.edu Fri Oct 29 13:43:28 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 29 Oct 2004 13:43:28 -0500 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Function.cpp Verifier.cpp Message-ID: <200410291843.NAA07329@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Function.cpp updated: 1.81 -> 1.82 Verifier.cpp updated: 1.120 -> 1.121 --- Log message: The Alpha (tm) intrinsics have never been used anywhere --- Diffs of the changes: (+0 -47) Index: llvm/lib/VMCore/Function.cpp diff -u llvm/lib/VMCore/Function.cpp:1.81 llvm/lib/VMCore/Function.cpp:1.82 --- llvm/lib/VMCore/Function.cpp:1.81 Mon Oct 11 23:32:37 2004 +++ llvm/lib/VMCore/Function.cpp Fri Oct 29 13:43:17 2004 @@ -181,38 +181,7 @@ assert(getName().size() != 5 && "'llvm.' is an invalid intrinsic name!"); - // a table of all Alpha intrinsic functions - struct { - std::string name; // The name of the intrinsic - unsigned id; // Its ID number - } alpha_intrinsics[] = { - { "llvm.alpha.ctlz", Intrinsic::alpha_ctlz }, - { "llvm.alpha.cttz", Intrinsic::alpha_cttz }, - { "llvm.alpha.ctpop", Intrinsic::alpha_ctpop }, - { "llvm.alpha.umulh", Intrinsic::alpha_umulh }, - { "llvm.alpha.vecop", Intrinsic::alpha_vecop }, - { "llvm.alpha.pup", Intrinsic::alpha_pup }, - { "llvm.alpha.bytezap", Intrinsic::alpha_bytezap }, - { "llvm.alpha.bytemanip", Intrinsic::alpha_bytemanip }, - { "llvm.alpha.dfp_bop", Intrinsic::alpha_dfpbop }, - { "llvm.alpha.dfp_uop", Intrinsic::alpha_dfpuop }, - { "llvm.alpha.unordered", Intrinsic::alpha_unordered }, - { "llvm.alpha.uqtodfp", Intrinsic::alpha_uqtodfp }, - { "llvm.alpha.uqtosfp", Intrinsic::alpha_uqtosfp }, - { "llvm.alpha.dfptosq", Intrinsic::alpha_dfptosq }, - { "llvm.alpha.sfptosq", Intrinsic::alpha_sfptosq }, - }; - const unsigned num_alpha_intrinsics = - sizeof(alpha_intrinsics) / sizeof(*alpha_intrinsics); - switch (getName()[5]) { - case 'a': - if (getName().size() > 11 && - std::string(getName().begin()+4, getName().begin()+11) == ".alpha.") - for (unsigned i = 0; i < num_alpha_intrinsics; ++i) - if (getName() == alpha_intrinsics[i].name) - return alpha_intrinsics[i].id; - break; case 'd': if (getName() == "llvm.dbg.stoppoint") return Intrinsic::dbg_stoppoint; if (getName() == "llvm.dbg.region.start")return Intrinsic::dbg_region_start; Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.120 llvm/lib/VMCore/Verifier.cpp:1.121 --- llvm/lib/VMCore/Verifier.cpp:1.120 Wed Sep 29 16:19:28 2004 +++ llvm/lib/VMCore/Verifier.cpp Fri Oct 29 13:43:17 2004 @@ -736,22 +736,6 @@ case Intrinsic::memmove: NumArgs = 4; break; case Intrinsic::memset: NumArgs = 4; break; - case Intrinsic::alpha_ctlz: NumArgs = 1; break; - case Intrinsic::alpha_cttz: NumArgs = 1; break; - case Intrinsic::alpha_ctpop: NumArgs = 1; break; - case Intrinsic::alpha_umulh: NumArgs = 2; break; - case Intrinsic::alpha_vecop: NumArgs = 4; break; - case Intrinsic::alpha_pup: NumArgs = 3; break; - case Intrinsic::alpha_bytezap: NumArgs = 2; break; - case Intrinsic::alpha_bytemanip: NumArgs = 3; break; - case Intrinsic::alpha_dfpbop: NumArgs = 3; break; - case Intrinsic::alpha_dfpuop: NumArgs = 2; break; - case Intrinsic::alpha_unordered: NumArgs = 2; break; - case Intrinsic::alpha_uqtodfp: NumArgs = 2; break; - case Intrinsic::alpha_uqtosfp: NumArgs = 2; break; - case Intrinsic::alpha_dfptosq: NumArgs = 2; break; - case Intrinsic::alpha_sfptosq: NumArgs = 2; break; - case Intrinsic::not_intrinsic: assert(0 && "Invalid intrinsic!"); NumArgs = 0; break; } From brukman at cs.uiuc.edu Fri Oct 29 13:43:54 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 29 Oct 2004 13:43:54 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Intrinsics.h Message-ID: <200410291843.NAA07355@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Intrinsics.h updated: 1.26 -> 1.27 --- Log message: The Alpha (tm) intrinsics aren't even being used --- Diffs of the changes: (+1 -91) Index: llvm/include/llvm/Intrinsics.h diff -u llvm/include/llvm/Intrinsics.h:1.26 llvm/include/llvm/Intrinsics.h:1.27 --- llvm/include/llvm/Intrinsics.h:1.26 Tue Jun 15 16:52:58 2004 +++ llvm/include/llvm/Intrinsics.h Fri Oct 29 13:43:43 2004 @@ -66,97 +66,7 @@ readport, writeport, readio, - writeio, - - //===------------------------------------------------------------------===// - // This section defines intrinsic functions used to represent Alpha - // instructions. - // - alpha_ctlz, // CTLZ (count leading zero): counts the number of leading - // zeros in the given ulong value - - alpha_cttz, // CTTZ (count trailing zero): counts the number of trailing - // zeros in the given ulong value - - alpha_ctpop, // CTPOP (count population): counts the number of ones in - // the given ulong value - - alpha_umulh, // UMULH (unsigned multiply quadword high): Takes two 64-bit - // (ulong) values, and returns the upper 64 bits of their - // 128 bit product as a ulong - - alpha_vecop, // A generic vector operation. This function is used to - // represent various Alpha vector/multimedia instructions. - // It takes 4 parameters: - // - the first two are 2 ulong vectors - // - the third (uint) is the size (in bytes) of each - // vector element. Thus a value of 1 means that the two - // input vectors consist of 8 bytes - // - the fourth (uint) is the operation to be performed on - // the vectors. Its possible values are defined in the - // enumeration AlphaVecOps. - - alpha_pup, // A pack/unpack operation. This function is used to - // represent Alpha pack/unpack operations. - // It takes 3 parameters: - // - the first is an ulong to pack/unpack - // - the second (uint) is the size of each component - // Valid values are 2 (word) or 4 (longword) - // - the third (uint) is the operation to be performed. - // Possible values defined in the enumeration - // AlphaPupOps - - alpha_bytezap, // This intrinsic function takes two parameters: a ulong - // (64-bit) value and a ubyte value, and returns a ulong. - // Each bit in the ubyte corresponds to a byte in the - // ulong. If the bit is 0, the byte in the output equals - // the corresponding byte in the input, else the byte in - // the output is zero. - - alpha_bytemanip,// This intrinsic function represents all Alpha byte - // manipulation instructions. It takes 3 parameters: - // - The first two are ulong inputs to operate on - // - The third (uint) is the operation to perform. - // Possible values defined in the enumeration - // AlphaByteManipOps - - alpha_dfpbop, // This intrinsic function represents Alpha instructions - // that operate on two doubles and return a double. The - // first two parameters are the two double values to - // operate on, and the third is a uint that specifies the - // operation to perform. Its possible values are defined in - // the enumeration AlphaFloatingBinaryOps - - alpha_dfpuop, // This intrinsic function represents operation on a single - // double precision floating point value. The first - // paramters is the value and the second is the operation. - // The possible values for the operations are defined in the - // enumeration AlphaFloatingUnaryOps - - alpha_unordered,// This intrinsic function tests if two double precision - // floating point values are unordered. It has two - // parameters: the two values to be tested. It return a - // boolean true if the two are unordered, else false. - - alpha_uqtodfp, // A generic function that converts a ulong to a double. - // How the conversion is performed is specified by the - // second parameter, the possible values for which are - // defined in the AlphaUqToDfpOps enumeration - - alpha_uqtosfp, // A generic function that converts a ulong to a float. - // How the conversion is performed is specified by the - // second parameter, the possible values for which are - // defined in the AlphaUqToSfpOps enumeration - - alpha_dfptosq, // A generic function that converts double to a long. - // How the conversion is performed is specified by the - // second parameter, the possible values for which are - // defined in the AlphaDfpToSqOps enumeration - - alpha_sfptosq, // A generic function that converts a float to a long. - // How the conversion is performed is specified by the - // second parameter, the possible values for which are - // defined in the AlphaSfpToSq enumeration + writeio }; } // End Intrinsic namespace From reid at x10sys.com Fri Oct 29 13:43:59 2004 From: reid at x10sys.com (Reid Spencer) Date: Fri, 29 Oct 2004 13:43:59 -0500 Subject: [llvm-commits] CVS: llvm/projects/Stacker/Makefile Message-ID: <200410291843.NAA07365@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker: Makefile updated: 1.8 -> 1.9 --- Log message: Disable the build in the samples directory so that llvmc dependencies don't mess up the build. --- Diffs of the changes: (+1 -1) Index: llvm/projects/Stacker/Makefile diff -u llvm/projects/Stacker/Makefile:1.8 llvm/projects/Stacker/Makefile:1.9 --- llvm/projects/Stacker/Makefile:1.8 Wed Oct 27 23:07:54 2004 +++ llvm/projects/Stacker/Makefile Fri Oct 29 13:43:49 2004 @@ -5,7 +5,7 @@ ##===----------------------------------------------------------------------===## LEVEL = . -DIRS = lib tools samples +DIRS = lib tools EXTRA_DIST = test include $(LEVEL)/Makefile.common From brukman at cs.uiuc.edu Fri Oct 29 14:20:53 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 29 Oct 2004 14:20:53 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Module.h Message-ID: <200410291920.OAA15101@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Module.h updated: 1.52 -> 1.53 --- Log message: Fix grammar (i.e.) --- Diffs of the changes: (+1 -1) Index: llvm/include/llvm/Module.h diff -u llvm/include/llvm/Module.h:1.52 llvm/include/llvm/Module.h:1.53 --- llvm/include/llvm/Module.h:1.52 Tue Sep 14 00:43:23 2004 +++ llvm/include/llvm/Module.h Fri Oct 29 14:20:42 2004 @@ -142,7 +142,7 @@ /// getGlobalVariable - Look up the specified global variable in the module /// symbol table. If it does not exist, return null. Note that this only /// returns a global variable if it does not have internal linkage. The type - /// argument should be the underlying type of the global, ie, it should not + /// argument should be the underlying type of the global, i.e., it should not /// have the top-level PointerType, which represents the address of the /// global. /// From gaeke at cs.uiuc.edu Fri Oct 29 14:44:02 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri, 29 Oct 2004 14:44:02 -0500 (CDT) Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput/fixoutput.c Message-ID: <200410291944.OAA04654@kain.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput: fixoutput.c updated: 1.1 -> 1.2 --- Log message: calloc(0) is nonportable. --- Diffs of the changes: (+1 -1) Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput/fixoutput.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput/fixoutput.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput/fixoutput.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput/fixoutput.c:1.1 Tue Oct 5 14:30:43 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput/fixoutput.c Fri Oct 29 14:43:45 2004 @@ -45,7 +45,7 @@ int I1,I2; /* temp storage */ double D1; /* temp storage */ /* intialization */ - LEXEME = (char *) calloc(LEX_LEN,1); + LEXEME = (char *) calloc(1+LEX_LEN,1); FLUSH(); /* main */ From gaeke at cs.uiuc.edu Fri Oct 29 14:44:13 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri, 29 Oct 2004 14:44:13 -0500 (CDT) Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput/stringI.c Message-ID: <200410291944.OAA04681@kain.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput: stringI.c updated: 1.1 -> 1.2 --- Log message: cfree doesn't exist; they really want to call free. --- Diffs of the changes: (+1 -1) Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput/stringI.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput/stringI.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput/stringI.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput/stringI.c:1.1 Tue Oct 5 14:30:43 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/fixoutput/stringI.c Fri Oct 29 14:43:30 2004 @@ -25,7 +25,7 @@ /* reset buffer to correst size if necessary */ if (LEX_LEN > LEX_LEN_INCR) { - cfree(LEXEME); + free(LEXEME); LEX_LEN = LEX_LEN_INCR; LEXEME = calloc(LEX_LEN,sizeof(CH)); } From gaeke at cs.uiuc.edu Fri Oct 29 16:50:19 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri, 29 Oct 2004 16:50:19 -0500 Subject: [llvm-commits] CVS: reopt/docs/ReoptUsersGuide.rtf Message-ID: <200410292150.QAA29980@zion.cs.uiuc.edu> Changes in directory reopt/docs: ReoptUsersGuide.rtf updated: 1.4 -> 1.5 --- Log message: Latest edits, including most of Tanya's suggested edits --- Diffs of the changes: (+126 -28) Index: reopt/docs/ReoptUsersGuide.rtf diff -u reopt/docs/ReoptUsersGuide.rtf:1.4 reopt/docs/ReoptUsersGuide.rtf:1.5 --- reopt/docs/ReoptUsersGuide.rtf:1.4 Fri Oct 15 14:48:02 2004 +++ reopt/docs/ReoptUsersGuide.rtf Fri Oct 29 16:50:08 2004 @@ -1,9 +1,10 @@ {\rtf1\mac\ansicpg10000\cocoartf102 {\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;\f2\froman\fcharset77 TimesNewRomanMS; \f3\fmodern\fcharset77 Courier;\f4\fmodern\fcharset77 Courier-Oblique;\f5\fswiss\fcharset77 Helvetica-Oblique; -\f6\fmodern\fcharset77 Courier-Bold;} +\f6\fswiss\fcharset77 Helvetica-BoldOblique;\f7\fmodern\fcharset77 Courier-BoldOblique;\f8\fmodern\fcharset77 Courier-Bold; +} {\colortbl;\red255\green255\blue255;} -\margl1440\margr1440\vieww15300\viewh18220\viewkind0 +\margl1440\margr1440\vieww16300\viewh10320\viewkind0 \deftab720 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural @@ -18,6 +19,9 @@ \f0\b0 \cf0 \ulnone \ Introduction to the reoptimizer\ + Link-time profiling instrumentation\ + Runtime profiler and trace generator\ + Trace optimizer\ Building the reoptimizer from source\ Running the reoptimizer on a program in the llvm-test module \f2 \ @@ -76,13 +80,56 @@ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural \f0\b0 \cf0 \ulnone \ -The reoptimizer is LLVM's dynamic optimization framework. It consists of three basic parts: a collection of compile-time profiling instrumentation passes, a runtime profiler and trace generator, and a runtime trace optimizer.\ +The reoptimizer is LLVM's dynamic optimization framework. It consists of three basic parts: a collection of profiling instrumentation passes, a runtime profiler and trace generator, and a runtime trace optimizer.\ \ -The profiling instrumentation passes run at compile time are as follows: [ -\f1\b TO DO -\f0\b0 - also need to explain basic terms like FLI, SLI; it would be nice to have a diagram here]\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural +\cf0 \ul Link-time profiling instrumentation\ulnone \ \ -For more information about the reoptimizer's instrumentation passes and runtime profiler, consult Anand Shukla's M.S. thesis, "Lightweight Cross-Procedure Tracing for Runtime Optimization", July 2003.\ +The reoptimizer's profiling instrumentation passes are run at link time by the reopt-llc tool. The exact list of passes that are run, along with the LLVM source files that define them, is as follows:\ +\ + * Function inlining ( +\f3 lib/Transforms/IPO/InlineSimple.cpp +\f0 )\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural +\cf0 Performing more inlining is supposed to increase the effectiveness of interprocedural tracing.\ +\ + * Lower LLVM 'switch' instructions to branches ( +\f3 lib/Transforms/Scalar/LowerSwitch.cpp +\f0 )\ +\ + * Lower LLVM 'invoke' instructions to setjmp/longjmp calls ( +\f3 lib/Transforms/Scalar/LowerInvoke.cpp +\f0 )\ +\ + * Combine multiple back-edge branches into a single branch ( +\f3 lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp +\f0 )\ +The CombineBranch pass requires the LowerSwitch and LowerInvoke passes to function correctly.\ +\ + * Emit a table of pointers to every function ( +\f3 lib/Transforms/Instrumentation/EmitFunctions.cpp +\f0 )\ +This pass inserts the llvmSimpleFunction, llvmFunctionTable, and llvmFunctionCount symbols into the module. These symbols contain mapping information used by the reoptimizer.\ +\ + * Instrument back-edge branches of loops ( +\f3 lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp +\f0 )\ +This pass is also known as first-level instrumentation, or "FLI". Each back-edge branch is instrumented with a call to the llvm_first_trigger function, which is defined in +\f3 reopt/lib/LightWtProfiling/FirstTrigger.cpp +\f0 .\ +\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural +\cf0 \ul Runtime profiler and trace generator\ulnone \ +\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural + +\f1\b \cf0 [FIXME - not done.] +\f0\b0 For more information about the reoptimizer's instrumentation passes and runtime profiler, consult Anand Shukla's M.S. thesis, "Lightweight Cross-Procedure Tracing for Runtime Optimization", July 2003.\ +\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural +\cf0 \ul Trace optimizer\ulnone \ +\ +See the section "How the trace optimizer works", below.\ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural @@ -148,8 +195,24 @@ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural +\f6\i\b \cf0 You must set your +\f7 LLVM_REOPT +\f6 environment variable +\f0\i0\b0 to contain any command-line options you want to pass to the reoptimizer, +\f6\i\b before running any tests using the +\f7 run-tests +\f6 script +\f0\i0\b0 . A full list of +\f3 LLVM_REOPT +\f0 settings can be found in the section entitled "The +\f3 LLVM_REOPT +\f0 environment variable", below. +\f3 \ +\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural + \f1\b \cf0 \ul Options recognized by the -\f6 \ul "run-tests" +\f8 \ul "run-tests" \f1 \ul script \f0\b0 \ulnone \ \ @@ -198,7 +261,15 @@ \f0 \ set to \f3 '--debug --enable-trace-opt' -\f0 .\ +\f0 . This is equivalent\ + to setting your +\f3 LLVM_REOPT +\f0 variable to contain\ + +\f3 '--skip-trace= +\f4\i N +\f3\i0 ' +\f0 (see below).\ \ -release \f3 @@ -274,9 +345,11 @@ \f3 '-ljpeg' \f0 ) by the program under consideration.\ \ -4. Now, you should set your -\f3 LLVM_REOPT -\f0 environment variable to contain any command-line options you want to pass to the reoptimizer. The most important ones are +4. Now, +\f6\i\b you must set your +\f7 LLVM_REOPT +\f6 environment variable +\f0\i0\b0 to contain any command-line options you want to pass to the reoptimizer. The most important ones are \f3 '--debug' \f0 , to turn on debugging printouts, and \f3 '--enable-trace-opt' @@ -291,7 +364,7 @@ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural \f1\b \cf0 \ul The -\f6 \ul LLVM_REOPT +\f8 \ul LLVM_REOPT \f1 \ul environment variable \f0\b0 \ulnone \ \ @@ -304,19 +377,33 @@ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural \cf0 \ulnone -fli-threshold= \f5\i count -\f0\i0 Number of times FLI must trigger before attempting SLI\ +\f0\i0 Number of times FLI must trigger before attempting SLI.\ + The default is 30.\ -sli-threshold= \f5\i count -\f0\i0 Number of iterations of SLI before path counters are sampled\ -\ +\f0\i0 Number of iterations of SLI before path counters are sampled.\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural +\cf0 The default is 50.\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural +\cf0 \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural \cf0 \ul Phase detection options\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural -\cf0 \ulnone -enable-phase-detect Use a timer interrupt to remove traces periodically from the trace cache\ +\cf0 \ulnone -enable-phase-detect Use a timer interrupt to remove traces periodically from the trace cache.\ + The default is +\f5\i false +\f0\i0 , i.e., traces are +\f5\i not +\f0\i0 periodically removed from the\ + trace cache.\ -timer-int-s= \f5\i seconds -\f0\i0 Interval (in seconds) between phase detection sweeps\ -\ +\f0\i0 Interval (in seconds) between phase detection sweeps.\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural +\cf0 The default is 3.0 seconds. You can provide a decimal fraction\ + to this option.\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural +\cf0 \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural \cf0 \ul Trace layout engine options\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural @@ -332,7 +419,10 @@ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural \cf0 \ul Trace optimizer options\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural -\cf0 \ulnone -enable-trace-opt Use the new trace optimizer instead of the old trace layout engine\ +\cf0 \ulnone -enable-trace-opt Use the new trace optimizer instead of the old trace layout engine.\ + If there is a code on which the trace optimizer fails and the trace\ + layout engine works, or vice-versa, you can use this option to control\ + which one is used.\ -run-opt-passes Run optimization passes before unpacking TraceFunction\ \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural @@ -344,24 +434,32 @@ -opt-trace-cache-size= \f5\i size \f0\i0 Trace cache size for optimized code\ -\ + +\f1\b [FIXME: what are the defaults for these? what are the units in which they are specified?]\ + +\f0\b0 \ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural \cf0 \ul Debugging options\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural -\cf0 \ulnone -print-machineinstrs Print generated machine code\ +\cf0 \ulnone -debug Turn on debugging printouts from TraceToFunction,\ + UnpackTraceFunction, and the various other reoptimizer libraries\ + (in addition to those available from the other options listed below).\ +\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural +\cf0 -print-machineinstrs Print generated machine code for traces.\ -skip-trace= \f5\i n \f0\i0 Don't optimize the \f5\i n -\f0\i0 th trace, when using trace optimizer\ - -debug Turn on debugging printouts\ +\f0\i0 th trace, when using trace optimizer. If you are\ + using the run-tests script, you can use its +\f3 '-skiptrace' +\f0 option to set\ + this option automatically; see above.\ -dregalloc=y Turn on SparcV9 register allocator debugging printouts\ -disable-ttf Disable TraceToFunction, UnpackTraceFunction and branch stitching\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural -\cf0 -disable-utf Disable UnpackTraceFunction and branch stitching\ + -disable-utf Disable UnpackTraceFunction and branch stitching\ -disable-branch-stitch Disable branch stitching\ -\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural -\cf0 \ +\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural \cf0 \ul Statistics gathering options\ \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardeftab720\ql\qnatural From reid at x10sys.com Fri Oct 29 17:15:06 2004 From: reid at x10sys.com (Reid Spencer) Date: Fri, 29 Oct 2004 17:15:06 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410292215.RAA30506@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.223 -> 1.224 --- Log message: Don't modify user vars because they will get passed down (modified) to sub-makes and recursively append causing huge command lines and incorrect compilation results. Also, fix the printvars target to align its output and ensure that the contents of variables can't get interpreted by the shell. --- Diffs of the changes: (+47 -42) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.223 llvm/Makefile.rules:1.224 --- llvm/Makefile.rules:1.223 Thu Oct 28 23:47:33 2004 +++ llvm/Makefile.rules Fri Oct 29 17:14:56 2004 @@ -144,25 +144,29 @@ ifdef ENABLE_PROFILING CONFIGURATION := Profile - CXXFLAGS += -O3 -DNDEBUG -felide-constructors -finline-functions -pg - CFLAGS += -O3 -DNDEBUG -pg - LDFLAGS += -O3 -DNDEBUG -pg + LLVMCXXFLAGS := -O3 -DNDEBUG -felide-constructors -finline-functions -pg + LLVMCFLAGS := -O3 -DNDEBUG -pg + LLVMLDFLAGS := -O3 -DNDEBUG -pg else ifdef ENABLE_OPTIMIZED CONFIGURATION := Release - CXXFLAGS += -O3 -DNDEBUG -finline-functions -felide-constructors -fomit-frame-pointer - CFLAGS += -O3 -DNDEBUG -fomit-frame-pointer - LDFLAGS += -O3 -DNDEBUG + LLVMCXXFLAGS := -O3 -DNDEBUG -finline-functions -felide-constructors -fomit-frame-pointer + LLVMCFLAGS := -O3 -DNDEBUG -fomit-frame-pointer + LLVMLDFLAGS := -O3 -DNDEBUG else CONFIGURATION := Debug - CXXFLAGS += -g -D_DEBUG - CFLAGS += -g -D_DEBUG - LDFLAGS += -g -D_DEBUG + LLVMCXXFLAGS := -g -D_DEBUG + LLVMCFLAGS := -g -D_DEBUG + LLVMLDFLAGS := -g -D_DEBUG KEEP_SYMBOLS := 1 endif endif -ARFLAGS := cru +LLVMCXXFLAGS += $(CXXFLAGS) +LLVMCFLAGS += $(CFLAGS) +LLVMCPPFLAGS += $(CPPFLAGS) +LLVMLDFLAGS += $(LDFLAGS) +LLVMARFLAGS := cru #-------------------------------------------------------------------- # Directory locations @@ -195,7 +199,7 @@ ifndef SHARED_LIBRARY LIBTOOL += --tag=disable-shared else - LDFLAGS += -rpath $(LIBDIR) + LLVMLDFLAGS += -rpath $(LIBDIR) endif # Adjust settings for verbose mode @@ -216,7 +220,7 @@ # Adjust linker flags for building an executable ifdef TOOLNAME - LDFLAGS += -rpath $(TOOLDIR) -export-dynamic + LLVMLDFLAGS += -rpath $(TOOLDIR) -export-dynamic endif #---------------------------------------------------------- @@ -225,8 +229,8 @@ CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -LDFLAGS += -L$(LIBDIR) -L$(LLVMLIBDIR) -CPPFLAGS += -I$(BUILD_OBJ_DIR) \ +LLVMLDFLAGS += -L$(LIBDIR) -L$(LLVMLIBDIR) +LLVMCPPFLAGS += -I$(BUILD_OBJ_DIR) \ -I$(BUILD_SRC_DIR) \ -I$(BUILD_SRC_ROOT)/include \ -I$(BUILD_OBJ_ROOT)/include \ @@ -234,20 +238,20 @@ -I$(LLVM_SRC_ROOT)/include \ -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -Compile.C = $(CC) $(CPPFLAGS) $(CompileCommonOpts) -c $(CFLAGS) -Compile.CXX = $(CXX) $(CPPFLAGS) $(CompileCommonOpts) $(CXXFLAGS) -c +Compile.C = $(CC) $(LLVMCPPFLAGS) $(CompileCommonOpts) -c $(LLVMCFLAGS) LTCompile.C = $(LIBTOOL) --mode=compile $(Compile.C) +BCCompile.C = $(LLVMGCC) $(LLVMCPPFLAGS) $(CompileCommonOpts) $(LLVMCFLAGS) -c +Compile.CXX = $(CXX) $(LLVMCPPFLAGS) $(CompileCommonOpts) $(LLVMCXXFLAGS) -c LTCompile.CXX = $(LIBTOOL) --tag=CXX --mode=compile $(Compile.CXX) -BCCompile.CXX = $(LLVMGXX) $(CPPFLAGS) $(CompileCommonOpts) $(CXXFLAGS) -c -BCCompile.C = $(LLVMGCC) $(CPPFLAGS) $(CompileCommonOpts) $(CFLAGS) -c -Link = $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(CPPFLAGS) \ - $(CompileCommonOpts) $(LDFLAGS) $(STRIP) -Relink = $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(CPPFLAGS) \ +BCCompile.CXX = $(LLVMGXX) $(LLVMCPPFLAGS) $(CompileCommonOpts) $(LLVMCXXFLAGS) -c +Link = $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(LLVMCPPFLAGS) \ + $(CompileCommonOpts) $(LLVMLDFLAGS) $(STRIP) +Relink = $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(LLVMCPPFLAGS) \ $(CompileCommonOpts) BCLinkLib = $(LLVMGCC) -shared -nostdlib Burg = $(BURG) -I $(BUILD_SRC_DIR) TableGen = $(TBLGEN) -I $(BUILD_SRC_DIR) -Archive = $(AR) $(ARFLAGS) +Archive = $(AR) $(LLVMARFLAGS) ifdef RANLIB Ranlib = $(RANLIB) else @@ -1064,24 +1068,25 @@ #------------------------------------------------------------------------ # Print out the directories used for building printvars:: - @$(ECHO) "CONFIGURATION : " $(CONFIGURATION) - @$(ECHO) "BUILD_SRC_ROOT: " $(BUILD_SRC_ROOT) - @$(ECHO) "BUILD_SRC_DIR : " $(BUILD_SRC_DIR) - @$(ECHO) "BUILD_OBJ_ROOT: " $(BUILD_OBJ_ROOT) - @$(ECHO) "BUILD_OBJ_DIR : " $(BUILD_OBJ_DIR) - @$(ECHO) "LLVM_SRC_ROOT : " $(LLVM_SRC_ROOT) - @$(ECHO) "LLVM_OBJ_ROOT : " $(LLVM_OBJ_ROOT) - @$(ECHO) "libdir : " $(libdir) - @$(ECHO) "bindir : " $(bindir) - @$(ECHO) "sysconfdir : " $(sysconfdir) - @$(ECHO) "bytecode_libdir : " $(bytecode_libdir) - @$(ECHO) "USER_TARGETS : " $(USER_TARGETS) - @$(ECHO) "OBJMKFILES: $(OBJMKFILES)" - @$(ECHO) "SRCMKFILES: $(SRCMKFILES)" - @$(ECHO) "OBJDIR: " $(OBJDIR) - @$(ECHO) "LIBDIR: " $(LIBDIR) - @$(ECHO) "TOOLDIR: " $(TOOLDIR) - @$(ECHO) "TDFILES:" '$(TDFILES)' - @$(ECHO) "Compile.CXX: " '$(Compile.CXX)' - @$(ECHO) "Compile.C: " '$(Compile.C)' + @$(ECHO) "CONFIGURATION : " '$(CONFIGURATION)' + @$(ECHO) "BUILD_SRC_ROOT : " '$(BUILD_SRC_ROOT)' + @$(ECHO) "BUILD_SRC_DIR : " '$(BUILD_SRC_DIR)' + @$(ECHO) "BUILD_OBJ_ROOT : " '$(BUILD_OBJ_ROOT)' + @$(ECHO) "BUILD_OBJ_DIR : " '$(BUILD_OBJ_DIR)' + @$(ECHO) "LLVM_SRC_ROOT : " '$(LLVM_SRC_ROOT)' + @$(ECHO) "LLVM_OBJ_ROOT : " '$(LLVM_OBJ_ROOT)' + @$(ECHO) "libdir : " '$(libdir)' + @$(ECHO) "bindir : " '$(bindir)' + @$(ECHO) "sysconfdir : " '$(sysconfdir)' + @$(ECHO) "bytecode_libdir: " '$(bytecode_libdir)' + @$(ECHO) "USER_TARGETS : " '$(USER_TARGETS)' + @$(ECHO) "OBJMKFILES : " '$(OBJMKFILES)' + @$(ECHO) "SRCMKFILES : " '$(SRCMKFILES)' + @$(ECHO) "OBJDIR : " '$(OBJDIR)' + @$(ECHO) "LIBDIR : " '$(LIBDIR)' + @$(ECHO) "TOOLDIR : " '$(TOOLDIR)' + @$(ECHO) "TDFILES : " '$(TDFILES)' + @$(ECHO) "Compile.CXX : " '$(Compile.CXX)' + @$(ECHO) "Compile.C : " '$(Compile.C)' + @$(ECHO) "Archive : " '$(Archive)' From brukman at cs.uiuc.edu Fri Oct 29 18:17:56 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 29 Oct 2004 18:17:56 -0500 Subject: [llvm-commits] CVS: llvm/lib/Support/IsInf.cpp Message-ID: <200410292317.SAA06430@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: IsInf.cpp updated: 1.4 -> 1.5 --- Log message: * Fix compilation on AIX: GCC's fixincludes eliminates isinf() declaration * Move file comment to the top of the header where it belongs --- Diffs of the changes: (+7 -5) Index: llvm/lib/Support/IsInf.cpp diff -u llvm/lib/Support/IsInf.cpp:1.4 llvm/lib/Support/IsInf.cpp:1.5 --- llvm/lib/Support/IsInf.cpp:1.4 Mon Oct 25 13:47:10 2004 +++ llvm/lib/Support/IsInf.cpp Fri Oct 29 18:17:45 2004 @@ -1,4 +1,4 @@ -//===-- IsInf.cpp ---------------------------------------------------------===// +//===-- IsInf.cpp - Platform-independent wrapper around C99 isinf() -------===// // // The LLVM Compiler Infrastructure // @@ -6,12 +6,9 @@ // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// -// -// Platform-independent wrapper around C99 isinf(). -// -//===----------------------------------------------------------------------===// #include "llvm/Config/config.h" + #if HAVE_ISINF_IN_MATH_H # include #elif HAVE_ISINF_IN_CMATH @@ -27,6 +24,11 @@ #elif defined(_MSC_VER) #include #define isinf(X) (!_finite(X)) +#elif defined(_AIX) && defined(__GNUC__) +// GCC's fixincludes seems to be removing the isinf() declaration from the +// system header /usr/include/math.h +# include +static int isinf(double x) { return !finite(x) && x==x; } #else # error "Don't know how to get isinf()" #endif From brukman at cs.uiuc.edu Fri Oct 29 18:26:20 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri, 29 Oct 2004 18:26:20 -0500 Subject: [llvm-commits] CVS: llvm/tools/gccas/Makefile Message-ID: <200410292326.SAA06647@zion.cs.uiuc.edu> Changes in directory llvm/tools/gccas: Makefile updated: 1.18 -> 1.19 --- Log message: Fix file header comment --- Diffs of the changes: (+1 -1) Index: llvm/tools/gccas/Makefile diff -u llvm/tools/gccas/Makefile:1.18 llvm/tools/gccas/Makefile:1.19 --- llvm/tools/gccas/Makefile:1.18 Wed Oct 27 18:18:45 2004 +++ llvm/tools/gccas/Makefile Fri Oct 29 18:26:09 2004 @@ -1,4 +1,4 @@ -##===- tools/gccas/Makefile ------------------------------*- Makefile -*-===## +##===- tools/gccas/Makefile --------------------------------*- Makefile -*-===## # # The LLVM Compiler Infrastructure # From tbrethou at cs.uiuc.edu Fri Oct 29 19:39:23 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Fri, 29 Oct 2004 19:39:23 -0500 (CDT) Subject: [llvm-commits] CVS: llvm/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp MSchedGraph.h ModuloScheduling.cpp ModuloScheduling.h Message-ID: <200410300039.TAA04006@kain.cs.uiuc.edu> Changes in directory llvm/lib/Target/SparcV9/ModuloScheduling: MSSchedule.cpp updated: 1.7 -> 1.8 MSchedGraph.h updated: 1.4 -> 1.5 ModuloScheduling.cpp updated: 1.31 -> 1.32 ModuloScheduling.h updated: 1.16 -> 1.17 --- Log message: Fixed bug with infinite epilogues. Fixed issue with generating the partial order. It now adds the nodes not in recurrences in sets for each connected component. --- Diffs of the changes: (+187 -105) Index: llvm/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp diff -u llvm/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp:1.7 llvm/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp:1.8 --- llvm/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp:1.7 Sun Oct 10 18:34:50 2004 +++ llvm/lib/Target/SparcV9/ModuloScheduling/MSSchedule.cpp Fri Oct 29 19:39:07 2004 @@ -63,6 +63,8 @@ for(unsigned j=0; j < resources[i].size(); ++j) { int resourceNum = resources[i][j]; + DEBUG(std::cerr << "Attempting to schedule Resource Num: " << resourceNum << " in cycle: " << currentCycle << "\n"); + //Check if this resource is available for this cycle std::map >::iterator resourcesForCycle = resourceNumPerCycle.find(currentCycle); @@ -111,14 +113,15 @@ //Check if this resource is available for this cycle std::map >::iterator resourcesForCycle = resourceNumPerCycle.find(oldCycle); - - for(unsigned j=0; j < resources[i].size(); ++j) { - int resourceNum = resources[i][j]; - //remove from map - std::map::iterator resourceUse = resourcesForCycle->second.find(resourceNum); - //assert if not in the map.. since it should be! - //assert(resourceUse != resourcesForCycle.end() && "Resource should be in map!"); - --resourceUse->second; + if(resourcesForCycle != resourceNumPerCycle.end()) { + for(unsigned j=0; j < resources[i].size(); ++j) { + int resourceNum = resources[i][j]; + //remove from map + std::map::iterator resourceUse = resourcesForCycle->second.find(resourceNum); + //assert if not in the map.. since it should be! + //assert(resourceUse != resourcesForCycle.end() && "Resource should be in map!"); + --resourceUse->second; + } } } else Index: llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h diff -u llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h:1.4 llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h:1.5 --- llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h:1.4 Wed Sep 1 17:55:35 2004 +++ llvm/lib/Target/SparcV9/ModuloScheduling/MSchedGraph.h Fri Oct 29 19:39:07 2004 @@ -21,6 +21,7 @@ #include "llvm/ADT/iterator" #include + namespace llvm { class MSchedGraph; class MSchedGraphNode; @@ -99,7 +100,9 @@ MSchedGraph* getParent() { return Parent; } bool hasPredecessors() { return (Predecessors.size() > 0); } bool hasSuccessors() { return (Successors.size() > 0); } - int getLatency() { return latency; } + unsigned getLatency() { return latency; } + unsigned getLatency() const { return latency; } + MSchedGraphEdge getInEdge(MSchedGraphNode *pred); unsigned getInEdgeNum(MSchedGraphNode *pred); @@ -309,8 +312,6 @@ }; - - } #endif Index: llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp diff -u llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp:1.31 llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp:1.32 --- llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp:1.31 Thu Oct 14 01:04:28 2004 +++ llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.cpp Fri Oct 29 19:39:07 2004 @@ -127,7 +127,8 @@ //Get MachineFunction MachineFunction &MF = MachineFunction::get(&F); - + + //Worklist std::vector Worklist; @@ -160,8 +161,16 @@ II = std::max(RecMII, ResMII); //Print out II, RecMII, and ResMII - DEBUG(std::cerr << "II starts out as " << II << " ( RecMII=" << RecMII << "and ResMII=" << ResMII << "\n"); + DEBUG(std::cerr << "II starts out as " << II << " ( RecMII=" << RecMII << " and ResMII=" << ResMII << ")\n"); + //Dump node properties if in debug mode + DEBUG(for(std::map::iterator I = nodeToAttributesMap.begin(), + E = nodeToAttributesMap.end(); I !=E; ++I) { + std::cerr << "Node: " << *(I->first) << " ASAP: " << I->second.ASAP << " ALAP: " + << I->second.ALAP << " MOB: " << I->second.MOB << " Depth: " << I->second.depth + << " Height: " << I->second.height << "\n"; + }); + //Calculate Node Properties calculateNodeAttributes(MSG, ResMII); @@ -177,10 +186,10 @@ computePartialOrder(); //Dump out partial order - DEBUG(for(std::vector >::iterator I = partialOrder.begin(), + DEBUG(for(std::vector >::iterator I = partialOrder.begin(), E = partialOrder.end(); I !=E; ++I) { std::cerr << "Start set in PO\n"; - for(std::vector::iterator J = I->begin(), JE = I->end(); J != JE; ++J) + for(std::set::iterator J = I->begin(), JE = I->end(); J != JE; ++J) std::cerr << "PO:" << **J << "\n"; }); @@ -199,12 +208,13 @@ DEBUG(schedule.print(std::cerr)); - //Final scheduling step is to reconstruct the loop - reconstructLoop(*BI); - - //Print out new loop - - + //Final scheduling step is to reconstruct the loop only if we actual have + //stage > 0 + if(schedule.getMaxStage() != 0) + reconstructLoop(*BI); + else + DEBUG(std::cerr << "Max stage is 0, so no change in loop\n"); + //Clear out our maps for the next basic block that is processed nodeToAttributesMap.clear(); partialOrder.clear(); @@ -350,10 +360,16 @@ /// MOB. void ModuloSchedulingPass::calculateNodeAttributes(MSchedGraph *graph, int MII) { + assert(nodeToAttributesMap.empty() && "Node attribute map was not cleared"); + //Loop over the nodes and add them to the map for(MSchedGraph::iterator I = graph->begin(), E = graph->end(); I != E; ++I) { + + DEBUG(std::cerr << "Inserting node into attribute map: " << *I->second << "\n"); + //Assert if its already in the map - assert(nodeToAttributesMap.find(I->second) == nodeToAttributesMap.end() && "Node attributes are already in the map"); + assert(nodeToAttributesMap.count(I->second) == 0 && + "Node attributes are already in the map"); //Put into the map with default attribute values nodeToAttributesMap[I->second] = MSNodeAttributes(); @@ -707,16 +723,16 @@ } - std::vector new_recurrence; + std::set new_recurrence; //Loop through recurrence and remove any nodes already in the partial order for(std::vector::const_iterator N = I->second.begin(), NE = I->second.end(); N != NE; ++N) { bool found = false; - for(std::vector >::iterator PO = partialOrder.begin(), PE = partialOrder.end(); PO != PE; ++PO) { - if(std::find(PO->begin(), PO->end(), *N) != PO->end()) + for(std::vector >::iterator PO = partialOrder.begin(), PE = partialOrder.end(); PO != PE; ++PO) { + if(PO->count(*N)) found = true; } if(!found) { - new_recurrence.push_back(*N); + new_recurrence.insert(*N); if(partialOrder.size() == 0) //For each predecessors, add it to this recurrence ONLY if it is not already in it @@ -729,14 +745,14 @@ if(std::find(I->second.begin(), I->second.end(), *P) == I->second.end()) { //Also need to check if in partial order bool predFound = false; - for(std::vector >::iterator PO = partialOrder.begin(), PEND = partialOrder.end(); PO != PEND; ++PO) { - if(std::find(PO->begin(), PO->end(), *P) != PO->end()) + for(std::vector >::iterator PO = partialOrder.begin(), PEND = partialOrder.end(); PO != PEND; ++PO) { + if(PO->count(*P)) predFound = true; } if(!predFound) - if(std::find(new_recurrence.begin(), new_recurrence.end(), *P) == new_recurrence.end()) - new_recurrence.push_back(*P); + if(!new_recurrence.count(*P)) + new_recurrence.insert(*P); } } @@ -749,28 +765,51 @@ } //Add any nodes that are not already in the partial order - std::vector lastNodes; + //Add them in a set, one set per connected component + std::set lastNodes; for(std::map::iterator I = nodeToAttributesMap.begin(), E = nodeToAttributesMap.end(); I != E; ++I) { bool found = false; //Check if its already in our partial order, if not add it to the final vector - for(std::vector >::iterator PO = partialOrder.begin(), PE = partialOrder.end(); PO != PE; ++PO) { - if(std::find(PO->begin(), PO->end(), I->first) != PO->end()) + for(std::vector >::iterator PO = partialOrder.begin(), PE = partialOrder.end(); PO != PE; ++PO) { + if(PO->count(I->first)) found = true; } if(!found) - lastNodes.push_back(I->first); + lastNodes.insert(I->first); } - if(lastNodes.size() > 0) - partialOrder.push_back(lastNodes); + //Break up remaining nodes that are not in the partial order + //into their connected compoenents + while(lastNodes.size() > 0) { + std::set ccSet; + connectedComponentSet(*(lastNodes.begin()),ccSet, lastNodes); + if(ccSet.size() > 0) + partialOrder.push_back(ccSet); + } + //if(lastNodes.size() > 0) + //partialOrder.push_back(lastNodes); } -void ModuloSchedulingPass::predIntersect(std::vector &CurrentSet, std::vector &IntersectResult) { +void ModuloSchedulingPass::connectedComponentSet(MSchedGraphNode *node, std::set &ccSet, std::set &lastNodes) { + + //Add to final set + if( !ccSet.count(node) && lastNodes.count(node)) { + lastNodes.erase(node); + ccSet.insert(node); + } + else + return; + + //Loop over successors and recurse if we have not seen this node before + for(MSchedGraphNode::succ_iterator node_succ = node->succ_begin(), end=node->succ_end(); node_succ != end; ++node_succ) { + connectedComponentSet(*node_succ, ccSet, lastNodes); + } - //Sort CurrentSet so we can use lowerbound - std::sort(CurrentSet.begin(), CurrentSet.end()); +} + +void ModuloSchedulingPass::predIntersect(std::set &CurrentSet, std::set &IntersectResult) { for(unsigned j=0; j < FinalNodeOrder.size(); ++j) { for(MSchedGraphNode::pred_iterator P = FinalNodeOrder[j]->pred_begin(), @@ -780,19 +819,19 @@ if(ignoreEdge(*P,FinalNodeOrder[j])) continue; - if(std::find(CurrentSet.begin(), - CurrentSet.end(), *P) != CurrentSet.end()) + if(CurrentSet.count(*P)) if(std::find(FinalNodeOrder.begin(), FinalNodeOrder.end(), *P) == FinalNodeOrder.end()) - IntersectResult.push_back(*P); + IntersectResult.insert(*P); } } } -void ModuloSchedulingPass::succIntersect(std::vector &CurrentSet, std::vector &IntersectResult) { - //Sort CurrentSet so we can use lowerbound - std::sort(CurrentSet.begin(), CurrentSet.end()); - + + + +void ModuloSchedulingPass::succIntersect(std::set &CurrentSet, std::set &IntersectResult) { + for(unsigned j=0; j < FinalNodeOrder.size(); ++j) { for(MSchedGraphNode::succ_iterator P = FinalNodeOrder[j]->succ_begin(), E = FinalNodeOrder[j]->succ_end(); P != E; ++P) { @@ -801,17 +840,16 @@ if(ignoreEdge(FinalNodeOrder[j],*P)) continue; - if(std::find(CurrentSet.begin(), - CurrentSet.end(), *P) != CurrentSet.end()) + if(CurrentSet.count(*P)) if(std::find(FinalNodeOrder.begin(), FinalNodeOrder.end(), *P) == FinalNodeOrder.end()) - IntersectResult.push_back(*P); + IntersectResult.insert(*P); } } } -void dumpIntersection(std::vector &IntersectCurrent) { +void dumpIntersection(std::set &IntersectCurrent) { std::cerr << "Intersection ("; - for(std::vector::iterator I = IntersectCurrent.begin(), E = IntersectCurrent.end(); I != E; ++I) + for(std::set::iterator I = IntersectCurrent.begin(), E = IntersectCurrent.end(); I != E; ++I) std::cerr << **I << ", "; std::cerr << ")\n"; } @@ -828,13 +866,13 @@ //Loop over all the sets and place them in the final node order - for(std::vector >::iterator CurrentSet = partialOrder.begin(), E= partialOrder.end(); CurrentSet != E; ++CurrentSet) { + for(std::vector >::iterator CurrentSet = partialOrder.begin(), E= partialOrder.end(); CurrentSet != E; ++CurrentSet) { DEBUG(std::cerr << "Processing set in S\n"); DEBUG(dumpIntersection(*CurrentSet)); //Result of intersection - std::vector IntersectCurrent; + std::set IntersectCurrent; predIntersect(*CurrentSet, IntersectCurrent); @@ -861,18 +899,18 @@ MSchedGraphNode *node; int maxASAP = 0; DEBUG(std::cerr << "Using current set of size " << CurrentSet->size() << "to find max ASAP\n"); - for(unsigned j=0; j < CurrentSet->size(); ++j) { + for(std::set::iterator J = CurrentSet->begin(), JE = CurrentSet->end(); J != JE; ++J) { //Get node attributes - MSNodeAttributes nodeAttr= nodeToAttributesMap.find((*CurrentSet)[j])->second; + MSNodeAttributes nodeAttr= nodeToAttributesMap.find(*J)->second; //assert(nodeAttr != nodeToAttributesMap.end() && "Node not in attributes map!"); - DEBUG(std::cerr << "CurrentSet index " << j << "has ASAP: " << nodeAttr.ASAP << "\n"); - if(maxASAP < nodeAttr.ASAP) { + + if(maxASAP <= nodeAttr.ASAP) { maxASAP = nodeAttr.ASAP; - node = (*CurrentSet)[j]; + node = *J; } } assert(node != 0 && "In node ordering node should not be null"); - IntersectCurrent.push_back(node); + IntersectCurrent.insert(node); order = BOTTOM_UP; } } @@ -888,10 +926,10 @@ int MOB = 0; int height = 0; - MSchedGraphNode *highestHeightNode = IntersectCurrent[0]; + MSchedGraphNode *highestHeightNode = *(IntersectCurrent.begin()); //Find node in intersection with highest heigh and lowest MOB - for(std::vector::iterator I = IntersectCurrent.begin(), + for(std::set::iterator I = IntersectCurrent.begin(), E = IntersectCurrent.end(); I != E; ++I) { //Get current nodes properties @@ -931,8 +969,8 @@ if(ignoreEdge(highestHeightNode, *P)) continue; //If not already in Intersect, add - if(std::find(IntersectCurrent.begin(), IntersectCurrent.end(), *P) == IntersectCurrent.end()) - IntersectCurrent.push_back(*P); + if(!IntersectCurrent.count(*P)) + IntersectCurrent.insert(*P); } } } //End while loop over Intersect Size @@ -958,9 +996,9 @@ //MOB int MOB = 0; int depth = 0; - MSchedGraphNode *highestDepthNode = IntersectCurrent[0]; + MSchedGraphNode *highestDepthNode = *(IntersectCurrent.begin()); - for(std::vector::iterator I = IntersectCurrent.begin(), + for(std::set::iterator I = IntersectCurrent.begin(), E = IntersectCurrent.end(); I != E; ++I) { //Find node attribute in graph MSNodeAttributes nodeAttr= nodeToAttributesMap.find(*I)->second; @@ -987,24 +1025,19 @@ FinalNodeOrder.push_back(highestDepthNode); } //Remove heightestDepthNode from IntersectOrder - IntersectCurrent.erase(std::find(IntersectCurrent.begin(), - IntersectCurrent.end(),highestDepthNode)); + IntersectCurrent.erase(highestDepthNode); //Intersect heightDepthNode's pred with CurrentSet for(MSchedGraphNode::pred_iterator P = highestDepthNode->pred_begin(), E = highestDepthNode->pred_end(); P != E; ++P) { - //if(lower_bound(CurrentSet->begin(), - // CurrentSet->end(), *P) != CurrentSet->end()) { - if(std::find(CurrentSet->begin(), CurrentSet->end(), *P) != CurrentSet->end()) { - + if(CurrentSet->count(*P)) { if(ignoreEdge(*P, highestDepthNode)) continue; //If not already in Intersect, add - if(std::find(IntersectCurrent.begin(), - IntersectCurrent.end(), *P) == IntersectCurrent.end()) - IntersectCurrent.push_back(*P); + if(!IntersectCurrent.count(*P)) + IntersectCurrent.insert(*P); } } @@ -1028,8 +1061,8 @@ //data dependencies) to the final order. We add this manually. It will always be //in the last set of S since its not part of a recurrence //Loop over all the sets and place them in the final node order - std::vector > ::reverse_iterator LastSet = partialOrder.rbegin(); - for(std::vector::iterator CurrentNode = LastSet->begin(), LastNode = LastSet->end(); + std::vector > ::reverse_iterator LastSet = partialOrder.rbegin(); + for(std::set::iterator CurrentNode = LastSet->begin(), LastNode = LastSet->end(); CurrentNode != LastNode; ++CurrentNode) { if((*CurrentNode)->getInst()->getOpcode() == V9::BA) FinalNodeOrder.push_back(*CurrentNode); @@ -1042,6 +1075,10 @@ bool success = false; + //FIXME: Should be set to max II of the original loop + //Cap II in order to prevent infinite loop + int capII = 30; + while(!success) { //Loop over the final node order and process each node @@ -1128,12 +1165,17 @@ } - DEBUG(std::cerr << "Constructing Kernel\n"); - success = schedule.constructKernel(II); - if(!success) { - ++II; - schedule.clear(); + if(success) { + DEBUG(std::cerr << "Constructing Schedule Kernel\n"); + success = schedule.constructKernel(II); + DEBUG(std::cerr << "Done Constructing Schedule Kernel\n"); + if(!success) { + ++II; + schedule.clear(); + } } + + assert(II < capII && "The II should not exceed the original loop number of cycles"); } } @@ -1145,8 +1187,10 @@ DEBUG(std::cerr << *node << " (Start Cycle: " << start << ", End Cycle: " << end << ")\n"); //Make sure start and end are not negative - if(start < 0) + if(start < 0) { start = 0; + + } if(end < 0) end = 0; @@ -1192,7 +1236,7 @@ int maxStageCount = 0; MSchedGraphNode *branch = 0; - + MSchedGraphNode *BAbranch = 0; for(MSSchedule::kernel_iterator I = schedule.kernel_begin(), E = schedule.kernel_end(); I != E; ++I) { maxStageCount = std::max(maxStageCount, I->second); @@ -1201,6 +1245,9 @@ if(I->first->isBranch()) { if (I->first->getInst()->getOpcode() != V9::BA) branch = I->first; + else + BAbranch = I->first; + continue; } @@ -1277,6 +1324,14 @@ //Stick in branch at the end machineBB->push_back(branch->getInst()->clone()); + //Add nop + BuildMI(machineBB, V9::NOP, 0); + + //Stick in branch at the end + machineBB->push_back(BAbranch->getInst()->clone()); + + //Add nop + BuildMI(machineBB, V9::NOP, 0); (((MachineBasicBlock*)origBB)->getParent())->getBasicBlockList().push_back(machineBB); prologues.push_back(machineBB); @@ -1827,23 +1882,51 @@ for(unsigned I = 0; I < prologues.size(); ++I) { MachineInstr *branch = 0; - + MachineInstr *branch2 = 0; + //Find terminator since getFirstTerminator does not work! for(MachineBasicBlock::reverse_iterator mInst = prologues[I]->rbegin(), mInstEnd = prologues[I]->rend(); mInst != mInstEnd; ++mInst) { MachineOpCode OC = mInst->getOpcode(); if(TMI->isBranch(OC)) { - branch = &*mInst; + if(mInst->getOpcode() == V9::BA) + branch2 = &*mInst; + else + branch = &*mInst; DEBUG(std::cerr << *mInst << "\n"); - break; + if(branch !=0 && branch2 !=0) + break; } } - //Update branch + //Update branch1 for(unsigned opNum = 0; opNum < branch->getNumOperands(); ++opNum) { MachineOperand &mOp = branch->getOperand(opNum); if (mOp.getType() == MachineOperand::MO_PCRelativeDisp) { - mOp.setValueReg(llvm_epilogues[(llvm_epilogues.size()-1-I)]); - + //Check if we are branching to the kernel, if not branch to epilogue + if(mOp.getVRegValue() == BB->getBasicBlock()) { + if(I == prologues.size()-1) + mOp.setValueReg(llvmKernelBB); + else + mOp.setValueReg(llvm_prologues[I+1]); + } + else + mOp.setValueReg(llvm_epilogues[(llvm_epilogues.size()-1-I)]); + } + } + + //Update branch1 + for(unsigned opNum = 0; opNum < branch2->getNumOperands(); ++opNum) { + MachineOperand &mOp = branch2->getOperand(opNum); + if (mOp.getType() == MachineOperand::MO_PCRelativeDisp) { + //Check if we are branching to the kernel, if not branch to epilogue + if(mOp.getVRegValue() == BB->getBasicBlock()) { + if(I == prologues.size()-1) + mOp.setValueReg(llvmKernelBB); + else + mOp.setValueReg(llvm_prologues[I+1]); + } + else + mOp.setValueReg(llvm_epilogues[(llvm_epilogues.size()-1-I)]); } } @@ -1870,18 +1953,6 @@ assert(branch != 0 && "There must be a terminator for this machine basic block!\n"); - //Push nop onto end of machine basic block - BuildMI(prologues[I], V9::NOP, 0); - - //Add a unconditional branch to the next prologue - if(I != prologues.size()-1) { - BuildMI(prologues[I], V9::BA, 1).addPCDisp(llvm_prologues[I+1]); - } - else - BuildMI(prologues[I], V9::BA, 1).addPCDisp(llvmKernelBB); - - //Add one more nop! - BuildMI(prologues[I], V9::NOP, 0); } //Fix up kernel machine branches @@ -1935,6 +2006,8 @@ //MachineCodeForInstruction & tempMvec = MachineCodeForInstruction::get(branchVal); //tempMvec.addTemp((Value*) tmp); + assert(llvm_epilogues.size() != 0 && "We must have epilogues!"); + TerminatorInst *newBranch = new BranchInst(llvmKernelBB, llvm_epilogues[0], branchVal->getCondition(), @@ -1980,7 +2053,10 @@ //Find all llvm basic blocks that branch to the loop entry and change to our first prologue. const BasicBlock *llvmBB = BB->getBasicBlock(); - for(pred_const_iterator P = pred_begin(llvmBB), PE = pred_end(llvmBB); P != PE; ++PE) { + std::vectorPreds (pred_begin(llvmBB), pred_end(llvmBB)); + + //for(pred_const_iterator P = pred_begin(llvmBB), PE = pred_end(llvmBB); P != PE; ++PE) { + for(std::vector::iterator P = Preds.begin(), PE = Preds.end(); P != PE; ++P) { if(*P == llvmBB) continue; else { Index: llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h diff -u llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h:1.16 llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h:1.17 --- llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h:1.16 Sun Oct 10 17:44:35 2004 +++ llvm/lib/Target/SparcV9/ModuloScheduling/ModuloScheduling.h Fri Oct 29 19:39:07 2004 @@ -49,7 +49,7 @@ std::set > edgesToIgnore; //Vector containing the partial order - std::vector > partialOrder; + std::vector > partialOrder; //Vector containing the final node order std::vector FinalNodeOrder; @@ -85,8 +85,8 @@ bool scheduleNode(MSchedGraphNode *node, int start, int end); - void predIntersect(std::vector &CurrentSet, std::vector &IntersectResult); - void succIntersect(std::vector &CurrentSet, std::vector &IntersectResult); + void predIntersect(std::set &CurrentSet, std::set &IntersectResult); + void succIntersect(std::set &CurrentSet, std::set &IntersectResult); void reconstructLoop(MachineBasicBlock*); @@ -101,6 +101,8 @@ void removePHIs(const MachineBasicBlock *origBB, std::vector &prologues, std::vector &epilogues, MachineBasicBlock *kernelBB, std::map &newValLocation); + void connectedComponentSet(MSchedGraphNode *node, std::set &ccSet, std::set &lastNodes); + public: ModuloSchedulingPass(TargetMachine &targ) : target(targ) {} virtual bool runOnFunction(Function &F); From lattner at cs.uiuc.edu Fri Oct 29 19:58:07 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 29 Oct 2004 19:58:07 -0500 Subject: [llvm-commits] CVS: llvm/Makefile.common Message-ID: <200410300058.i9U0w7xa028653@apoc.cs.uiuc.edu> Changes in directory llvm: Makefile.common updated: 1.134 -> 1.135 --- Log message: No really, this is LLVM! --- Diffs of the changes: (+1 -1) Index: llvm/Makefile.common diff -u llvm/Makefile.common:1.134 llvm/Makefile.common:1.135 --- llvm/Makefile.common:1.134 Fri Apr 23 19:10:56 2004 +++ llvm/Makefile.common Fri Oct 29 19:57:52 2004 @@ -16,7 +16,7 @@ # The variable $(LEVEL) *must* be set: # # 1. LEVEL - The level of the current subdirectory from the top of the -# MagicStats view. This level should be expressed as a path, for +# source directory. This level should be expressed as a path, for # example, ../.. for two levels deep. # # 2. DIRS - A list of subdirectories to be built. Fake targets are set up From lattner at cs.uiuc.edu Fri Oct 29 23:04:02 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 29 Oct 2004 23:04:02 -0500 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure/DSSupport.h Message-ID: <200410300404.i9U442HE014890@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis/DataStructure: DSSupport.h updated: 1.33 -> 1.34 --- Log message: Add an assertion and a method --- Diffs of the changes: (+9 -1) Index: llvm/include/llvm/Analysis/DataStructure/DSSupport.h diff -u llvm/include/llvm/Analysis/DataStructure/DSSupport.h:1.33 llvm/include/llvm/Analysis/DataStructure/DSSupport.h:1.34 --- llvm/include/llvm/Analysis/DataStructure/DSSupport.h:1.33 Wed Sep 1 17:55:34 2004 +++ llvm/include/llvm/Analysis/DataStructure/DSSupport.h Fri Oct 29 23:03:47 2004 @@ -95,9 +95,13 @@ // Allow explicit conversion to DSNode... inline DSNode *getNode() const; // Defined inline in DSNode.h - unsigned getOffset() const { return Offset; } + unsigned getOffset() const { + assert(!isForwarding() && "This is a forwarding NH, call getNode() first!"); + return Offset; + } void setOffset(unsigned O) { + assert(!isForwarding() && "This is a forwarding NH, call getNode() first!"); //assert((!N || Offset < N->Size || (N->Size == 0 && Offset == 0) || // !N->ForwardNH.isNull()) && "Node handle offset out of range!"); //assert((!N || O < N->Size || (N->Size == 0 && O == 0) || @@ -128,6 +132,10 @@ inline void setLink(unsigned Num, const DSNodeHandle &NH); private: DSNode *HandleForwarding() const; + + /// isForwarding - Return true if this NodeHandle is forwarding to another + /// one. + bool isForwarding() const; }; } // End llvm namespace From lattner at cs.uiuc.edu Fri Oct 29 23:05:13 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 29 Oct 2004 23:05:13 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200410300405.i9U45DHr014923@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.180 -> 1.181 --- Log message: * Add a method * change some uses of NH.getNode() in a bool context to use !NH.isNull() * Fix a bunch of places where we depended on the (undefined) order of evaluation of arguments to function calls to ensure that getNode() was called before getOffset(). In practice, this was NOT happening. --- Diffs of the changes: (+28 -16) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.180 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.181 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.180 Wed Sep 1 17:55:35 2004 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Fri Oct 29 23:05:01 2004 @@ -45,6 +45,12 @@ using namespace DS; +/// isForwarding - Return true if this NodeHandle is forwarding to another +/// one. +bool DSNodeHandle::isForwarding() const { + return N && N->isForwarding(); +} + DSNode *DSNodeHandle::HandleForwarding() const { assert(N->isForwarding() && "Can only be invoked if forwarding!"); @@ -674,8 +680,8 @@ CurNodeH.getNode()->foldNodeCompletely(); assert(CurNodeH.getNode() && CurNodeH.getOffset() == 0 && "folding did not make offset 0?"); - NOffset = NH.getOffset(); NSize = NH.getNode()->getSize(); + NOffset = NH.getOffset(); assert(NOffset == 0 && NSize == 1); } @@ -782,8 +788,10 @@ const DSNode *SN = SrcNH.getNode(); DSNodeHandle &NH = NodeMap[SN]; - if (!NH.isNull()) // Node already mapped? - return DSNodeHandle(NH.getNode(), NH.getOffset()+SrcNH.getOffset()); + if (!NH.isNull()) { // Node already mapped? + DSNode *NHN = NH.getNode(); + return DSNodeHandle(NHN, NH.getOffset()+SrcNH.getOffset()); + } // If SrcNH has globals and the destination graph has one of the same globals, // merge this node with the destination node, which is much more efficient. @@ -797,7 +805,8 @@ // We found one, use merge instead! merge(GI->second, Src.getNodeForValue(GV)); assert(!NH.isNull() && "Didn't merge node!"); - return DSNodeHandle(NH.getNode(), NH.getOffset()+SrcNH.getOffset()); + DSNode *NHN = NH.getNode(); + return DSNodeHandle(NHN, NH.getOffset()+SrcNH.getOffset()); } } } @@ -864,12 +873,12 @@ const DSNode *SN = SrcNH.getNode(); DSNodeHandle &SCNH = NodeMap[SN]; // SourceClonedNodeHandle if (!SCNH.isNull()) { // Node already cloned? - NH.mergeWith(DSNodeHandle(SCNH.getNode(), + DSNode *SCNHN = SCNH.getNode(); + NH.mergeWith(DSNodeHandle(SCNHN, SCNH.getOffset()+SrcNH.getOffset())); - return; // Nothing to do! } - + // Okay, so the source node has not already been cloned. Instead of creating // a new DSNode, only to merge it into the one we already have, try to perform // the merge in-place. The only case we cannot handle here is when the offset @@ -1095,9 +1104,10 @@ for (unsigned i = 0, e = Links.size(); i != e; ++i) if (DSNode *N = Links[i].getNode()) { DSGraph::NodeMapTy::const_iterator ONMI = OldNodeMap.find(N); - if (ONMI != OldNodeMap.end()) - Links[i].setTo(ONMI->second.getNode(), - Links[i].getOffset()+ONMI->second.getOffset()); + if (ONMI != OldNodeMap.end()) { + DSNode *ONMIN = ONMI->second.getNode(); + Links[i].setTo(ONMIN, Links[i].getOffset()+ONMI->second.getOffset()); + } } } @@ -1170,7 +1180,8 @@ E = G.ScalarMap.end(); I != E; ++I) { DSNodeHandle &MappedNode = OldNodeMap[I->second.getNode()]; DSNodeHandle &H = OldValMap[I->first]; - H.mergeWith(DSNodeHandle(MappedNode.getNode(), + DSNode *MappedNodeN = MappedNode.getNode(); + H.mergeWith(DSNodeHandle(MappedNodeN, I->second.getOffset()+MappedNode.getOffset())); // If this is a global, add the global to this fn or merge if already exists @@ -1202,8 +1213,9 @@ E = G.getReturnNodes().end(); I != E; ++I) { const DSNodeHandle &Ret = I->second; DSNodeHandle &MappedRet = OldNodeMap[Ret.getNode()]; + DSNode *MappedRetN = MappedRet.getNode(); OldReturnNodes.insert(std::make_pair(I->first, - DSNodeHandle(MappedRet.getNode(), + DSNodeHandle(MappedRetN, MappedRet.getOffset()+Ret.getOffset()))); } } @@ -1354,7 +1366,7 @@ // Add the link from the argument scalar to the provided value DSNodeHandle &NH = getNodeForValue(AI); - assert(NH.getNode() && "Pointer argument without scalarmap entry?"); + assert(!NH.isNull() && "Pointer argument without scalarmap entry?"); NH.mergeWith(CS.getPtrArg(i)); } } @@ -1777,7 +1789,7 @@ { TIME_REGION(Y, "removeDeadNodes:scalarscan"); for (DSScalarMap::iterator I = ScalarMap.begin(), E = ScalarMap.end(); I !=E;) if (isa(I->first)) { // Keep track of global nodes - assert(I->second.getNode() && "Null global node?"); + assert(!I->second.isNull() && "Null global node?"); assert(I->second.getNode()->isGlobalNode() && "Should be a global node!"); GlobalNodes.push_back(std::make_pair(I->first, I->second.getNode())); @@ -1948,7 +1960,7 @@ for (ScalarMapTy::const_iterator I = ScalarMap.begin(), E = ScalarMap.end(); I != E; ++I) { - assert(I->second.getNode() && "Null node in scalarmap!"); + assert(!I->second.isNull() && "Null node in scalarmap!"); AssertNodeInGraph(I->second.getNode()); if (GlobalValue *GV = dyn_cast(I->first)) { assert(I->second.getNode()->isGlobalNode() && @@ -1971,7 +1983,7 @@ if (N1 == 0 || N2 == 0) return; DSNodeHandle &Entry = NodeMap[N1]; - if (Entry.getNode()) { + if (!Entry.isNull()) { // Termination of recursion! if (StrictChecking) { assert(Entry.getNode() == N2 && "Inconsistent mapping detected!"); From lattner at cs.uiuc.edu Fri Oct 29 23:09:28 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 29 Oct 2004 23:09:28 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C/dixie/send.c Message-ID: <200410300409.i9U49SRS016669@apoc.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C/dixie: send.c updated: 1.1 -> 1.2 --- Log message: Make this more portable --- Diffs of the changes: (+3 -2) Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/dixie/send.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/dixie/send.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/dixie/send.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/dixie/send.c:1.1 Tue Oct 5 14:29:51 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/dixie/send.c Fri Oct 29 23:09:16 2004 @@ -59,8 +59,9 @@ #define DXI_SETSIZELIMIT(x, y) { (void) memcpy( &y[DXI_H_SIZELIMIT], \ (char *) &x, sizeof(short));} -extern void *memset(void *s, int c, size_t n); -extern int errno, dxi_debug, dxi_timeout, dxi_retries; +#include +#include +extern int dxi_debug, dxi_timeout, dxi_retries; extern char dxi_options; #ifndef INADDR_LOOPBACK From lattner at cs.uiuc.edu Fri Oct 29 23:10:56 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 29 Oct 2004 23:10:56 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C/football/io.c Message-ID: <200410300410.i9U4AuVw017121@apoc.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C/football: io.c updated: 1.1 -> 1.2 --- Log message: Make this more portable --- Diffs of the changes: (+0 -3) Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/football/io.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/football/io.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/football/io.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/football/io.c:1.1 Tue Oct 5 16:05:36 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/football/io.c Fri Oct 29 23:10:44 2004 @@ -12,9 +12,6 @@ char responce[MAX_RESP_LEN+1]; BOOL got_unused_responce = NO; -extern char *strcat(char *s1, const char *s2); -extern int strncmp(const char *s1, const char *s2, size_t n); - void prompt(FILE *output,FILE *input) { extern char *get_responce(FILE *input); From lattner at cs.uiuc.edu Fri Oct 29 23:14:25 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 29 Oct 2004 23:14:25 -0500 Subject: [llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/alias.c getopt.c pw.c Message-ID: <200410300414.i9U4EPiB018957@apoc.cs.uiuc.edu> Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail: alias.c updated: 1.1 -> 1.2 getopt.c updated: 1.1 -> 1.2 pw.c updated: 1.1 -> 1.2 --- Log message: Make this more portable --- Diffs of the changes: (+4 -9) Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/alias.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/alias.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/alias.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/alias.c:1.1 Tue Oct 5 16:25:14 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/alias.c Fri Oct 29 23:14:12 2004 @@ -506,7 +506,7 @@ node *add_vert(node *head,char *str) { - char *p, *malloc(); + char *p; /* void free(); */ node *new; @@ -537,7 +537,6 @@ void add_horz(node *head,char *str) { - char *malloc(); node *new; if((new = (node *) malloc(sizeof(node))) != NNULL) { Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/getopt.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/getopt.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/getopt.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/getopt.c:1.1 Tue Oct 5 16:25:14 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/getopt.c Fri Oct 29 23:14:12 2004 @@ -24,10 +24,9 @@ /* This include is needed only to get "index" defined as "strchr" on Sys V. */ #include "defs.h" +#include /*LINTLIBRARY*/ -#define NULL 0 -#define EOF (-1) #define ERR(s, c) if(opterr){\ extern int write();\ char errbuf[2];\ @@ -36,12 +35,11 @@ (void) write(2, s, (unsigned)strlen(s));\ (void) write(2, errbuf, 2);} -extern char *index(); - int opterr = 1; int optind = 1; int optopt; char *optarg; +#define EOF (-1) int getopt(int argc,char **argv,char *opts) { Index: llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c:1.2 --- llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c:1.1 Tue Oct 5 16:25:14 2004 +++ llvm-test/MultiSource/Benchmarks/Prolangs-C/unix-smail/pw.c Fri Oct 29 23:14:12 2004 @@ -8,9 +8,7 @@ #include #include "defs.h" #include - -char *malloc(); -void free(); +#include typedef struct pw_node pwlist; From lattner at cs.uiuc.edu Fri Oct 29 23:22:58 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri, 29 Oct 2004 23:22:58 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp Message-ID: <200410300422.i9U4Mwuj021275@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Local.cpp updated: 1.115 -> 1.116 --- Log message: Fix more undefined behavior --- Diffs of the changes: (+13 -10) Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.115 llvm/lib/Analysis/DataStructure/Local.cpp:1.116 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.115 Tue Oct 26 11:23:03 2004 +++ llvm/lib/Analysis/DataStructure/Local.cpp Fri Oct 29 23:22:45 2004 @@ -213,7 +213,7 @@ return 0; // Null doesn't point to anything, don't add to ScalarMap! DSNodeHandle &NH = ScalarMap[V]; - if (NH.getNode()) + if (!NH.isNull()) return NH; // Already have a node? Just return it... // Otherwise we need to create a new node to point to. @@ -237,7 +237,7 @@ // This returns a conservative unknown node for any unhandled ConstExpr return NH = createNode()->setUnknownNodeMarker(); } - if (NH.getNode() == 0) { // (getelementptr null, X) returns null + if (NH.isNull()) { // (getelementptr null, X) returns null ScalarMap.erase(V); return 0; } @@ -272,7 +272,7 @@ DSNodeHandle &GraphBuilder::getLink(const DSNodeHandle &node, unsigned LinkNo) { DSNodeHandle &Node = const_cast(node); DSNodeHandle &Link = Node.getLink(LinkNo); - if (!Link.getNode()) { + if (Link.isNull()) { // If the link hasn't been created yet, make and return a new shadow node Link = createNode(); } @@ -318,7 +318,7 @@ void GraphBuilder::visitGetElementPtrInst(User &GEP) { DSNodeHandle Value = getValueDest(*GEP.getOperand(0)); - if (Value.getNode() == 0) return; + if (Value.isNull()) return; // As a special case, if all of the index operands of GEP are constant zeros, // handle this just like we handle casts (ie, don't do much). @@ -472,8 +472,9 @@ // Make that the node is read from. Ptr.getNode()->setReadMarker(); - // Ensure a typerecord exists... - Ptr.getNode()->mergeTypeInfo(I.getType(), Ptr.getOffset(), false); + // Ensure a type record exists. + DSNode *PtrN = Ptr.getNode(); + PtrN->mergeTypeInfo(I.getType(), Ptr.getOffset(), false); if (isPointerType(I.getType())) setDestTo(I, getLink(Ptr)); @@ -979,8 +980,8 @@ if (isPointerType((*I)->getType())) CurNode.mergeWith(getValueDest(**I)); - if (CurNode.getNode()) - CurNode.getNode()->setUnknownNodeMarker(); + if (DSNode *N = CurNode.getNode()) + N->setUnknownNodeMarker(); } @@ -993,7 +994,8 @@ // pointed to by NH. void GraphBuilder::MergeConstantInitIntoNode(DSNodeHandle &NH, Constant *C) { // Ensure a type-record exists... - NH.getNode()->mergeTypeInfo(C->getType(), NH.getOffset()); + DSNode *NHN = NH.getNode(); + NHN->mergeTypeInfo(C->getType(), NH.getOffset()); if (C->getType()->isFirstClassType()) { if (isPointerType(C->getType())) @@ -1011,7 +1013,8 @@ } else if (ConstantStruct *CS = dyn_cast(C)) { const StructLayout *SL = TD.getStructLayout(CS->getType()); for (unsigned i = 0, e = CS->getNumOperands(); i != e; ++i) { - DSNodeHandle NewNH(NH.getNode(), NH.getOffset()+SL->MemberOffsets[i]); + DSNode *NHN = NH.getNode(); + DSNodeHandle NewNH(NHN, NH.getOffset()+SL->MemberOffsets[i]); MergeConstantInitIntoNode(NewNH, cast(CS->getOperand(i))); } } else if (isa(C) || isa(C)) { From lattner at cs.uiuc.edu Sat Oct 30 00:41:36 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 30 Oct 2004 00:41:36 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200410300541.i9U5faPN022925@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.181 -> 1.182 --- Log message: Fix three bugs: 1. Calls to external global VARIABLES should not be treated as a call to an external function 2. Efficiently deleting an element from a vector by using std::swap with the back, then pop_back is NOT a good way to keep the vector sorted. 3. Our hope of having stuff get deleted by making them redundant just won't work. In particular, if we have three calls in sequence that should be merged: A, B, C first we unify B into A. To be sure that they appeared identical (so B would be erased) we set B = A. On the next step, we unified C into A and set C = A. Unfortunately, this is no guarantee that C = B, so we would fail to delete the dead call. Switch to a more explicit scheme. --- Diffs of the changes: (+12 -9) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.181 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.182 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.181 Fri Oct 29 23:05:01 2004 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Sat Oct 30 00:41:23 2004 @@ -1491,7 +1491,7 @@ static inline bool nodeContainsExternalFunction(const DSNode *N) { const std::vector &Globals = N->getGlobals(); for (unsigned i = 0, e = Globals.size(); i != e; ++i) - if (Globals[i]->isExternal()) + if (Globals[i]->isExternal() && isa(Globals[i])) return true; return false; } @@ -1507,6 +1507,9 @@ Function *LastCalleeFunc = 0; unsigned NumDuplicateCalls = 0; bool LastCalleeContainsExternalFunction = false; + + std::vector CallsToDelete; + for (unsigned i = 0; i != Calls.size(); ++i) { DSCallSite &CS = Calls[i]; @@ -1518,9 +1521,7 @@ #ifndef NDEBUG std::cerr << "WARNING: Useless call site found.\n"; #endif - CS.swap(Calls.back()); - Calls.pop_back(); - --i; + CallsToDelete.push_back(i); } else { // If the return value or any arguments point to a void node with no // information at all in it, and the call node is the only node to point @@ -1563,11 +1564,8 @@ DSCallSite &OCS = Calls[i-1]; OCS.mergeWith(CS); - // The node will now be eliminated as a duplicate! - if (CS.getNumPtrArgs() < OCS.getNumPtrArgs()) - CS = OCS; - else if (CS.getNumPtrArgs() > OCS.getNumPtrArgs()) - OCS = CS; + // No need to keep this call anymore. + CallsToDelete.push_back(i); } #endif } else { @@ -1583,6 +1581,11 @@ } } #endif + + unsigned NumDeleted = 0; + for (unsigned i = 0, e = CallsToDelete.size(); i != e; ++i) + Calls.erase(Calls.begin()+CallsToDelete[i]-NumDeleted++); + Calls.erase(std::unique(Calls.begin(), Calls.end()), Calls.end()); // Track the number of call nodes merged away... From lattner at cs.uiuc.edu Sat Oct 30 02:21:33 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat, 30 Oct 2004 02:21:33 -0500 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Printer.cpp Message-ID: <200410300721.i9U7LXWb024950@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Printer.cpp updated: 1.72 -> 1.73 --- Log message: Fix some more problems where we called getOffset before getNode() --- Diffs of the changes: (+4 -2) Index: llvm/lib/Analysis/DataStructure/Printer.cpp diff -u llvm/lib/Analysis/DataStructure/Printer.cpp:1.72 llvm/lib/Analysis/DataStructure/Printer.cpp:1.73 --- llvm/lib/Analysis/DataStructure/Printer.cpp:1.72 Wed Sep 1 17:55:35 2004 +++ llvm/lib/Analysis/DataStructure/Printer.cpp Sat Oct 30 02:21:19 2004 @@ -144,9 +144,10 @@ GW.emitSimpleNode(I->first, "", OS.str()); // Add edge from return node to real destination + DSNode *DestNode = I->second.getNode(); int EdgeDest = I->second.getOffset() >> DS::PointerShift; if (EdgeDest == 0) EdgeDest = -1; - GW.emitEdge(I->first, -1, I->second.getNode(), + GW.emitEdge(I->first, -1, DestNode, EdgeDest, "arrowtail=tee,color=gray63"); } @@ -165,9 +166,10 @@ GW.emitSimpleNode((void*)I->first, "plaintext=circle", Label); // Add edge from return node to real destination + DSNode *RetNode = I->second.getNode(); int RetEdgeDest = I->second.getOffset() >> DS::PointerShift;; if (RetEdgeDest == 0) RetEdgeDest = -1; - GW.emitEdge((void*)I->first, -1, I->second.getNode(), + GW.emitEdge((void*)I->first, -1, RetNode, RetEdgeDest, "arrowtail=tee,color=gray63"); } From reid at x10sys.com Sat Oct 30 04:19:48 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 30 Oct 2004 04:19:48 -0500 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/crtend/Makefile Message-ID: <200410300919.EAA11420@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/crtend: Makefile updated: 1.18 -> 1.19 --- Log message: Internalize variable names to prevent recursive assignment. Cleanup docs. --- Diffs of the changes: (+21 -21) Index: llvm/runtime/GCCLibraries/crtend/Makefile diff -u llvm/runtime/GCCLibraries/crtend/Makefile:1.18 llvm/runtime/GCCLibraries/crtend/Makefile:1.19 --- llvm/runtime/GCCLibraries/crtend/Makefile:1.18 Tue Oct 26 16:30:31 2004 +++ llvm/runtime/GCCLibraries/crtend/Makefile Sat Oct 30 04:19:36 2004 @@ -28,43 +28,43 @@ include $(LEVEL)/Makefile.common # CRTEND_A - The result of making 'all' - the final archive file. -CRTEND_A = $(LIBDIR)/libcrtend.a +CRTEND_A = $(LibDir)/libcrtend.a all:: $(CRTEND_A) # Installation simply requires copying the archive to it's new home. $(bytecode_libdir)/libcrtend.a: $(CRTEND_A) $(bytecode_libdir) - @$(ECHO) Installing $(CRTEND_A) - $(VERB) $(INSTALL) $(CRTEND_A) $(bytecode_libdir) + $(Echo) Installing $(CRTEND_A) + $(Verb) $(INSTALL) $(CRTEND_A) $(bytecode_libdir) install:: $(DESTDIR)$(bytecode_libdir)/libcrtend.a install-bytecode:: $(DESTDIR)$(bytecode_libdir)/libcrtend.a -# The four components described in the README +# The three components described in the README Components := main genericeh sjljeh -ComponentLibs := $(Components:%=$(OBJDIR)/comp_%.bc) +ComponentLibs := $(Components:%=$(ObjDir)/comp_%.bc) # We build libcrtend.a from the four components described in the README. -$(CRTEND_A) : $(ComponentLibs) $(LIBDIR)/.dir - @$(ECHO) Building final libcrtend.a file from components - $(VERB) $(Archive) $@ $(ComponentLibs) - -MainObj := $(OBJDIR)/crtend.bc $(OBJDIR)/listend.bc -GenericEHObj := $(OBJDIR)/Exception.bc -SJLJEHObj := $(OBJDIR)/SJLJ-Exception.bc +$(CRTEND_A) : $(ComponentLibs) $(LibDir)/.dir + $(Echo) Building final libcrtend.a file from components + $(Verb) $(Archive) $@ $(ComponentLibs) + +MainObj := $(ObjDir)/crtend.bc $(ObjDir)/listend.bc +GenericEHObj := $(ObjDir)/Exception.bc +SJLJEHObj := $(ObjDir)/SJLJ-Exception.bc # __main and ctor/dtor support component -$(OBJDIR)/comp_main.bc: $(MainObj) - @$(ECHO) Linking $(notdir $@) component... - $(VERB) $(GCCLD) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_main.lst $(MainObj) -o $@ +$(ObjDir)/comp_main.bc: $(MainObj) + $(Echo) Linking $(notdir $@) component... + $(Verb) $(GCCLD) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_main.lst $(MainObj) -o $@ # Generic exception handling support runtime. -$(OBJDIR)/comp_genericeh.bc: $(GenericEHObj) - @$(ECHO) Linking $(notdir $@) component... - $(VERB) $(GCCLD) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_genericeh.lst $(GenericEHObj) -o $@ +$(ObjDir)/comp_genericeh.bc: $(GenericEHObj) + $(Echo) Linking $(notdir $@) component... + $(Verb) $(GCCLD) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_genericeh.lst $(GenericEHObj) -o $@ # setjmp/longjmp exception handling support runtime. -$(OBJDIR)/comp_sjljeh.bc: $(SJLJEHObj) - @$(ECHO) Linking $(notdir $@) component... - $(VERB) $(GCCLD) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_sjljeh.lst $(SJLJEHObj) -o $@ +$(ObjDir)/comp_sjljeh.bc: $(SJLJEHObj) + $(Echo) Linking $(notdir $@) component... + $(Verb) $(GCCLD) -link-as-library -internalize-public-api-file=$(BUILD_SRC_DIR)/comp_sjljeh.lst $(SJLJEHObj) -o $@ From reid at x10sys.com Sat Oct 30 04:19:48 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 30 Oct 2004 04:19:48 -0500 Subject: [llvm-commits] CVS: llvm/utils/Burg/Makefile Message-ID: <200410300919.EAA11398@zion.cs.uiuc.edu> Changes in directory llvm/utils/Burg: Makefile updated: 1.29 -> 1.30 --- Log message: Internalize variable names to prevent recursive assignment. Cleanup docs. --- Diffs of the changes: (+18 -15) Index: llvm/utils/Burg/Makefile diff -u llvm/utils/Burg/Makefile:1.29 llvm/utils/Burg/Makefile:1.30 --- llvm/utils/Burg/Makefile:1.29 Thu Oct 28 11:48:13 2004 +++ llvm/utils/Burg/Makefile Sat Oct 30 04:19:36 2004 @@ -8,31 +8,34 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. TOOLNAME = burg -BUILT_SOURCES = gram.tab.c +BUILT_SOURCES = gram.tab.c gram.tab.h EXTRA_DIST = gram.yc gram.tab.c gram.tab.h sample.gr include $(LEVEL)/Makefile.common gram.tab.c gram.tab.h: gram.yc - $(VERB) $(BISON) -o gram.tab.c -d $< + $(Verb) $(BISON) -o gram.tab.c -d $< -$(OBJDIR)/lex.o : gram.tab.h +$(ObjDir)/lex.o : gram.tab.h clean:: - $(VERB) $(RM) -rf gram.tab.h gram.tab.c core* *.aux *.log *.dvi sample sample.c tmp - -#$(BUILD_OBJ_DIR)/Release/lex.o $(BUILD_OBJ_DIR)/Profile/lex.o $(BUILD_OBJ_DIR)/Debug/lex.o: gram.tab.h + $(Verb) $(RM) -rf gram.tab.h gram.tab.c core* *.aux *.log *.dvi sample sample.c tmp doc.dvi: doc.tex - $(VERB) latex doc; latex doc - + $(Verb) latex doc; latex doc -test:: $(TOOLEXENAME_G) sample.gr - $(TOOLEXENAME_G) -I sample.c && $(CC) $(CFLAGS) -o sample sample.c && ./sample - $(TOOLEXENAME_G) -I sample.gr >tmp && cmp tmp sample.c - $(TOOLEXENAME_G) -I tmp && cmp tmp sample.c - $(TOOLEXENAME_G) -I -= tmp && cmp tmp sample.c +check:: $(ToolBuildPath) $(BUILD_SRC_DIR)/sample.gr + $(ToolBuildPath) -I <$(BUILD_SRC_DIR)/sample.gr >sample.c \ + && $(CC) $(CFLAGS) -o sample sample.c && ./sample + $(ToolBuildPath) -I $(BUILD_SRC_DIR)/sample.gr >tmp \ + && cmp tmp sample.c + $(ToolBuildPath) -I <$(BUILD_SRC_DIR)/sample.gr -o tmp \ + && cmp tmp sample.c + $(ToolBuildPath) -I $(BUILD_SRC_DIR)/sample.gr -o tmp \ + && cmp tmp sample.c + $(ToolBuildPath) -I -O0 <$(BUILD_SRC_DIR)/sample.gr >tmp \ + && cmp tmp sample.c + $(ToolBuildPath) -I -= <$(BUILD_SRC_DIR)/sample.gr >tmp \ + && cmp tmp sample.c $(RM) -f tmp sample.c From reid at x10sys.com Sat Oct 30 04:19:48 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 30 Oct 2004 04:19:48 -0500 Subject: [llvm-commits] CVS: llvm/Makefile Makefile.config.in Makefile.rules Message-ID: <200410300919.EAA11415@zion.cs.uiuc.edu> Changes in directory llvm: Makefile updated: 1.33 -> 1.34 Makefile.config.in updated: 1.35 -> 1.36 Makefile.rules updated: 1.224 -> 1.225 --- Log message: Internalize variable names to prevent recursive assignment. Cleanup docs. --- Diffs of the changes: (+501 -422) Index: llvm/Makefile diff -u llvm/Makefile:1.33 llvm/Makefile:1.34 --- llvm/Makefile:1.33 Tue Oct 26 02:05:09 2004 +++ llvm/Makefile Sat Oct 30 04:19:36 2004 @@ -20,10 +20,10 @@ include $(LEVEL)/Makefile.common dist-hook:: - @$(ECHO) Eliminating CVS directories from distribution - $(VERB) rm -rf `find $(TopDistDir) -type d -name CVS -print` - @$(ECHO) Eliminating files constructed by configure - $(VERB) rm -f \ + $(Echo) Eliminating CVS directories from distribution + $(Verb) $(RM) -rf `find $(TopDistDir) -type d -name CVS -print` + $(Echo) Eliminating files constructed by configure + $(Verb) $(RM) -f \ $(TopDistDir)/include/llvm/ADT/hash_map \ $(TopDistDir)/include/llvm/ADT/hash_set \ $(TopDistDir)/include/llvm/ADT/iterator \ @@ -31,7 +31,7 @@ $(TopDistDir)/include/llvm/Support/DataTypes.h \ $(TopDistDir)/include/llvm/Support/ThreadSupport.h -test :: all - cd test; $(MAKE) +check :: + cd test; $(MAKE) tools-only: all Index: llvm/Makefile.config.in diff -u llvm/Makefile.config.in:1.35 llvm/Makefile.config.in:1.36 --- llvm/Makefile.config.in:1.35 Mon Oct 25 03:27:37 2004 +++ llvm/Makefile.config.in Sat Oct 30 04:19:36 2004 @@ -54,7 +54,7 @@ RPWD = pwd SED = sed RM = rm -ECHO = echo "llvm["$(MAKELEVEL)"]:" +ECHO = echo MKDIR = @abs_top_srcdir@/autoconf/mkinstalldirs INSTALL_SH = $(BUILD_SRC_ROOT)/autoconf/install-sh DATE = date Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.224 llvm/Makefile.rules:1.225 --- llvm/Makefile.rules:1.224 Fri Oct 29 17:14:56 2004 +++ llvm/Makefile.rules Sat Oct 30 04:19:36 2004 @@ -12,89 +12,91 @@ # #===-----------------------------------------------------------------------==== -# -# Set the VPATH so that we can find source files. -# -VPATH=$(BUILD_SRC_DIR) - -############################################################################### +################################################################################ # TARGETS: Define standard targets that can be invoked -############################################################################### +################################################################################ #-------------------------------------------------------------------- # Define the various target sets #-------------------------------------------------------------------- -RECURSIVE_TARGETS := all clean check install uninstall -LOCAL_TARGETS := all-local clean-local check-local install-local \ - printvars uninstall-local -TOPLEV_TARGETS := dist dist-check dist-clean tags -USER_TARGETS := $(RECURSIVE_TARGETS) $(LOCAL_TARGETS) $(TOPLEV_TARGETS) -INTERNAL_TARGETS := preconditions +RecursiveTargets := all clean check install uninstall +LocalTargets := all-local clean-local check-local install-local printvars \ + uninstall-local +TopLevelTargets := dist dist-check dist-clean tags dist-gzip dist-bzip2 \ + dist-zip +UserTargets := $(RecursiveTargets) $(LocalTargets) $(TopLevelTargets) +InternalTargets := preconditions distdir dist-hook -############################################################################### +################################################################################ # INITIALIZATION: Basic things the makefile needs -############################################################################### +################################################################################ + +#-------------------------------------------------------------------- +# Set the VPATH so that we can find source files. +#-------------------------------------------------------------------- +VPATH=$(BUILD_SRC_DIR) #-------------------------------------------------------------------- # Reset the list of suffixes we know how to build #-------------------------------------------------------------------- .SUFFIXES: -.SUFFIXES: .c .cpp .h .hpp .y .l .lo .o .a $(SHLIBEXT) .bc .td .ps .dot $(SUFFIXES) +.SUFFIXES: .c .cpp .h .hpp .y .l .lo .o .a .bc .td .ps .dot +.SUFFIXES: $(SHLIBEXT) $(SUFFIXES) #-------------------------------------------------------------------- # Mark all of these targets as phony to avoid implicit rule search #-------------------------------------------------------------------- -.PHONY: $(USER_TARGETS) $(INTERNAL_TARGETS) +.PHONY: $(UserTargets) $(InternalTargets) #-------------------------------------------------------------------- # Make sure all the user-target rules are double colon rules and # they are defined first. #-------------------------------------------------------------------- -$(USER_TARGETS):: +$(UserTargets):: ################################################################################ # PRECONDITIONS: that which must be built/checked first ################################################################################ -SRCMKFILES := $(filter %Makefile %Makefile.rules %Makefile.tests \ - %Makefile.JIT,$(wildcard $(BUILD_SRC_DIR)/Makefile*)) -OBJMKFILES := $(subst $(BUILD_SRC_DIR),$(BUILD_OBJ_DIR),$(SRCMKFILES)) -CONFIGURE := $(LLVM_SRC_ROOT)/configure -CONFIG_STATUS := $(LLVM_OBJ_ROOT)/config.status -MAKE_CONFIG_IN:= $(LLVM_SRC_ROOT)/Makefile.config.in -MAKE_CONFIG := $(LLVM_OBJ_ROOT)/Makefile.config -PRECONDITIONS := $(CONFIG_STATUS) $(MAKE_CONFIG) $(OBJMKFILES) +SrcMakefiles := $(filter %Makefile %Makefile.rules %Makefile.tests \ + %Makefile.JIT,$(wildcard $(BUILD_SRC_DIR)/Makefile*)) +ObjMakefiles := $(subst $(BUILD_SRC_DIR),$(BUILD_OBJ_DIR),$(SrcMakefiles)) +ConfigureScript := $(LLVM_SRC_ROOT)/configure +ConfigStatusScript := $(LLVM_OBJ_ROOT)/config.status +MakefileConfigIn := $(LLVM_SRC_ROOT)/Makefile.config.in +MakefileConfig := $(LLVM_OBJ_ROOT)/Makefile.config +PreConditions := $(ConfigStatusScript) $(MakefileConfig) $(ObjMakefiles) -preconditions : $(PRECONDITIONS) +preconditions : $(PreConditions) #------------------------------------------------------------------------ # Make sure the BUILT_SOURCES are built first #------------------------------------------------------------------------ -$(filter-out clean clean-local,USER_TARGETS):: $(BUILT_SOURCES) +$(filter-out clean clean-local,UserTargets):: $(BUILT_SOURCES) clean-local:: ifneq ($(strip $(BUILT_SOURCES)),) - $(VERB) $(RM) -f $(BUILT_SOURCES) + $(Verb) $(RM) -f $(BUILT_SOURCES) endif -$(BUILT_SOURCES) : $(BUILD_OBJ_ROOT)/Makefile +$(BUILT_SOURCES) : $(ObjMakefiles) #------------------------------------------------------------------------ # Make sure we're not using a stale configuration #------------------------------------------------------------------------ -.PRECIOUS: $(CONFIG_STATUS) -$(CONFIG_STATUS): $(CONFIGURE) - @$(ECHO) Reconfiguring with $< - $(VERB) $(CONFIG_STATUS) --recheck $(CONFIGUREFLAGS) - $(VERB) $(CONFIG_STATUS) +.PRECIOUS: $(ConfigStatusScript) +$(ConfigStatusScript): $(ConfigureScript) + $(Echo) Reconfiguring with $< + $(Verb) $(ConfigStatusScript) --recheck $(ConfigureScriptFLAGS) + $(Verb) $(ConfigStatusScript) #------------------------------------------------------------------------ # Make sure the configuration makefile is up to date #------------------------------------------------------------------------ -$(MAKE_CONFIG): $(MAKE_CONFIG_IN) $(CONFIG_STATUS) - @$(ECHO) Regenerating $@ - $(VERB) cd $(LLVM_OBJ_ROOT) ; $(CONFIG_STATUS) Makefile.config +$(MakefileConfig): $(MakefileConfigIn) $(ConfigStatusScript) + $(Echo) Regenerating $@ + $(Verb) cd $(LLVM_OBJ_ROOT) ; $(ConfigStatusScript) Makefile.config #------------------------------------------------------------------------ # If the Makefile in the source tree has been updated, copy it over into the @@ -103,9 +105,9 @@ ifneq ($(BUILD_OBJ_DIR),$(BUILD_SRC_DIR)) $(BUILD_OBJ_DIR)/Makefile : $(BUILD_SRC_DIR)/Makefile - @$(ECHO) "Updating Makefile" - $(VERB) $(MKDIR) $(@D) - $(VERB) cp -f $< $@ + $(Echo) "Updating Makefile" + $(Verb) $(MKDIR) $(@D) + $(Verb) cp -f $< $@ # Copy the Makefile.* files unless we're in the root directory which avoids # the copying of Makefile.config.in or other things that should be explicitly @@ -114,7 +116,7 @@ @case '$?' in \ *Makefile.rules) ;; \ *.in) ;; \ - *) $(ECHO) "Updating $(@F)" ; \ + *) $(Echo) "Updating $(@F)" ; \ $(MKDIR) $(@D) ; \ cp -f $< $@ ;; \ esac @@ -124,7 +126,7 @@ #------------------------------------------------------------------------ # Set up the basic dependencies #------------------------------------------------------------------------ -$(USER_TARGETS):: $(PRECONDITIONS) +$(UserTargets):: $(PreConditions) all:: all-local check:: check-local @@ -143,84 +145,101 @@ #-------------------------------------------------------------------- ifdef ENABLE_PROFILING - CONFIGURATION := Profile - LLVMCXXFLAGS := -O3 -DNDEBUG -felide-constructors -finline-functions -pg - LLVMCFLAGS := -O3 -DNDEBUG -pg - LLVMLDFLAGS := -O3 -DNDEBUG -pg + Configuration := Profile + CXX.Flags := -O3 -DNDEBUG -felide-constructors -finline-functions -pg + C.Flags := -O3 -DNDEBUG -pg + LD.Flags := -O3 -DNDEBUG -pg else ifdef ENABLE_OPTIMIZED - CONFIGURATION := Release - LLVMCXXFLAGS := -O3 -DNDEBUG -finline-functions -felide-constructors -fomit-frame-pointer - LLVMCFLAGS := -O3 -DNDEBUG -fomit-frame-pointer - LLVMLDFLAGS := -O3 -DNDEBUG + Configuration := Release + CXX.Flags := -O3 -DNDEBUG -finline-functions -felide-constructors -fomit-frame-pointer + C.Flags := -O3 -DNDEBUG -fomit-frame-pointer + LD.Flags := -O3 -DNDEBUG else - CONFIGURATION := Debug - LLVMCXXFLAGS := -g -D_DEBUG - LLVMCFLAGS := -g -D_DEBUG - LLVMLDFLAGS := -g -D_DEBUG + Configuration := Debug + CXX.Flags := -g -D_DEBUG + C.Flags := -g -D_DEBUG + LD.Flags := -g -D_DEBUG KEEP_SYMBOLS := 1 endif endif -LLVMCXXFLAGS += $(CXXFLAGS) -LLVMCFLAGS += $(CFLAGS) -LLVMCPPFLAGS += $(CPPFLAGS) -LLVMLDFLAGS += $(LDFLAGS) -LLVMARFLAGS := cru +CXX.Flags += $(CXXFLAGS) +C.Flags += $(CFLAGS) +CPP.Flags += $(CPPFLAGS) +LD.Flags += $(LDFLAGS) +AR.Flags := cru +LibTool.Flags := --tag=CXX #-------------------------------------------------------------------- # Directory locations #-------------------------------------------------------------------- -OBJDIR := $(BUILD_OBJ_DIR)/$(CONFIGURATION) -LIBDIR := $(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION) -TOOLDIR := $(BUILD_OBJ_ROOT)/tools/$(CONFIGURATION) -LLVMLIBDIR := $(LLVM_OBJ_ROOT)/lib/$(CONFIGURATION) -LLVMTOOLDIR := $(LLVM_OBJ_ROOT)/tools/$(CONFIGURATION) +ObjDir := $(BUILD_OBJ_DIR)/$(Configuration) +LibDir := $(BUILD_OBJ_ROOT)/lib/$(Configuration) +ToolDir := $(BUILD_OBJ_ROOT)/tools/$(Configuration) +LLVMLibDir := $(LLVM_OBJ_ROOT)/lib/$(Configuration) +LLVMToolDir := $(LLVM_OBJ_ROOT)/tools/$(Configuration) #-------------------------------------------------------------------- # Full Paths To Compiled Tools and Utilities #-------------------------------------------------------------------- +EchoCmd := $(ECHO) llvm[$(MAKELEVEL)]: +Echo := @$(EchoCmd) +ifndef LIBTOOL LIBTOOL := $(LLVM_OBJ_ROOT)/mklib -LLVMAS := $(LLVMTOOLDIR)/llvm-as$(EXEEXT) -BURG := $(LLVMTOOLDIR)/burg$(EXEEXT) -TBLGEN := $(LLVMTOOLDIR)/tblgen$(EXEEXT) -GCCLD := $(LLVMTOOLDIR)/gccld$(EXEEXT) -LLVMGCC := PATH=$(LLVMTOOLDIR):$(PATH) $(LLVMGCCDIR)/bin/gcc -LLVMGXX := PATH=$(LLVMTOOLDIR):$(PATH) $(LLVMGCCDIR)/bin/g++ +endif +ifndef LLVMAS +LLVMAS := $(LLVMToolDir)/llvm-as$(EXEEXT) +endif +ifndef BURG +BURG := $(LLVMToolDir)/burg$(EXEEXT) +endif +ifndef TBLGEN +TBLGEN := $(LLVMToolDir)/tblgen$(EXEEXT) +endif +ifndef GCCLD +GCCLD := $(LLVMToolDir)/gccld$(EXEEXT) +endif +ifndef LLVMGCC +LLVMGCC := PATH=$(LLVMToolDir):$(PATH) $(LLVMGCCDIR)/bin/gcc +endif +ifndef LLVMGXX +LLVMGXX := PATH=$(LLVMToolDir):$(PATH) $(LLVMGCCDIR)/bin/g++ +endif # Need a better way to compute this. -LLVMGCCLIBDIR := $(dir $(shell $(LLVMGCC) -print-file-name=libgcc.a))/ +LLVMGCCLibDir := $(dir $(shell $(LLVMGCC) -print-file-name=libgcc.a))/ #-------------------------------------------------------------------- # Adjust to user's request #-------------------------------------------------------------------- -# Adjust LIBTOOL options for shared libraries, or not. +# Adjust LIBTOOL flags for shared libraries, or not. ifndef SHARED_LIBRARY - LIBTOOL += --tag=disable-shared + LibTool.Flags += --tag=disable-shared else - LLVMLDFLAGS += -rpath $(LIBDIR) + LD.Flags += -rpath $(LibDir) endif # Adjust settings for verbose mode ifndef VERBOSE - VERB := @ - LIBTOOL += --silent - AR += >/dev/null 2>/dev/null - CONFIGUREFLAGS += >$(BUILD_OBJ_DIR)/configure.out 2>&1 + Verb := @ + LibTool.Flags += --silent + AR.Flags += >/dev/null 2>/dev/null + ConfigureScriptFLAGS += >$(BUILD_OBJ_DIR)/configure.out 2>&1 else - CONFIGUREFLAGS := + ConfigureScriptFLAGS := endif # By default, strip symbol information from executable ifndef KEEP_SYMBOLS - STRIP = $(PLATFORMSTRIPOPTS) - STRIP_WARN_MSG = "(without symbols)" + Strip := $(PLATFORMSTRIPOPTS) + StripWarnMsg := "(without symbols)" endif # Adjust linker flags for building an executable ifdef TOOLNAME - LLVMLDFLAGS += -rpath $(TOOLDIR) -export-dynamic + LD.Flags += -rpath $(ToolDir) -export-dynamic endif #---------------------------------------------------------- @@ -229,8 +248,8 @@ CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -LLVMLDFLAGS += -L$(LIBDIR) -L$(LLVMLIBDIR) -LLVMCPPFLAGS += -I$(BUILD_OBJ_DIR) \ +LD.Flags += -L$(LibDir) -L$(LLVMLibDir) +CPP.Flags += -I$(BUILD_OBJ_DIR) \ -I$(BUILD_SRC_DIR) \ -I$(BUILD_SRC_ROOT)/include \ -I$(BUILD_OBJ_ROOT)/include \ @@ -238,20 +257,21 @@ -I$(LLVM_SRC_ROOT)/include \ -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -Compile.C = $(CC) $(LLVMCPPFLAGS) $(CompileCommonOpts) -c $(LLVMCFLAGS) -LTCompile.C = $(LIBTOOL) --mode=compile $(Compile.C) -BCCompile.C = $(LLVMGCC) $(LLVMCPPFLAGS) $(CompileCommonOpts) $(LLVMCFLAGS) -c -Compile.CXX = $(CXX) $(LLVMCPPFLAGS) $(CompileCommonOpts) $(LLVMCXXFLAGS) -c -LTCompile.CXX = $(LIBTOOL) --tag=CXX --mode=compile $(Compile.CXX) -BCCompile.CXX = $(LLVMGXX) $(LLVMCPPFLAGS) $(CompileCommonOpts) $(LLVMCXXFLAGS) -c -Link = $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(LLVMCPPFLAGS) \ - $(CompileCommonOpts) $(LLVMLDFLAGS) $(STRIP) -Relink = $(LIBTOOL) --tag=CXX --mode=link $(CXX) $(LLVMCPPFLAGS) \ +Compile.C = $(CC) $(CPP.Flags) $(CompileCommonOpts) -c $(C.Flags) +LTCompile.C = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.C) +BCCompile.C = $(LLVMGCC) $(CPP.Flags) $(CompileCommonOpts) $(C.Flags) -c +Compile.CXX = $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -c +LTCompile.CXX = $(LIBTOOL) $(LibTool.Flags) --mode=compile $(Compile.CXX) +BCCompile.CXX = $(LLVMGXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) -c +Link = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \ + $(CompileCommonOpts) $(LD.Flags) $(Strip) +Relink = $(LIBTOOL) $(LibTool.Flags) --mode=link $(CXX) $(CPP.Flags) \ $(CompileCommonOpts) BCLinkLib = $(LLVMGCC) -shared -nostdlib +LTInstall = $(LIBTOOL) $(LibTool.Flags) --mode=install $(INSTALL) Burg = $(BURG) -I $(BUILD_SRC_DIR) TableGen = $(TBLGEN) -I $(BUILD_SRC_DIR) -Archive = $(AR) $(LLVMARFLAGS) +Archive = $(AR) $(AR.Flags) ifdef RANLIB Ranlib = $(RANLIB) else @@ -262,23 +282,24 @@ # Get the list of source files #---------------------------------------------------------- ifndef SOURCES -SOURCES := $(notdir $(wildcard $(BUILD_SRC_DIR)/*.cpp \ - $(BUILD_SRC_DIR)/*.cc $(BUILD_SRC_DIR)/*.c $(BUILD_SRC_DIR)/*.y \ - $(BUILD_SRC_DIR)/*.l)) + Sources := $(notdir $(wildcard $(BUILD_SRC_DIR)/*.cpp \ + $(BUILD_SRC_DIR)/*.cc $(BUILD_SRC_DIR)/*.c $(BUILD_SRC_DIR)/*.y \ + $(BUILD_SRC_DIR)/*.l)) +else + Sources := $(SOURCES) endif ifdef BUILT_SOURCES -SOURCES += $(filter %.cpp %.c %.cc %.y %.l,$(BUILT_SOURCES)) +Sources += $(filter %.cpp %.c %.cc %.y %.l,$(BUILT_SOURCES)) endif #---------------------------------------------------------- # Types of objects that can be built from sources #---------------------------------------------------------- -BASENAME_SOURCES := $(sort $(basename $(SOURCES))) -ObjectsO := $(BASENAME_SOURCES:%=$(OBJDIR)/%.o) -ObjectsLO := $(BASENAME_SOURCES:%=$(OBJDIR)/%.lo) -ObjectsBC := $(BASENAME_SOURCES:%=$(OBJDIR)/%.bc) - +BaseNameSources := $(sort $(basename $(Sources))) +ObjectsO := $(BaseNameSources:%=$(ObjDir)/%.o) +ObjectsLO := $(BaseNameSources:%=$(ObjDir)/%.lo) +ObjectsBC := $(BaseNameSources:%=$(ObjDir)/%.bc) ############################################################################### # DIRECTORIES: Handle recursive descent of directory structure @@ -290,27 +311,34 @@ #--------------------------------------------------------- $(bindir): - $(VERB) $(MKDIR) $(bindir) + $(Verb) $(MKDIR) $(bindir) $(libdir): - $(VERB) $(MKDIR) $(libdir) + $(Verb) $(MKDIR) $(libdir) $(bytecode_libdir): - $(VERB) $(MKDIR) $(bytecode_libdir) + $(Verb) $(MKDIR) $(bytecode_libdir) $(sysconfdir): - $(VERB) $(MKDIR) $(sysconfdir) + $(Verb) $(MKDIR) $(sysconfdir) +# To create other directories, as needed, and timestamp their creation +%/.dir: + $(Verb) $(MKDIR) $* > /dev/null + @$(DATE) > $@ + +.PRECIOUS: $(ObjDir)/.dir $(LibDir)/.dir $(ToolDir)/.dir $(LLVMLibDir)/.dir +.PRECIOUS: $(LLVMToolDir)/.dir #--------------------------------------------------------- # Handle the DIRS options for sequential construction #--------------------------------------------------------- -SUBDIRS := +SubDirs := ifdef DIRS -SUBDIRS += $(DIRS) -$(RECURSIVE_TARGETS):: - $(VERB) for dir in $(DIRS); do \ +SubDirs += $(DIRS) +$(RecursiveTargets):: + $(Verb) for dir in $(DIRS); do \ if [ ! -f $$dir/Makefile ]; then \ $(MKDIR) $$dir; \ cp $(BUILD_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ @@ -324,8 +352,8 @@ # after each directory is built. #--------------------------------------------------------- ifdef EXPERIMENTAL_DIRS -$(RECURSIVE_TARGETS):: - $(VERB) for dir in $(EXPERIMENTAL_DIRS); do \ +$(RecursiveTargets):: + $(Verb) for dir in $(EXPERIMENTAL_DIRS); do \ if [ ! -f $$dir/Makefile ]; then \ $(MKDIR) $$dir; \ cp $(BUILD_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ @@ -339,19 +367,20 @@ #--------------------------------------------------------- ifdef PARALLEL_DIRS -SUBDIRS += $(PARALLEL_DIRS) +SubDirs += $(PARALLEL_DIRS) + # Unfortunately, this list must be maintained if new # recursive targets are added. -all :: $(addsuffix /.makeall , $(PARALLEL_DIRS)) -clean :: $(addsuffix /.makeclean , $(PARALLEL_DIRS)) -check :: $(addsuffix /.makecheck , $(PARALLEL_DIRS)) -install :: $(addsuffix /.makeinstall , $(PARALLEL_DIRS)) +all :: $(addsuffix /.makeall ,$(PARALLEL_DIRS)) +clean :: $(addsuffix /.makeclean ,$(PARALLEL_DIRS)) +check :: $(addsuffix /.makecheck ,$(PARALLEL_DIRS)) +install :: $(addsuffix /.makeinstall ,$(PARALLEL_DIRS)) uninstall:: $(addsuffix /.makeuninstall,$(PARALLEL_DIRS)) -Parallel_Targets := $(foreach T,$(RECURSIVE_TARGETS),%/.make$(T)) +Parallel_Targets := $(foreach T,$(RecursiveTargets),%/.make$(T)) $(Parallel_Targets) : - $(VERB) if [ ! -f $(@D)/Makefile ]; then \ + $(Verb) if [ ! -f $(@D)/Makefile ]; then \ $(MKDIR) $(@D); \ cp $(BUILD_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \ fi; \ @@ -364,10 +393,10 @@ #--------------------------------------------------------- ifdef OPTIONAL_DIRS -SUBDIRS += $(OPTIONAL_DIRS) +SubDirs += $(OPTIONAL_DIRS) -$(RECURSIVE_TARGETS):: - $(VERB) for dir in $(OPTIONAL_DIRS); do \ +$(RecursiveTargets):: + $(Verb) for dir in $(OPTIONAL_DIRS); do \ if [ -d $(BUILD_SRC_DIR)/$$dir ]; then\ if [ ! -f $$dir/Makefile ]; then \ $(MKDIR) $$dir; \ @@ -384,14 +413,14 @@ ifdef CONFIG_FILES install-local:: $(sysconfdir) $(CONFIG_FILES) - $(VERB)$(ECHO) Installing Configuration Files To $(sysconfdir) - $(VERB)for file in $(CONFIG_FILES); do \ + $(Echo) Installing Configuration Files To $(sysconfdir) + $(Verb)for file in $(CONFIG_FILES); do \ $(INSTALL) $(BUILD_SRC_DIR)/$${file} $(sysconfdir) ; \ done uninstall-local:: - $(VERB)$(ECHO) Uninstalling Configuration Files From $(sysconfdir) - $(VERB)for file in $(CONFIG_FILES); do \ + $(Echo) Uninstalling Configuration Files From $(sysconfdir) + $(Verb)for file in $(CONFIG_FILES); do \ $(RM) -f $(sysconfdir)/$${file} ; \ done @@ -407,10 +436,10 @@ # Make sure there isn't any extranous whitespace on the LIBRARYNAME option LIBRARYNAME := $(strip $(LIBRARYNAME)) -LIBNAME_LA := $(LIBDIR)/lib$(LIBRARYNAME).la -LIBNAME_A := $(LIBDIR)/lib$(LIBRARYNAME).a -LIBNAME_O := $(LIBDIR)/$(LIBRARYNAME).o -LIBNAME_BC := $(LIBDIR)/lib$(LIBRARYNAME).bc +LibName.LA := $(LibDir)/lib$(LIBRARYNAME).la +LibName.A := $(LibDir)/lib$(LIBRARYNAME).a +LibName.O := $(LibDir)/$(LIBRARYNAME).o +LibName.BC := $(LibDir)/lib$(LIBRARYNAME).bc #--------------------------------------------------------- # Shared Library Targets: @@ -420,30 +449,30 @@ #--------------------------------------------------------- ifdef SHARED_LIBRARY -all-local:: $(LIBNAME_LA) +all-local:: $(LibName.LA) -$(LIBNAME_LA): $(BUILT_SOURCES) $(ObjectsLO) $(LIBDIR)/.dir - @$(ECHO) Linking $(CONFIGURATION) Shared Library $(notdir $@) - $(VERB) $(Link) -o $@ $(ObjectsLO) - $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $@ $(LIBDIR) +$(LibName.LA): $(BUILT_SOURCES) $(ObjectsLO) $(LibDir)/.dir + $(Echo) Linking $(Configuration) Shared Library $(notdir $@) + $(Verb) $(Link) -o $@ $(ObjectsLO) + $(Verb) $(LTInstall) $@ $(LibDir) clean-local:: -ifneq ($(strip $(LIBNAME_LA)),) - $(VERB) $(RM) -f $(LIBNAME_LA) +ifneq ($(strip $(LibName.LA)),) + $(Verb) $(RM) -f $(LibName.LA) endif DestSharedLib = $(libdir)/lib$(LIBRARYNAME)$(SHLIBEXT) install-local:: $(DestSharedLib) -$(DestSharedLib): $(libdir) $(LIBNAME_LA) - @$(ECHO) Installing $(CONFIGURATION) Shared Library $(DestSharedLib) - $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $(LIBNAME_LA) $(DestSharedLib) - $(VERB) $(LIBTOOL) --finish $(libdir) +$(DestSharedLib): $(libdir) $(LibName.LA) + $(Echo) Installing $(Configuration) Shared Library $(DestSharedLib) + $(Verb) $(LTInstall) $(LibName.LA) $(DestSharedLib) + $(Verb) $(LIBTOOL) --finish $(libdir) uninstall-local:: - @$(ECHO) Uninstalling $(CONFIGURATION) Shared Library $(DestSharedLib) - $(VERB) $(RM) -f $(DestSharedLib) + $(Echo) Uninstalling $(Configuration) Shared Library $(DestSharedLib) + $(Verb) $(RM) -f $(DestSharedLib) endif @@ -465,85 +494,95 @@ endif endif -all-local:: $(LIBNAME_BC) +all-local:: $(LibName.BC) -$(LIBNAME_BC): $(BUILT_SOURCES) $(ObjectsBC) $(LIBDIR)/.dir - @$(ECHO) Linking $(CONFIGURATION) Bytecode Library $(notdir $@) - $(VERB) $(BCLinkLib) -o $@ $(ObjectsBC) +$(LibName.BC): $(BUILT_SOURCES) $(ObjectsBC) $(LibDir)/.dir + $(Echo) Linking $(Configuration) Bytecode Library $(notdir $@) + $(Verb) $(BCLinkLib) -o $@ $(ObjectsBC) clean-local:: -ifneq ($(strip $(LIBNAME_BC)),) - $(VERB) $(RM) -f $(LIBNAME_BC) +ifneq ($(strip $(LibName.BC)),) + $(Verb) $(RM) -f $(LibName.BC) endif DestBytecodeLib = $(bytecode_libdir)/lib$(LIBRARYNAME).bc install-local:: $(DestBytecodeLib) -$(DestBytecodeLib): $(bytecode_libdir) $(LIBNAME_BC) - @$(ECHO) Installing $(CONFIGURATION) Bytecode Library $(DestBytecodeLib) - $(VERB) $(INSTALL) $(LIBNAME_BC) $@ +$(DestBytecodeLib): $(bytecode_libdir) $(LibName.BC) + $(Echo) Installing $(Configuration) Bytecode Library $(DestBytecodeLib) + $(Verb) $(INSTALL) $(LibName.BC) $@ uninstall-local:: - @$(ECHO) Uninstalling $(CONFIGURATION) Bytecode Library $(DestBytecodeLib) - $(VERB) $(RM) -f $(DestBytecodeLib) + $(Echo) Uninstalling $(Configuration) Bytecode Library $(DestBytecodeLib) + $(Verb) $(RM) -f $(DestBytecodeLib) endif -# Does the library want a .o version built? +#--------------------------------------------------------- +# ReLinked Library Targets: +# If the user didn't explicitly forbid building a +# relinked then we provide targets for building them. +#--------------------------------------------------------- ifndef DONT_BUILD_RELINKED -all-local:: $(LIBNAME_O) -$(LIBNAME_O): $(BUILT_SOURCES) $(ObjectsO) $(LIBDIR)/.dir - @$(ECHO) Linking $(CONFIGURATION) Object Library $(notdir $@) - $(VERB) $(Relink) -o $@ $(ObjectsO) +all-local:: $(LibName.O) + +$(LibName.O): $(BUILT_SOURCES) $(ObjectsO) $(LibDir)/.dir + $(Echo) Linking $(Configuration) Object Library $(notdir $@) + $(Verb) $(Relink) -o $@ $(ObjectsO) clean-local:: -ifneq ($(strip $(LIBNAME_O)),) - $(VERB) $(RM) -f $(LIBNAME_O) +ifneq ($(strip $(LibName.O)),) + $(Verb) $(RM) -f $(LibName.O) endif DestRelinkedLib = $(libdir)/$(LIBRARYNAME).o install-local:: $(DestRelinkedLib) -$(DestRelinkedLib): $(libdir) $(LIBNAME_O) - @$(ECHO) Installing $(CONFIGURATION) Object Library $(DestRelinkedLib) - $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $(LIBNAME_O) $(DestRelinkedLib) +$(DestRelinkedLib): $(libdir) $(LibName.O) + $(Echo) Installing $(Configuration) Object Library $(DestRelinkedLib) + $(Verb) $(LTInstall) $(LibName.O) $(DestRelinkedLib) uninstall-local:: - @$(ECHO) Uninstalling $(CONFIGURATION) Object Library $(DestRelinkedLib) - $(VERB) $(RM) -f $(DestRelinkedLib) + $(Echo) Uninstalling $(Configuration) Object Library $(DestRelinkedLib) + $(Verb) $(RM) -f $(DestRelinkedLib) endif -# Does the library want an archive version built? +#--------------------------------------------------------- +# Archive Library Targets: +# If the user wanted a regular archive library built, +# then we provide targets for building them. +#--------------------------------------------------------- ifdef BUILD_ARCHIVE -all-local:: $(LIBNAME_A) -$(LIBNAME_A): $(BUILT_SOURCES) $(ObjectsO) $(LIBDIR)/.dir - @$(ECHO) Building $(CONFIGURATION) Archive Library $(notdir $@) - $(VERB)$(RM) -f $@ - $(VERB) $(Archive) $@ $(ObjectsO) - $(VERB) $(Ranlib) $@ +all-local:: $(LibName.A) + +$(LibName.A): $(BUILT_SOURCES) $(ObjectsO) $(LibDir)/.dir + $(Echo) Building $(Configuration) Archive Library $(notdir $@) + $(Verb)$(RM) -f $@ + $(Verb) $(Archive) $@ $(ObjectsO) + $(Verb) $(Ranlib) $@ clean-local:: -ifneq ($(strip $(LIBNAME_A)),) - $(VERB) $(RM) -f $(LIBNAME_A) +ifneq ($(strip $(LibName.A)),) + $(Verb) $(RM) -f $(LibName.A) endif DestArchiveLib := $(libdir)/lib$(LIBRARYNAME).a install-local:: $(DestArchiveLib) -$(DestArchiveLib): $(libdir) $(LIBNAME_A) - @$(ECHO) Installing $(CONFIGURATION) Archive Library $(DestArchiveLib) - $(VERB) $(MKDIR) $(libdir) - $(VERB) $(LIBTOOL) --mode=install $(INSTALL) $(LIBNAME_A) $(DestArchiveLib) +$(DestArchiveLib): $(libdir) $(LibName.A) + $(Echo) Installing $(Configuration) Archive Library $(DestArchiveLib) + $(Verb) $(MKDIR) $(libdir) + $(Verb) $(LTInstall) $(LibName.A) $(DestArchiveLib) uninstall-local:: - @$(ECHO) Uninstalling $(CONFIGURATION) Archive Library $(DestArchiveLib) - $(VERB) $(RM) -f $(DestArchiveLib) + $(Echo) Uninstalling $(Configuration) Archive Library $(DestArchiveLib) + $(Verb) $(RM) -f $(DestArchiveLib) endif @@ -556,238 +595,284 @@ ifdef TOOLNAME -# TOOLEXENAME - This is the output filenames to generate -TOOLEXENAME := $(TOOLDIR)/$(TOOLNAME) - -# LIBS_OPTIONS - Compute the options lines that add -llib1 -llib2, etc. -PROJ_LIBS_OPTIONS := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS))) -PROJ_LIBS_OPTIONS := $(patsubst %.o, $(LIBDIR)/%.o, $(PROJ_LIBS_OPTIONS)) -LLVM_LIBS_OPTIONS := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS))) -LLVM_LIBS_OPTIONS := $(patsubst %.o, $(LLVMLIBDIR)/%.o, $(LLVM_LIBS_OPTIONS)) - -# USED_LIBS/LIBS_PATHS - Compute dependent library file paths -PROJ_USED_LIBS := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS))) -LLVM_USED_LIBS := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS))) -PROJ_LIBS_PATHS := $(addprefix $(LIBDIR)/,$(PROJ_USED_LIBS)) -LLVM_LIBS_PATHS := $(addprefix $(LLVMLIBDIR)/,$(LLVM_USED_LIBS)) +#--------------------------------------------------------- +# Set up variables for building a tool. +#--------------------------------------------------------- +ToolBuildPath := $(ToolDir)/$(TOOLNAME)$(EXEEXT) +ProjLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS))) +ProjLibsOptions := $(patsubst %.o, $(LibDir)/%.o, $(ProjLibsOptions)) +LLVMLibsOptions := $(patsubst %.a.o, -l%, $(addsuffix .o, $(LLVMLIBS))) +LLVMLibsOptions := $(patsubst %.o, $(LLVMLibDir)/%.o, $(LLVMLibsOptions)) +ProjUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS))) +LLVMUsedLibs := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(LLVMLIBS))) +ProjLibsPaths := $(addprefix $(LibDir)/,$(ProjUsedLibs)) +LLVMLibsPaths := $(addprefix $(LLVMLibDir)/,$(LLVMUsedLibs)) -# Handle compression libraries automatically +#--------------------------------------------------------- +# Handle optional compression libraries automatically +#--------------------------------------------------------- +ExtraLibs := $(LIBS) ifeq ($(HAVE_BZIP2),1) -LIBS += -lbz2 +ExtraLibs += -lbz2 endif ifeq ($(HAVE_ZLIB),1) -LIBS += -lz +ExtraLibs += -lz endif -# Tell make that we need to rebuild subdirectories before we can link the tool. -# This affects things like LLI which has library subdirectories. -$(TOOLEXENAME): $(addsuffix /.makeall, $(PARALLEL_DIRS)) +#--------------------------------------------------------- +# Tell make that we need to rebuild subdirectories before +# we can link the tool. This affects things like LLI which +# has library subdirectories. +#--------------------------------------------------------- +$(ToolBuildPath): $(addsuffix /.makeall, $(PARALLEL_DIRS)) -all-local:: $(TOOLEXENAME) +#--------------------------------------------------------- +# Provide targets for building the tools +#--------------------------------------------------------- +all-local:: $(ToolBuildPath) clean-local:: -ifneq ($(strip $(TOOLEXENAME)),) - $(VERB) $(RM) -f $(TOOLEXENAME) +ifneq ($(strip $(ToolBuildPath)),) + $(Verb) $(RM) -f $(ToolBuildPath) endif -$(TOOLEXENAME): $(BUILT_SOURCES) $(ObjectsO) $(PROJ_LIBS_PATHS) $(LLVM_LIBS_PATHS) $(TOOLDIR)/.dir - @$(ECHO) Linking $(CONFIGURATION) executable $(TOOLNAME) $(STRIP_WARN_MSG) - $(VERB) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(PROJ_LIBS_OPTIONS) \ - $(LLVM_LIBS_OPTIONS) $(LIBS) $(TOOLLINKOPTSB) - @$(ECHO) ======= Finished Linking $(CONFIGURATION) Executable $(TOOLNAME) $(STRIP_WARN_MSG) +$(ToolBuildPath): $(BUILT_SOURCES) $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)\ + $(ToolDir)/.dir + $(Echo) Linking $(Configuration) executable $(TOOLNAME) $(StripWarnMsg) + $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \ + $(LLVMLibsOptions) $(ExtraLibs) $(TOOLLINKOPTSB) + $(Echo) ======= Finished Linking $(Configuration) Executable $(TOOLNAME) $(StripWarnMsg) DestTool = $(bindir)/$(TOOLNAME) install-local:: $(DestTool) -$(DestTool): $(bindir) $(TOOLEXENAME) - @$(ECHO) Installing $(CONFIGURATION) $(DestTool) - $(VERB) $(INSTALL) $(TOOLEXENAME) $(DestTool) +$(DestTool): $(bindir) $(ToolBuildPath) + $(Echo) Installing $(Configuration) $(DestTool) + $(Verb) $(INSTALL) $(ToolBuildPath) $(DestTool) uninstall-local:: - @$(ECHO) Uninstalling $(CONFIGURATION) $(DestTool) - $(VERB) $(RM) -f $(DestTool) + $(Echo) Uninstalling $(Configuration) $(DestTool) + $(Verb) $(RM) -f $(DestTool) endif +############################################################################### +# Object Build Rules: Build object files based on sources +############################################################################### + +# Provide rule sets for when dependency generation is enabled ifndef DISABLE_AUTO_DEPENDENCIES -# Create .lo files in the OBJDIR directory from the .cpp and .c files... +#--------------------------------------------------------- +# Create .lo files in the ObjDir directory from the .cpp and .c files... +#--------------------------------------------------------- ifdef SHARED_LIBRARY -$(OBJDIR)/%.lo $(OBJDIR)/%.o: %.cpp $(OBJDIR)/.dir - @$(ECHO) "Compiling $*.cpp (PIC)" - $(VERB) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(OBJDIR)/$*.LACXXd $< -o $@ ; \ - then $(MV) -f "$(OBJDIR)/$*.LACXXd" "$(OBJDIR)/$*.d"; \ - else $(RM) -f "$(OBJDIR)/$*.LACXXd"; exit 1; fi - -$(OBJDIR)/%.lo $(OBJDIR)/%.o: %.c $(OBJDIR)/.dir - @$(ECHO) "Compiling $*.c (PIC)" - $(VERB) if $(LTCompile.C) -MD -MT $@ -MP -MF $(OBJDIR)/$*.LACd $< -o $@ ; \ - then $(MV) -f "$(OBJDIR)/$*.LACd" "$(OBJDIR)/$*.d"; \ - else $(RM) -f "$(OBJDIR)/$*.LACd"; exit 1; fi +$(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir + $(Echo) "Compiling $*.cpp (PIC)" + $(Verb) if $(LTCompile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACXXd $< -o $@ ; \ + then $(MV) -f "$(ObjDir)/$*.LACXXd" "$(ObjDir)/$*.d"; \ + else $(RM) -f "$(ObjDir)/$*.LACXXd"; exit 1; fi + +$(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir + $(Echo) "Compiling $*.c (PIC)" + $(Verb) if $(LTCompile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.LACd $< -o $@ ; \ + then $(MV) -f "$(ObjDir)/$*.LACd" "$(ObjDir)/$*.d"; \ + else $(RM) -f "$(ObjDir)/$*.LACd"; exit 1; fi +#--------------------------------------------------------- +# Create .o files in the ObjDir directory from the .cpp and .c files... +#--------------------------------------------------------- else -$(OBJDIR)/%.o: %.cpp $(OBJDIR)/.dir - @$(ECHO) "Compiling $*.cpp" - $(VERB) if $(Compile.CXX) -MD -MT $@ -MP -MF $(OBJDIR)/$*.CXXd $< -o $@ ; \ - then $(MV) -f "$(OBJDIR)/$*.CXXd" "$(OBJDIR)/$*.d"; \ - else $(RM) -f "$(OBJDIR)/$*.CXXd"; exit 1; fi - -$(OBJDIR)/%.o: %.c $(OBJDIR)/.dir - @$(ECHO) "Compiling $*.c" - $(VERB) if $(Compile.C) -MD -MT $@ -MP -MF $(OBJDIR)/$*.Cd $< -o $@ ; \ - then $(MV) -f "$(OBJDIR)/$*.Cd" "$(OBJDIR)/$*.d"; \ - else $(RM) -f "$(OBJDIR)/$*.Cd"; exit 1; fi +$(ObjDir)/%.o: %.cpp $(ObjDir)/.dir + $(Echo) "Compiling $*.cpp" + $(Verb) if $(Compile.CXX) -MD -MT $@ -MP -MF $(ObjDir)/$*.CXXd $< -o $@ ; \ + then $(MV) -f "$(ObjDir)/$*.CXXd" "$(ObjDir)/$*.d"; \ + else $(RM) -f "$(ObjDir)/$*.CXXd"; exit 1; fi + +$(ObjDir)/%.o: %.c $(ObjDir)/.dir + $(Echo) "Compiling $*.c" + $(Verb) if $(Compile.C) -MD -MT $@ -MP -MF $(ObjDir)/$*.Cd $< -o $@ ; \ + then $(MV) -f "$(ObjDir)/$*.Cd" "$(ObjDir)/$*.d"; \ + else $(RM) -f "$(ObjDir)/$*.Cd"; exit 1; fi endif -# Create .bc files in the OBJDIR directory from .cpp and .c files... -$(OBJDIR)/%.bc: %.cpp $(OBJDIR)/.dir - @$(ECHO) "Compiling $*.cpp (bytecode)" - $(VERB) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(OBJDIR)/$*.BCCXXd" $< -o $@ ; \ - then $(MV) -f "$(OBJDIR)/$*.BCCXXd" "$(OBJDIR)/$*.d"; \ - else $(RM) -f "$(OBJDIR)/$*.BCCXXd"; exit 1; fi - -$(OBJDIR)/%.bc: %.c $(OBJDIR)/.dir - @$(ECHO) "Compiling $*.c (bytecode)" - $(VERB) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(OBJDIR)/$*.BCCd" $< -o $@ ; \ - then $(MV) -f "$(OBJDIR)/$*.BCCd" "$(OBJDIR)/$*.d"; \ - else $(RM) -f "$(OBJDIR)/$*.BCCd"; exit 1; fi +#--------------------------------------------------------- +# Create .bc files in the ObjDir directory from .cpp and .c files... +#--------------------------------------------------------- +$(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir + $(Echo) "Compiling $*.cpp (bytecode)" + $(Verb) if $(BCCompile.CXX) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCXXd" $< -o $@ ; \ + then $(MV) -f "$(ObjDir)/$*.BCCXXd" "$(ObjDir)/$*.d"; \ + else $(RM) -f "$(ObjDir)/$*.BCCXXd"; exit 1; fi + +$(ObjDir)/%.bc: %.c $(ObjDir)/.dir + $(Echo) "Compiling $*.c (bytecode)" + $(Verb) if $(BCCompile.C) -MD -MT $@ -MP -MF "$(ObjDir)/$*.BCCd" $< -o $@ ; \ + then $(MV) -f "$(ObjDir)/$*.BCCd" "$(ObjDir)/$*.d"; \ + else $(RM) -f "$(ObjDir)/$*.BCCd"; exit 1; fi +# Provide alternate rule sets if dependencies are disabled else ifdef SHARED_LIBRARY -$(OBJDIR)/%.lo $(OBJDIR)/%.o: %.cpp $(OBJDIR)/.dir - @$(ECHO) "Compiling $*.cpp (PIC)" +$(ObjDir)/%.lo $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir + $(Echo) "Compiling $*.cpp (PIC)" $(LTCompile.CXX) $< -o $@ -$(OBJDIR)/%.lo $(OBJDIR)/%.o: %.c $(OBJDIR)/.dir - @$(ECHO) "Compiling $*.cpp (PIC)" +$(ObjDir)/%.lo $(ObjDir)/%.o: %.c $(ObjDir)/.dir + $(Echo) "Compiling $*.cpp (PIC)" $(LTCompile.C) $< -o $@ else -$(OBJDIR)/%.o: %.cpp $(OBJDIR)/.dir - @$(ECHO) "Compiling $*.cpp" +$(ObjDir)/%.o: %.cpp $(ObjDir)/.dir + $(Echo) "Compiling $*.cpp" $(Compile.CXX) $< -o $@ -$(OBJDIR)/%.o: %.c $(OBJDIR)/.dir - @$(ECHO) "Compiling $*.cpp" +$(ObjDir)/%.o: %.c $(ObjDir)/.dir + $(Echo) "Compiling $*.cpp" $(Compile.C) $< -o $@ endif -# Create .bc files in the OBJDIR directory from .cpp and .c files... -$(OBJDIR)/%.bc: %.cpp $(OBJDIR)/.dir - @$(ECHO) "Compiling $*.cpp (bytecode)" +$(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir + $(Echo) "Compiling $*.cpp (bytecode)" $(BCCompileCPP) $< -o $@ -$(OBJDIR)/%.bc: %.c $(OBJDIR)/.dir - @$(ECHO) "Compiling $*.c (bytecode)" +$(ObjDir)/%.bc: %.c $(ObjDir)/.dir + $(Echo) "Compiling $*.c (bytecode)" $(BCCompileC) $< -o $@ endif -$(OBJDIR)/%.bc: %.ll $(OBJDIR)/.dir $(LLVMAS) - @$(ECHO) "Compiling $*.ll" - $(VERB) $(LLVMAS) $< -f -o $@ +#--------------------------------------------------------- +# Provide rule to build .bc files from .ll sources, +# regardless of dependencies +#--------------------------------------------------------- +$(ObjDir)/%.bc: %.ll $(ObjDir)/.dir $(LLVMAS) + $(Echo) "Compiling $*.ll" + $(Verb) $(LLVMAS) $< -f -o $@ + +############################################################################### +# TABLEGEN: Provide rules for running tblgen to produce *.inc files +############################################################################### ifdef TARGET -TDFILES := $(strip $(wildcard $(BUILD_SRC_DIR)/*.td) $(LLVM_SRC_ROOT)/lib/Target/Target.td) -INCFILES := $(filter %.inc,$(BUILT_SOURCES)) +TDFiles := $(strip $(wildcard $(BUILD_SRC_DIR)/*.td) $(LLVM_SRC_ROOT)/lib/Target/Target.td) +INCFiles := $(filter %.inc,$(BUILT_SOURCES)) -$(INCFILES) : $(TBLGEN) $(TDFILES) +$(INCFiles) : $(TBLGEN) $(TDFiles) %GenRegisterNames.inc : %.td - @$(ECHO) "Building $( $@ +endif + +#--------------------------------------------------------- +# Provide rules for generating a .cpp and .h source files +# from yacc (bison) input sources. +#--------------------------------------------------------- + +YaccOutput := $(strip $(addprefix $(subst %.y,%,$(filter %.y,$(Sources))),\ + .h .cpp .output)) + +ifneq ($(YaccOutput),) + +.PRECIOUS: $(YaccOutput) + +# Cancel built-in rules for yacc +%.c: %.y +%.cpp: %.y +%.h: %.y + # Rule for building the bison parsers... -%.c: %.y # Cancel built-in rules for yacc -%.cpp: %.y # Cancel built-in rules for yacc -%.h: %.y # Cancel built-in rules for yacc %.cpp %.h : %.y - @$(ECHO) "Bisoning $*.y" - $(VERB) $(BISON) -v -d -p $( /dev/null - @$(DATE) > $@ +endif -.PRECIOUS: $(OBJDIR)/.dir $(LIBDIR)/.dir $(TOOLDIR)/.dir $(LLVMLIBDIR)/.dir -.PRECIOUS: $(LLVMTOOLDIR)/.dir +############################################################################### +# OTHER RULES: Other rules needed +############################################################################### # To create postscript files from dot files... ifneq ($(DOT),false) @@ -795,56 +880,60 @@ $(DOT) -Tps < $< > $@ else %.ps: %.dot - $(ECHO) "Cannot build $@: The program dot is not installed" + $(Echo) "Cannot build $@: The program dot is not installed" endif -# # This rules ensures that header files that are removed still have a rule for # which they can be "generated." This allows make to ignore them and # reproduce the dependency lists. -# %.h:: ; -# 'make clean' nukes the tree +# Define clean-local to clean the current directory. Note that this uses a +# very conservative approach ensuring that empty variables do not cause +# errors or disastrous removal. clean-local:: -ifneq ($(strip $(OBJDIR)),) - $(VERB) $(RM) -rf $(OBJDIR) +ifneq ($(strip $(ObjDir)),) + $(Verb) $(RM) -rf $(ObjDir) endif - $(VERB) $(RM) -f core core.[0-9][0-9]* *.o *.d *~ *.flc + $(Verb) $(RM) -f core core.[0-9][0-9]* *.o *.d *~ *.flc ifneq ($(strip $(SHLIBEXT)),) # Extra paranoia - make real sure SHLIBEXT is set - $(VERB) $(RM) -f *$(SHLIBEXT) + $(Verb) $(RM) -f *$(SHLIBEXT) endif -ifneq ($(strip $(LEX_OUTPUT)),) - $(VERB) $(RM) -f $(LEX_OUTPUT) +ifneq ($(strip $(LexOutput)),) + $(Verb) $(RM) -f $(LexOutput) endif -ifneq ($(strip $(YACC_OUTPUT)),) - $(VERB) $(RM) -f $(YACC_OUTPUT) +ifneq ($(strip $(YaccOutput)),) + $(Verb) $(RM) -f $(YaccOutput) endif +# Build tags database for Emacs/Xemacs: +tags:: TAGS +TAGS: + find include lib tools examples -name '*.cpp' -o -name '*.h' | \ + $(ETAGS) $(ETAGSFLAGS) - + ############################################################################### # DEPENDENCIES: Include the dependency files if we should ############################################################################### ifndef DISABLE_AUTO_DEPENDENCIES # If its not one of the cleaning targets -ifneq ($strip($(filter-out clean clean-local dist-clean, $(MAKECMDGOALS))),) +ifneq ($strip($(filter-out clean clean-local dist-clean,$(MAKECMDGOALS))),) # Get the list of dependency files -DependFiles := $(basename $(filter %.cpp %.c %.cc, $(SOURCES))) -DependFiles := $(patsubst %,$(BUILD_OBJ_DIR)/$(CONFIGURATION)/%.d,$(DependFiles)) +DependFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources))) +DependFiles := $(patsubst %,$(BUILD_OBJ_DIR)/$(Configuration)/%.d,$(DependFiles)) -include /dev/null $(DependFiles) endif -endif # ifndef DISABLE_AUTO_DEPENDENCIES +endif ############################################################################### -# Handle construction of a distribution tarball +# DISTRIBUTION: Handle construction of a distribution tarball ############################################################################### -.PHONY: dist dist-chck dist-clean distdir dist-gzip dist-bzip2 dist-zip - #------------------------------------------------------------------------ # Define distribution related variables #------------------------------------------------------------------------ @@ -863,22 +952,22 @@ $(BUILD_SRC_DIR)/*.def \ $(BUILD_SRC_DIR)/*.ll \ $(BUILD_SRC_DIR)/*.in)) -DistSources := $(SOURCES) $(EXTRA_DIST) -DistSubDirs := $(SUBDIRS) +DistSources := $(Sources) $(EXTRA_DIST) +DistSubDirs := $(SubDirs) DistFiles := $(DistAlways) $(DistSources) $(DistOther) - #------------------------------------------------------------------------ # We MUST build distribution with OBJ_DIR != SRC_DIR #------------------------------------------------------------------------ ifeq ($(BUILD_SRC_DIR),$(BUILD_OBJ_DIR)) dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip :: - @$(ECHO) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR + $(Echo) ERROR: Target $@ only available with OBJ_DIR != SRC_DIR DistCheckTop := else DistCheckTop := check + #------------------------------------------------------------------------ # Prevent catastrophic remove #------------------------------------------------------------------------ @@ -892,7 +981,7 @@ ifneq ($(LEVEL),.) dist dist-check dist-clean dist-gzip dist-bzip2 dist-zip :: - @$(ECHO) ERROR: You must run $@ from $(BUILD_OBJ_ROOT) + $(Echo) ERROR: You must run $@ from $(BUILD_OBJ_ROOT) else @@ -900,37 +989,37 @@ # Provide the top level targets #------------------------------------------------------------------------ -dist-gzip: $(DistTarGZip) +dist-gzip:: $(DistTarGZip) $(DistTarGZip) : distdir - @$(ECHO) Packing gzipped distribution tar file. - $(VERB) cd $(BUILD_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | gzip -c > "$(DistTarGZip)" + $(Echo) Packing gzipped distribution tar file. + $(Verb) cd $(BUILD_OBJ_ROOT) ; $(TAR) chf - "$(DistName)" | gzip -c > "$(DistTarGZip)" -dist-bzip2: $(DistTarBZ2) +dist-bzip2:: $(DistTarBZ2) $(DistTarBZ2) : distdir - @$(ECHO) Packing bzipped distribution tar file. - $(VERB) cd $(BUILD_OBJ_ROOT) ; $(TAR) chf - $(DistName) | $(BZIP2) -c >$(DistTarBZ2) + $(Echo) Packing bzipped distribution tar file. + $(Verb) cd $(BUILD_OBJ_ROOT) ; $(TAR) chf - $(DistName) | $(BZIP2) -c >$(DistTarBZ2) -dist-zip: $(DistZip) +dist-zip:: $(DistZip) $(DistZip) : distdir - @$(ECHO) Packing zipped distribution file. - $(VERB) rm -f $(DistZip) - $(VERB) cd $(BUILD_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName) + $(Echo) Packing zipped distribution file. + $(Verb) rm -f $(DistZip) + $(Verb) cd $(BUILD_OBJ_ROOT) ; $(ZIP) -rq $(DistZip) $(DistName) dist :: $(DistTarGZip) $(DistTarBZ2) $(DistZip) - @$(ECHO) ===== DISTRIBUTION PACKAGING SUCESSFUL ===== + $(Echo) ===== DISTRIBUTION PACKAGING SUCESSFUL ===== DistCheckDir := $(LLVM_OBJ_ROOT)/_distcheckdir dist-check:: $(DistCheckTop) $(DistTarGZip) - @$(ECHO) Checking distribution tar file. - $(VERB) if test -d $(DistCheckDir) ; then \ + $(Echo) Checking distribution tar file. + $(Verb) if test -d $(DistCheckDir) ; then \ $(RM) -rf $(DistCheckDir) ; \ fi - $(VERB) $(MKDIR) $(DistCheckDir) - $(VERB) cd $(DistCheckDir) && \ + $(Verb) $(MKDIR) $(DistCheckDir) + $(Verb) cd $(DistCheckDir) && \ $(MKDIR) $(DistCheckDir)/build && \ $(MKDIR) $(DistCheckDir)/install && \ gunzip -c $(DistTarGZip) | $(TAR) xf - && \ @@ -943,11 +1032,11 @@ $(MAKE) dist && \ $(MAKE) clean && \ $(MAKE) dist-clean && \ - $(ECHO) ===== $(DistTarGZip) Ready For Distribution ===== + $(EchoCmd) ===== $(DistTarGZip) Ready For Distribution ===== dist-clean:: - @$(ECHO) Cleaning distribution files - $(VERB) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) $(DistCheckDir) + $(Echo) Cleaning distribution files + $(Verb) $(RM) -rf $(DistTarGZip) $(DistTarBZ2) $(DistZip) $(DistName) $(DistCheckDir) endif @@ -955,17 +1044,17 @@ # Provide the recursive distdir target for building the distribution directory #------------------------------------------------------------------------ distdir : $(DistSources) - @$(ECHO) Building Distribution Directory $(DistDir) - $(VERB) if test "$(DistDir)" = "$(TopDistDir)" ; then \ + $(Echo) Building Distribution Directory $(DistDir) + $(Verb) if test "$(DistDir)" = "$(TopDistDir)" ; then \ if test -d "$(DistDir)" ; then \ find $(DistDir) -type d ! -perm -200 -exec chmod u+w {} ';' || \ exit 1 ; \ fi ; \ - $(ECHO) Removing $(DistDir) ; \ + $(EchoCmd) Removing $(DistDir) ; \ $(RM) -rf $(DistDir); \ fi - $(VERB) $(MKDIR) $(DistDir) - $(VERB) srcdirstrip=`echo "$(BUILD_SRC_DIR)" | sed 's|.|.|g'`; \ + $(Verb) $(MKDIR) $(DistDir) + $(Verb) srcdirstrip=`echo "$(BUILD_SRC_DIR)" | sed 's|.|.|g'`; \ srcrootstrip=`echo "$(BUILD_SRC_ROOT)" | sed 's|.|.|g'`; \ for file in $(DistFiles) ; do \ case "$$file" in \ @@ -999,28 +1088,29 @@ elif test -L "$$from_dir/$$file" ; then \ cp -pd "$$from_dir/$$file" $(DistDir)/$$file || exit 1; \ elif echo "$(DistAlways)" | grep -v "$$file" >/dev/null ; then \ - $(ECHO) "===== WARNING: Distribution Source $$from_dir/$$file Not Found!" ; \ - elif test "$(VERB)" != '@' ; then \ - $(ECHO) "Skipping non-existent $$from_dir/$$file" ; \ + $(EchoCmd) "===== WARNING: Distribution Source $$from_dir/$$file Not Found!" ; \ + elif test "$(Verb)" != '@' ; then \ + $(EchoCmd) "Skipping non-existent $$from_dir/$$file" ; \ fi; \ done - $(VERB) for subdir in $(DistSubDirs) ; do \ + $(Verb) for subdir in $(DistSubDirs) ; do \ if test "$$subdir" \!= "." ; then \ new_distdir="$(DistDir)/$$subdir" ; \ test -d "$$new_distdir" || $(MKDIR) "$$new_distdir" || exit 1; \ ( cd $$subdir && $(MAKE) DistDir="$$new_distdir" distdir ) || exit 1; \ fi; \ done - $(VERB) $(MAKE) DistDir="$(DistDir)" dist-hook || exit 1 - -$(VERB) find $(DistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + $(Verb) $(MAKE) DistDir="$(DistDir)" dist-hook || exit 1 + -$(Verb) find $(DistDir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(INSTALL_SH) -c -m a+r {} {} \; \ || chmod -R a+r $(DistDir) +# This is invoked by distdir target, define it as a no-op to avoid errors if not +# defined by user. dist-hook:: - endif ############################################################################### @@ -1033,9 +1123,9 @@ # Install support for project's include files: #------------------------------------------------------------------------ install-local:: - @$(ECHO) Installing include files - $(VERB) $(MKDIR) $(includedir) - $(VERB) if [ -d "$(BUILD_SRC_ROOT)/include" ] ; then \ + $(Echo) Installing include files + $(Verb) $(MKDIR) $(includedir) + $(Verb) if [ -d "$(BUILD_SRC_ROOT)/include" ] ; then \ cd $(BUILD_SRC_ROOT)/include && \ find . -path '*/Internal' -prune -o '(' -type f \ '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' ')' \ @@ -1043,50 +1133,39 @@ fi uninstall-local:: - @$(ECHO) Uninstalling include files - $(VERB) if [ -d "$(BUILD_SRC_ROOT)/include" ] ; then \ + $(Echo) Uninstalling include files + $(Verb) if [ -d "$(BUILD_SRC_ROOT)/include" ] ; then \ cd $(BUILD_SRC_ROOT)/include && \ $(RM) -f `find . -path '*/Internal' -prune -o '(' -type f \ '!' '(' -name '*~' -o -name '.cvsignore' -o -name '.#*' ')' \ -print ')' | grep -v CVS | sed 's#^#$(includedir)/#'` ; \ fi -#------------------------------------------------------------------------ -# Build tags database for Emacs/Xemacs: -#------------------------------------------------------------------------ -tags:: TAGS - -TAGS: - find include lib tools examples -name '*.cpp' -o -name '*.h' | $(ETAGS) $(ETAGSFLAGS) - - endif -############################################################################### -# MISCELLANEOUS - utility targets -############################################################################### - #------------------------------------------------------------------------ # Print out the directories used for building +#------------------------------------------------------------------------ printvars:: - @$(ECHO) "CONFIGURATION : " '$(CONFIGURATION)' - @$(ECHO) "BUILD_SRC_ROOT : " '$(BUILD_SRC_ROOT)' - @$(ECHO) "BUILD_SRC_DIR : " '$(BUILD_SRC_DIR)' - @$(ECHO) "BUILD_OBJ_ROOT : " '$(BUILD_OBJ_ROOT)' - @$(ECHO) "BUILD_OBJ_DIR : " '$(BUILD_OBJ_DIR)' - @$(ECHO) "LLVM_SRC_ROOT : " '$(LLVM_SRC_ROOT)' - @$(ECHO) "LLVM_OBJ_ROOT : " '$(LLVM_OBJ_ROOT)' - @$(ECHO) "libdir : " '$(libdir)' - @$(ECHO) "bindir : " '$(bindir)' - @$(ECHO) "sysconfdir : " '$(sysconfdir)' - @$(ECHO) "bytecode_libdir: " '$(bytecode_libdir)' - @$(ECHO) "USER_TARGETS : " '$(USER_TARGETS)' - @$(ECHO) "OBJMKFILES : " '$(OBJMKFILES)' - @$(ECHO) "SRCMKFILES : " '$(SRCMKFILES)' - @$(ECHO) "OBJDIR : " '$(OBJDIR)' - @$(ECHO) "LIBDIR : " '$(LIBDIR)' - @$(ECHO) "TOOLDIR : " '$(TOOLDIR)' - @$(ECHO) "TDFILES : " '$(TDFILES)' - @$(ECHO) "Compile.CXX : " '$(Compile.CXX)' - @$(ECHO) "Compile.C : " '$(Compile.C)' - @$(ECHO) "Archive : " '$(Archive)' - + $(Echo) "Configuration : " '$(Configuration)' + $(Echo) "BUILD_SRC_ROOT : " '$(BUILD_SRC_ROOT)' + $(Echo) "BUILD_SRC_DIR : " '$(BUILD_SRC_DIR)' + $(Echo) "BUILD_OBJ_ROOT : " '$(BUILD_OBJ_ROOT)' + $(Echo) "BUILD_OBJ_DIR : " '$(BUILD_OBJ_DIR)' + $(Echo) "LLVM_SRC_ROOT : " '$(LLVM_SRC_ROOT)' + $(Echo) "LLVM_OBJ_ROOT : " '$(LLVM_OBJ_ROOT)' + $(Echo) "libdir : " '$(libdir)' + $(Echo) "bindir : " '$(bindir)' + $(Echo) "sysconfdir : " '$(sysconfdir)' + $(Echo) "bytecode_libdir: " '$(bytecode_libdir)' + $(Echo) "UserTargets : " '$(UserTargets)' + $(Echo) "ObjMakefiles : " '$(ObjMakefiles)' + $(Echo) "SrcMakefiles : " '$(SrcMakefiles)' + $(Echo) "ObjDir : " '$(ObjDir)' + $(Echo) "LibDir : " '$(LibDir)' + $(Echo) "ToolDir : " '$(ToolDir)' + $(Echo) "TDFiles : " '$(TDFiles)' + $(Echo) "INCFiles : " '$(INCFiles)' + $(Echo) "Compile.CXX : " '$(Compile.CXX)' + $(Echo) "Compile.C : " '$(Compile.C)' + $(Echo) "Archive : " '$(Archive)' From reid at x10sys.com Sat Oct 30 04:19:48 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 30 Oct 2004 04:19:48 -0500 Subject: [llvm-commits] CVS: llvm/test/Makefile Message-ID: <200410300919.EAA11399@zion.cs.uiuc.edu> Changes in directory llvm/test: Makefile updated: 1.55 -> 1.56 --- Log message: Internalize variable names to prevent recursive assignment. Cleanup docs. --- Diffs of the changes: (+1 -1) Index: llvm/test/Makefile diff -u llvm/test/Makefile:1.55 llvm/test/Makefile:1.56 --- llvm/test/Makefile:1.55 Sun Sep 5 03:18:23 2004 +++ llvm/test/Makefile Sat Oct 30 04:19:36 2004 @@ -44,7 +44,7 @@ # CONTEXT= -c "srcroot=$(LLVM_SRC_ROOT)" \ -c "buildroot=$(LLVM_OBJ_ROOT)" \ - -c "buildtype=$(CONFIGURATION)" \ + -c "buildtype=$(Configuration)" \ -c "tmpdir=$(LLVM_OBJ_ROOT)/test/tmp" \ -c "coresize=0" \ -c "cc=$(CC)" \ From reid at x10sys.com Sat Oct 30 04:19:48 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 30 Oct 2004 04:19:48 -0500 Subject: [llvm-commits] CVS: llvm/lib/Target/SparcV9/Makefile Message-ID: <200410300919.EAA11409@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/SparcV9: Makefile updated: 1.51 -> 1.52 --- Log message: Internalize variable names to prevent recursive assignment. Cleanup docs. --- Diffs of the changes: (+10 -12) Index: llvm/lib/Target/SparcV9/Makefile diff -u llvm/lib/Target/SparcV9/Makefile:1.51 llvm/lib/Target/SparcV9/Makefile:1.52 --- llvm/lib/Target/SparcV9/Makefile:1.51 Wed Oct 27 18:18:45 2004 +++ llvm/lib/Target/SparcV9/Makefile Sat Oct 30 04:19:36 2004 @@ -17,23 +17,21 @@ include $(LEVEL)/Makefile.common SparcV9.burg.in1 : $(BUILD_SRC_DIR)/SparcV9.burg.in - @$(ECHO) Pre-processing SparcV9.burg.in - $(VERB) $(CXX) -E $(CPPFLAGS) -x c++ $< | $(SED) '/^#/d' | $(SED) 's/Ydefine/#define/' > $@ + $(Echo) Pre-processing SparcV9.burg.in + $(Verb) $(CXX) -E $(CPP.Flags) -x c++ $< | $(SED) '/^#/d' | $(SED) 's/Ydefine/#define/' > $@ SparcV9.burm : SparcV9.burg.in1 - @$(ECHO) Pre-processing SparcV9.burg.in - $(VERB) $(CXX) -E $(CPPFLAGS) -x c++ $< | $(SED) '/^#/d' | $(SED) 's/^Xinclude/#include/' | $(SED) 's/^Xdefine/#define/' > $@ + $(Echo) Pre-processing SparcV9.burg.in + $(Verb) $(CXX) -E $(CPP.Flags) -x c++ $< | $(SED) '/^#/d' | $(SED) 's/^Xinclude/#include/' | $(SED) 's/^Xdefine/#define/' > $@ SparcV9.burm.cpp: SparcV9.burm - @$(ECHO) "Burging `basename $<`" - $(VERB) $(BURG) -I $< -o $@ + $(Echo) "Burging `basename $<`" + $(Verb) $(BURG) -I $< -o $@ -TABLEGEN_FILES := $(notdir $(wildcard $(BUILD_SRC_DIR)/*.td)) - -SparcV9CodeEmitter.inc: $(BUILD_SRC_DIR)/SparcV9.td $(TABLEGEN_FILES) $(TBLGEN) - @$(ECHO) "Running tblgen on SparcV9.td" - $(VERB) $(TableGen) -gen-emitter -o $@ $< +SparcV9CodeEmitter.inc: $(BUILD_SRC_DIR)/SparcV9.td $(TDFiles) $(TBLGEN) + $(Echo) "Running tblgen on SparcV9.td" + $(Verb) $(TableGen) -gen-emitter -o $@ $< clean:: - $(VERB) $(RM) -f SparcV9CodeEmitter.inc SparcV9.burg.in1 SparcV9.burm SparcV9.burm.cpp + $(Verb) $(RM) -f SparcV9CodeEmitter.inc SparcV9.burg.in1 SparcV9.burm SparcV9.burm.cpp From reid at x10sys.com Sat Oct 30 04:19:48 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 30 Oct 2004 04:19:48 -0500 Subject: [llvm-commits] CVS: llvm/utils/TableGen/Makefile Message-ID: <200410300919.EAA11410@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: Makefile updated: 1.14 -> 1.15 --- Log message: Internalize variable names to prevent recursive assignment. Cleanup docs. --- Diffs of the changes: (+2 -2) Index: llvm/utils/TableGen/Makefile diff -u llvm/utils/TableGen/Makefile:1.14 llvm/utils/TableGen/Makefile:1.15 --- llvm/utils/TableGen/Makefile:1.14 Wed Oct 27 18:18:45 2004 +++ llvm/utils/TableGen/Makefile Sat Oct 30 04:19:36 2004 @@ -20,5 +20,5 @@ FileLexer.cpp: FileParser.h clean:: - $(VERB) $(RM) -f FileParser.cpp FileParser.h FileLexer.cpp CommandLine.cpp - $(VERB) $(RM) -f FileParser.output + $(Verb) $(RM) -f FileParser.cpp FileParser.h FileLexer.cpp CommandLine.cpp + $(Verb) $(RM) -f FileParser.output From reid at x10sys.com Sat Oct 30 04:19:48 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 30 Oct 2004 04:19:48 -0500 Subject: [llvm-commits] CVS: llvm/tools/llee/Makefile Message-ID: <200410300919.EAA11400@zion.cs.uiuc.edu> Changes in directory llvm/tools/llee: Makefile updated: 1.11 -> 1.12 --- Log message: Internalize variable names to prevent recursive assignment. Cleanup docs. --- Diffs of the changes: (+7 -6) Index: llvm/tools/llee/Makefile diff -u llvm/tools/llee/Makefile:1.11 llvm/tools/llee/Makefile:1.12 --- llvm/tools/llee/Makefile:1.11 Fri Oct 29 13:36:51 2004 +++ llvm/tools/llee/Makefile Sat Oct 30 04:19:36 2004 @@ -9,16 +9,17 @@ LEVEL = ../.. LIBRARYNAME = LLVMexecve SHARED_LIBRARY = 1 +DONT_BUILD_RELINKED = 1 include $(LEVEL)/Makefile.common all:: llee -llee: $(TOOLDIR)/llee +llee: $(ToolDir)/llee -$(TOOLDIR)/llee: Makefile - @$(ECHO) Constructing llee shell script - $(VERB) echo exec env LD_PRELOAD=$(LIBDIR)/libLLVMexecve$(SHLIBEXT) $$\* > $@ - $(VERB) chmod u+x $@ +$(ToolDir)/llee: Makefile + $(Echo) Constructing llee shell script + $(Verb) echo exec env LD_PRELOAD=$(LibDir)/libexecve$(SHLIBEXT) $$\* > $@ + $(Verb) chmod u+x $@ clean:: - $(VERB) rm -f $(TOOLDIR)/llee + $(Verb) rm -f $(ToolDir)/llee From reid at x10sys.com Sat Oct 30 04:25:38 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 30 Oct 2004 04:25:38 -0500 Subject: [llvm-commits] CVS: llvm/projects/Stacker/test/Makefile Message-ID: <200410300925.EAA11463@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/test: Makefile updated: 1.6 -> 1.7 --- Log message: Correct macro names per naming standard in Makefile.rules --- Diffs of the changes: (+12 -12) Index: llvm/projects/Stacker/test/Makefile diff -u llvm/projects/Stacker/test/Makefile:1.6 llvm/projects/Stacker/test/Makefile:1.7 --- llvm/projects/Stacker/test/Makefile:1.6 Fri Sep 10 23:15:09 2004 +++ llvm/projects/Stacker/test/Makefile Sat Oct 30 04:25:27 2004 @@ -36,32 +36,32 @@ all :: test_each test_each: $(TESTS) - @$(ECHO) "Running Tests..." - $(VERB) LD_LIBRARY_PATH=$(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION) $(BUILD_SRC_DIR)/runtests $(BUILD_OBJ_DIR) $(TESTS) + $(Echo) "Running Tests..." + $(Verb) LD_LIBRARY_PATH=$(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION) $(BUILD_SRC_DIR)/runtests $(BUILD_OBJ_DIR) $(TESTS) %.bc : %.st Makefile - @$(ECHO) "Compiling And Optimizing $< to $*.bc" - $(VERB)$(STKRC_EXEC) -f -O4 -s 2048 -o $*.bc $(BUILD_SRC_DIR)/$*.st + $(Echo) "Compiling And Optimizing $< to $*.bc" + $(Verb)$(STKRC_EXEC) -f -O4 -s 2048 -o $*.bc $(BUILD_SRC_DIR)/$*.st %.s : %.bc testing.bc - @$(ECHO) "Assembling $< to $*.s" - $(VERB)$(LLINK) $*.bc testing.bc -o $*.bcl - $(VERB)$(LLC) -f -o $*.s $*.bcl + $(Echo) "Assembling $< to $*.s" + $(Verb)$(LLINK) $*.bc testing.bc -o $*.bcl + $(Verb)$(LLC) -f -o $*.s $*.bcl % : %.s - @$(ECHO) "Linking $*" - $(VERB)$(CC) -ggdb -L$(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION) -lstkr_runtime -o $* $*.s + $(Echo) "Linking $*" + $(Verb)$(CC) -ggdb -L$(BUILD_OBJ_ROOT)/lib/$(CONFIGURATION) -lstkr_runtime -o $* $*.s %.ll : %.bc - @$(ECHO) "Disassembling $< to $*.ll" - $(VERB)$(LDIS) -dis -o $*.ll $< + $(Echo) "Disassembling $< to $*.ll" + $(Verb)$(LDIS) -dis -o $*.ll $< TESTS_LL = $(TESTS:%=%.ll) TESTS_BC = $(TESTS:%=%.bc) TESTS_S = $(TESTS:%=%.s) clean :: - $(VERB)rm -f gmon.out $(TESTS_LL) $(TESTS_BC) $(TESTS_S) $(TESTS) testing.bc testing.s testing.ll + $(Verb)rm -f gmon.out $(TESTS_LL) $(TESTS_BC) $(TESTS_S) $(TESTS) testing.bc testing.s testing.ll .SUFFIXES: .st .s .ll .bc .PRECIOUS: %.s %.ll %.bc %.st From reid at x10sys.com Sat Oct 30 04:26:32 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 30 Oct 2004 04:26:32 -0500 Subject: [llvm-commits] CVS: llvm/projects/Stacker/samples/Makefile Message-ID: <200410300926.EAA11491@zion.cs.uiuc.edu> Changes in directory llvm/projects/Stacker/samples: Makefile updated: 1.7 -> 1.8 --- Log message: Change macro names per naming standard in Makefile.rules. --- Diffs of the changes: (+5 -5) Index: llvm/projects/Stacker/samples/Makefile diff -u llvm/projects/Stacker/samples/Makefile:1.7 llvm/projects/Stacker/samples/Makefile:1.8 --- llvm/projects/Stacker/samples/Makefile:1.7 Fri Oct 29 01:42:38 2004 +++ llvm/projects/Stacker/samples/Makefile Sat Oct 30 04:26:22 2004 @@ -20,12 +20,12 @@ ifdef OPTIMIZE % : %.st - @$(ECHO) "Compiling and Optimizing $( Changes in directory llvm-java/test: Makefile.test updated: 1.15 -> 1.16 --- Log message: Adjust to recent changes. --- Diffs of the changes: (+11 -11) Index: llvm-java/test/Makefile.test diff -u llvm-java/test/Makefile.test:1.15 llvm-java/test/Makefile.test:1.16 --- llvm-java/test/Makefile.test:1.15 Wed Sep 15 19:14:45 2004 +++ llvm-java/test/Makefile.test Sat Oct 30 07:52:30 2004 @@ -12,8 +12,8 @@ .PHONY: clean clean:: - $(RM) -f a.out core - $(RM) -rf Output/ + $(Verb)$(RM) -f a.out core + $(Verb)$(RM) -rf Output/ # we don't want these files to be deleted by make, even if they are # intermediate results @@ -21,24 +21,24 @@ #rule to link in runtime to raw bytecode %.linked.bc: %.raw.bc $(DESTLIBBYTECODE)/libjrt.bc - @$(ECHO) Linking $< with the Java runtime - $(LLVMTOOLCURRENT)/llvm-link$(EXEEXT) $^ -o - | \ - $(LOPT) -simplifycfg -mem2reg -instcombine > $@ + $(Echo) Linking $< with the Java runtime + $(Verb)$(LLVMTOOLCURRENT)/llvm-link$(EXEEXT) $^ -o - | \ + $(Verb)$(LOPT) -simplifycfg -mem2reg -instcombine > $@ # rule to make assembly from bytecode %.dis-ll: %.bc - @$(ECHO) Disassembling $< - $(LDIS) < $< > $@ + $(ECHO) Disassembling $< + $(Verb)$(LDIS) < $< > $@ # rule to compile java source Output/%.class: %.java Output/.dir - @$(ECHO) Compiling $< - $(JAVAC) -d Output $< + $(ECHO) Compiling $< + $(Verb)$(JAVAC) -d Output $< # rule to run a .class file with the jvm %.out-nat: %.class - $(JAVA) -cp Output $(subst /,.,$(subst Output/,,$*)) > $*.out-nat || rm -f $*.out-nat + $(Verb)$(JAVA) -cp Output $(subst /,.,$(subst Output/,,$*)) > $*.out-nat || rm -f $*.out-nat # rule to run a .class file with the llvm jit %.out-jit: %.llvm.bc - $(LLI) $< > $*.out-nat || rm -f $*.out-nat + $(Verb)$(LLI) $< > $*.out-nat || rm -f $*.out-nat From alkis at cs.uiuc.edu Sat Oct 30 07:52:41 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 30 Oct 2004 07:52:41 -0500 Subject: [llvm-commits] CVS: llvm-java/test/Programs/SingleSource/Makefile.singlesrc Message-ID: <200410301252.HAA13250@zion.cs.uiuc.edu> Changes in directory llvm-java/test/Programs/SingleSource: Makefile.singlesrc updated: 1.7 -> 1.8 --- Log message: Adjust to recent changes. --- Diffs of the changes: (+2 -2) Index: llvm-java/test/Programs/SingleSource/Makefile.singlesrc diff -u llvm-java/test/Programs/SingleSource/Makefile.singlesrc:1.7 llvm-java/test/Programs/SingleSource/Makefile.singlesrc:1.8 --- llvm-java/test/Programs/SingleSource/Makefile.singlesrc:1.7 Wed Sep 15 19:14:45 2004 +++ llvm-java/test/Programs/SingleSource/Makefile.singlesrc Sat Oct 30 07:52:30 2004 @@ -9,7 +9,7 @@ # rule to build raw bytecode from a classfile %.raw.bc: %.class $(CLASS2LLVM) - @$(ECHO) Compiling $< - $(CLASS2LLVM) -cp $(CLASSPATH):Output $(subst /,.,$(*F)) > $@ + $(Echo) Compiling $< + $(Verb)$(CLASS2LLVM) -cp $(CLASSPATH):Output $(subst /,.,$(*F)) > $@ include $(LEVEL)/test/Makefile.test From alkis at cs.uiuc.edu Sat Oct 30 07:52:41 2004 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat, 30 Oct 2004 07:52:41 -0500 Subject: [llvm-commits] CVS: llvm-java/Makefile.rules Message-ID: <200410301252.HAA13248@zion.cs.uiuc.edu> Changes in directory llvm-java: Makefile.rules updated: 1.11 -> 1.12 --- Log message: Adjust to recent changes. --- Diffs of the changes: (+2 -2) Index: llvm-java/Makefile.rules diff -u llvm-java/Makefile.rules:1.11 llvm-java/Makefile.rules:1.12 --- llvm-java/Makefile.rules:1.11 Wed Jul 28 05:08:57 2004 +++ llvm-java/Makefile.rules Sat Oct 30 07:52:30 2004 @@ -12,5 +12,5 @@ # rule to make bytecode from assembly %.bc: %.ll - @$(ECHO) Assembling $< to bytecode - $(LLVMAS) < $< > $@ + $(Echo) Assembling $< to bytecode + $(Verb)$(LLVMAS) < $< > $@ From reid at x10sys.com Sat Oct 30 16:39:53 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 30 Oct 2004 16:39:53 -0500 Subject: [llvm-commits] CVS: llvm/docs/MakefileGuide.html Message-ID: <200410302139.QAA18374@zion.cs.uiuc.edu> Changes in directory llvm/docs: MakefileGuide.html updated: 1.4 -> 1.5 --- Log message: Complete the description of public variables. Internal variables are listed but not described. It might just stay that way. --- Diffs of the changes: (+358 -136) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.4 llvm/docs/MakefileGuide.html:1.5 --- llvm/docs/MakefileGuide.html:1.4 Mon Oct 25 14:37:46 2004 +++ llvm/docs/MakefileGuide.html Sat Oct 30 16:39:42 2004 @@ -43,6 +43,7 @@
  • Control Variables
  • Override Variables
  • Readable Variables
  • +
  • Internal Variables
  • @@ -51,8 +52,6 @@

    Written by Reid Spencer

    -

    WARNING: This document is a work in progress!

    - @@ -207,6 +206,9 @@
    + + @@ -247,7 +249,6 @@ 0 then the check succeeds, otherwise not. The programs run can be anything but they should either be local to the directory or in your path.

    -

    Not implemented yet!

    @@ -255,7 +256,6 @@

    This target does the same thing as check but only for the current (local) directory.

    -

    Not implemented yet!

    @@ -280,7 +280,6 @@ compresses it. The generated tarball is sufficient for a casual source distribution, but probably not for a release (see dist-check).

    -

    Not implemented yet!

    @@ -293,7 +292,6 @@ goes out to make sure that the distributed tarball can actually be built into a working release.

    -

    Not implemented yet!

    @@ -302,7 +300,6 @@ normal clean but also removes things pertaining to building the distribution.

    -

    Not implemented yet!

    @@ -343,7 +340,11 @@

    Variables are used to tell the LLVM Makefile System what to do and to - obtain information from it. The sections below describe the three kinds of + obtain information from it. Variables are also used internally by the LLVM + Makefile System. Variable names that contain only the upper case alphabetic + letters and underscore are intended for use by the end user. All other + variables are internal to the LLVM Makefile System and should not be relied + upon nor modified. The sections below describe how to use the LLVM Makefile variables.

    @@ -354,98 +355,214 @@ inclusion of $(LEVEL)/Makefile.common. These variables provide input to the LLVM make system that tell it what to do for the current directory.

    -
    BUILT_SOURCES If set to any value, causes a bytecode library (.bc) to be built.
    BUILT_SOURCESSpecivies a set of configuration files to be installed.Specifies a set of configuration files to be installed.
    DIRS Specifies a set of directories that should also be made using the same goal. These directories will be built serially.
    Variable NameVariable Description
    BUILD_SRC_DIRThe project directory contaning the directories source files.The project directory containing the directories source files.
    BUILD_OBJ_DIR
    installall Copy built objects to installation directory.
    printvarsallPrints variables defined by the makefile system (for debugging). +
    tags Make C and C++ tags files for emacs and vi.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Variable NameVariable Description
    BUILD_ARCHIVEIf set to any value, causes an archive (.a) library to be built.
    BUILT_SOURCESSpecifies a set of source files that are generated. These will be - built before any other target processing to ensure they are present.
    BUILT_SOURCESIf set to any value, causes a bytecode library (.bc) to be built.
    BUILT_SOURCESSpecifies a set of configuration files to be installed.
    DIRSSpecifies a set of directories that should also be made using the - same goal. These directories will be built serially.
    DONT_BUILD_RELINKEDIf set to any value, causes a relinked library (.o) not to be built.
    EXPORTED_SYMBOL_FILESpecifies the name of a single file that contains a list of the - symbols to be exported by the linker. One symbol per line.
    LEVELSpecify the level of nesting from the top level. (Required)
    LIBRARYNAMESpecify the name of the library to be built. (Required For Libraries)
    LLVMLIBSSpecify the set of libraries from the LLVM $(OBJDIR) that will be - linked into the tool or library.
    EXPERIMENTAL_DIRSSpecify a set of directories that should be built, but if they fail, - it should not cause the build to fail. Note that this should only be - used temporarily while code is being written.
    OPTIONAL_DIRSSpecify a set of directories that may be built, if they exist, but its - not an error for them not to exist.
    PARALLEL_DIRSSpecify a set of directories to build recursively and in parallel if - the -j option was used with make.
    SHARED_LIBRARYIf set to any value, causes a shared library (.so) to be built. - (Optional)
    SOURCESSpecifies the list of source files in the current directory to be - acted upon. Source files of any type may be specified (programs, - documentation, config files, etc.)
    TARGETSpecifies the name of the LLVM code generation target that the - current directory builds.
    TOOLNAMESpecifies the name of the tool to build. (Required For Tools)
    USEDLIBSSpecifies the list of project libraries that will be linked into the - tool or library.
    +
    +
    BUILD_ARCHIVE
    +
    If set to any value, causes an archive (.a) library to be built.
    +
    BUILT_SOURCES
    +
    Specifies a set of source files that are generated from other source + files. These sources will be built before any other target processing to + ensure they are present. +
    BYTECODE_LIBRARY
    +
    If set to any value, causes a bytecode library (.bc) to be built.
    +
    CONFIG_FILES
    +
    Specifies a set of configuration files to be installed.
    +
    DIRS
    +
    Specifies a set of directories, usually children of the current + directory, that should also be made using the same goal. These directories + will be built serially.
    +
    DISABLE_AUTO_DEPENDENCIES
    +
    If set to any value, causes the makefiles to not automatically + generate dependencies when running the compiler. Use of this feature is + discouraged and it may be removed at a later date.
    +
    DONT_BUILD_RELINKED
    +
    If set to any value, causes a relinked library (.o) not to be built. By + default, libraries are built as re-linked since most LLVM libraries are + needed in their entirety and re-linked libraries will be linked more quickly + than equival archive libraries.
    +
    ENABLE_OPTIMIZED
    +
    If set to any value, causes the build to generate optimized objects, + libraries and executables. This alters the flags specified to the compilers + and linkers. Generally debugging won't be a fun experience with an optimized + build.
    +
    ENABLE_PROFILING
    +
    If set to any value, causes the build to generate both optimized and + profiled objects, libraries and executables. This alters the flags specified + to the compilers and linkers to ensure that profile data can be collected + from the tools built. Use the gprof tool to analyze the output from + the profiled tools (gmon.out).
    +
    EXPERIMENTAL_DIRS
    +
    Specify a set of directories that should be built, but if they fail, it + should not cause the build to fail. Note that this should only be used + temporarily while code is being written.
    +
    EXPORTED_SYMBOL_FILE
    +
    Specifies the name of a single file that contains a list of the + symbols to be exported by the linker. One symbol per line.
    +
    EXPORTED_SYMBOL_LIST
    +
    Specifies a set of symbols to be exported by the linker.
    +
    EXTRA_DIST
    +
    Specifies additional files that should be distributed with LLVM. All + source files, all built sources, all Makefiles, and most documentation files + will be automatically distributed. Use this variable to distribute any + files that are not automatically distributed.
    +
    KEEP_SYMBOLS
    +
    If set to any value, specifies that when linking executables the + makefiles should retain debug symbols in the executable. Normally, symbols + are stripped from the executable.
    +
    LEVEL(required)
    +
    Specify the level of nesting from the top level. This variable must be + set in each makefile as it is used to find the top level and thus the other + makefiles.
    +
    LIBRARYNAME
    +
    Specify the name of the library to be built. (Required For Libraries)
    + BUILD_OBJ_DIR directory. +
    LLVMLIBS
    +
    Specifies the set of libraries from the LLVM $(ObjDir) that will be + linked into the tool or library.
    +
    OPTIONAL_DIRS
    +
    Specify a set of directories that may be built, if they exist, but its + not an error for them not to exist.
    +
    PARALLEL_DIRS
    +
    Specify a set of directories to build recursively and in parallel if + the -j option was used with make.
    +
    SHARED_LIBRARY
    +
    If set to any value, causes a shared library (.so) to be built in + addition to any other kinds of libraries. Note that this option will cause + all source files to be built twice: once with options for position + independent code and once without. Use it only where you really need a + shared library.
    +
    SOURCES(optional) +
    Specifies the list of source files in the current directory to be + built. Source files of any type may be specified (programs, documentation, + config files, etc.). If not specified, the makefile system will infer the + set of source files from the files present in the current directory.
    +
    SUFFIXES
    +
    Specifies a set of filename suffixes that occur in suffix match rules. + Only set this if your local Makefile specifies additional suffix + match rules.
    +
    TARGET
    +
    Specifies the name of the LLVM code generation target that the + current directory builds. Setting this variable enables additional rules to + build .inc files from .td files.
    +
    TOOLNAME
    +
    Specifies the name of the tool that the current directory should + build.
    +
    USEDLIBS +
    Specifies the list of project libraries that will be linked into the + tool or library.
    +
    VERBOSE +
    Tells the Makefile system to produce detailed output of what it is doing + instead of just summary comments. This will generate a LOT of output.
    +
    -

    Variables listed in the table below can be used to override the default - values provided by the LLVM makefile system. These variables should be set - after the inclusion of $(LEVEL)/Makefile.common.

    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Variable NameVariable Description
    CThe name (and optional path) of the 'C' compiler (gcc normally).
    CFLAGSThe set of options to be passed to the 'C' compiler on every - compile.
    CPPThe name (and optional path) of the 'C' pre-processor (cpp normally). -
    CXXThe name (and optional path) of the C++ compiler (g++ normally).
    LDThe name (and optional path) of the system linker (gcc normally).
    LIBTOOLThe name (and optional path) of the libtool tool (libtool normally).
    +

    Overridable variables can be used to override the default + values provided by the LLVM makefile system. These variables can be set in + several ways:

    +
      +
    • In the environment (e.g. setenv, export) -- not recommended.
    • +
    • On the make command line -- recommended.
    • +
    • On the configure command line
    • +
    • In the Makefile (only after the inclusion of $(LEVEL)/Makefile.common.
    • +
    +

    The overridable variables are given below:

    +
    +
    AR (defaulted)
    +
    Specifies the path to the ar tool.
    +
    BISON(configured)
    +
    Specifies the path to the bison tool.
    +
    BUILD_OBJ_DIR
    +
    The directory into which the products of build rules will be placed. + This might be the same as + BUILD_SRC_DIR but typically is + not.
    +
    BUILD_SRC_DIR
    +
    The directory which contains the source files to be built.
    +
    BURG
    +
    Specifies the path to the burg tool.
    +
    BZIP2(configured)
    +
    The path to the bzip2 tool.
    +
    CC(configured)
    +
    The path to the 'C' compiler.
    +
    CFLAGS
    +
    Additional flags to be passed to the 'C' compiler.
    +
    CXX
    +
    Specifies the path to the C++ compiler.
    +
    CXXFLAGS
    +
    Additional flags to be passed to the C++ compiler.
    +
    DATE(configured)
    +
    Specifies the path to the date program or any program that can + generate the current date and time on its standard output
    +
    DOT(configured)
    +
    Specifies the path to the dot tool or false if there + isn't one.
    +
    ECHO(configured)
    +
    Specifies the path to the echo tool for printing output.
    +
    ETAGS(configured)
    +
    Specifies the path to the etags tool.
    +
    ETAGSFLAGS(configured)
    +
    Provides flags to be passed to the etags tool.
    +
    EXEEXT(configured)
    +
    Provides the extension to be used on executables built by the makefiles. + The value may be empty on platforms that do not use file extensions for + executables (e.g. Unix).
    +
    FLEX(configured)
    +
    Specifies the path to the flex tool.
    +
    GCCLD(defaulted)
    +
    Specifies the path to the gccld tool.
    +
    HAVE_BZIP2(configured)
    +
    This variable is set automatically if the configure script + could find the bzip2 library.
    +
    HAVE_ZLIB(configured)
    +
    This variable is set automatically if the configure script + could find the zlib library.
    +
    INSTALL(configured)
    +
    Specifies the path to the install tool.
    +
    LDFLAGS(configured)
    +
    Allows users to specify additional flags to pass to the linker.
    +
    LIBS(configured)
    +
    The list of libraries that should be linked with each tool.
    +
    LIBTOOL(configured)
    +
    Specifies the path to the libtool tool. This tool is renamed + mklib by the configure script and always located in the +
    LLVMAS(defaulted)
    +
    Specifies the path to the llvm-as tool.
    +
    LLVMGCC(defaulted)
    +
    Specifies the path to the LLVM version of the GCC 'C' Compiler
    +
    LLVMGXX(defaulted)
    +
    Specifies the path to the LLVM version of the GCC C++ Compiler
    +
    LLVM_OBJ_ROOT(configured)
    +
    Specifies the top directory into which the output of the build is + placed.
    +
    LLVM_SRC_ROOT(configured)
    +
    Specifies the top directory in which the sources are found.
    +
    LLVM_TARBALL_NAME(configured)
    +
    Specifies the name of the distribution tarball to create. This is + configured from the name of the project and its version number.
    +
    MKDIR(defaulted)
    +
    Specifies the path to the mkdir tool that creates + directories.
    +
    PLATFORMSTRIPOPTS
    +
    The options to provide to the linker to specify that a stripped (no + symbols) executable should be built.
    +
    RANLIB(defaulted)
    +
    Specifies the path to the ranlib tool.
    +
    RM(defaulted)
    +
    Specifies the path to the rm tool.
    +
    SED(defaulted)
    +
    Specifies the path to the sed tool.
    +
    SHLIBEXT(configured)
    +
    Provides the filename extension to use for shared libraries.
    +
    TBLGEN(defaulted)
    +
    Specifies the path to the tblgen tool.
    +
    TAR(defaulted)
    +
    Specifies the path to the tar tool.
    +
    ZIP(defaulted)
    +
    Specifies the path to the zip tool.
    +
    @@ -454,46 +571,151 @@

    Variables listed in the table below can be used by the user's Makefile but should not be changed. Changing the value will generally cause the build to go wrong, so don't do it.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Variable NameVariable Description
    BUILD_SRC_DIRThe project directory containing the directories source files.
    BUILD_OBJ_DIRThe project directory that will receive the object files.
    CONFIGURATIONThe name of the configuration being built.
    DESTDIRThe top level directory into which files are installed.
    LLVM_SRC_ROOTThe top level directory of the LLVM source.
    LLVM_OBJ_ROOTThe top level directory of the LLVM objects.
    OBJDIRThe directory in which the project's object files should be placed.
    LIBDIRThe directory in which the project's library files should be placed.
    TOOLDIRThe directory in which the project's executable tools should be - placed.
    +
    +
    bindir
    +
    The directory into which executables will ultimately be installed. This + value is derived from the --prefix option given to + configure.
    +
    bytecode_libdir
    +
    The directory into which bytecode libraries will ultimately be installed. + This value is derived from the --prefix option given to + configure.
    +
    ConfigureScriptFLAGS
    +
    Additional flags given to the configure script when + reconfiguring.
    +
    DistDir
    +
    The current directory for which a distribution copy is being + made.
    +
    Echo
    +
    The LLVM Makefile System output command. This provides the + llvm[n] prefix and starts with @ so the command itself is not + printed by make.
    +
    EchoCmd
    +
    Same as Echo but without the leading @. +
    +
    includedir
    +
    The directory into which include files will ultimately be installed. + This value is derived from the --prefix option given to + configure.
    +
    libdir
    +
    The directory into which native libraries will ultimately be installed. + This value is derived from the --prefix option given to + configure.
    +
    LibDir
    +
    The configuration specific directory into which libraries are placed + before installation.
    +
    MakefileConfig
    +
    Full path of the Makefile.config file.
    +
    MakefileConfigIn
    +
    Full path of the Makefile.config.in file.
    +
    ObjDir
    +
    The configuration and directory specific directory where build objects + (compilation results) are placed.
    +
    SubDirs
    +
    The complete list of sub-directories of the current directory as + specified by other variables.
    +
    Sources
    +
    The complete list of source files.
    +
    sysconfdir
    +
    The directory into which configuration files will ulitmately be + installed. This value is derived from the --prefix option given to + configure.
    +
    ToolDir
    +
    The configuration specific directory into which executables are placed + before they are installed.
    +
    TopDistDir
    +
    The top most directory into which the distribution files are copied.
    +
    Verb
    +
    Use this as the first thing on your build script lines to enable or + disable verbose mode. It expands to either an @ (quiet mode) or nothing + (verbose mode).
    +
    +
    + + + + @@ -506,7 +728,7 @@ Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/10/25 19:37:46 $ + Last modified: $Date: 2004/10/30 21:39:42 $ From reid at x10sys.com Sat Oct 30 16:40:38 2004 From: reid at x10sys.com (Reid Spencer) Date: Sat, 30 Oct 2004 16:40:38 -0500 Subject: [llvm-commits] CVS: llvm/docs/Lexicon.html Message-ID: <200410302140.QAA18447@zion.cs.uiuc.edu> Changes in directory llvm/docs: Lexicon.html updated: 1.7 -> 1.8 --- Log message: Add a few more terms. --- Diffs of the changes: (+40 -1) Index: llvm/docs/Lexicon.html diff -u llvm/docs/Lexicon.html:1.7 llvm/docs/Lexicon.html:1.8 --- llvm/docs/Lexicon.html:1.7 Sat Sep 4 22:57:23 2004 +++ llvm/docs/Lexicon.html Sat Oct 30 16:40:28 2004 @@ -36,6 +36,12 @@ + - C - + + CSE + + + - D - DSA @@ -43,11 +49,19 @@ + - L - + + IPA + IPO + + + - L - LICM Load-VN + - P - @@ -86,6 +100,18 @@ + +
    +
    +
    CSE
    +
    Common Subexpression Elimination. An optimization that removes common + subexpression compuation. For example (a+b)*(a+b) has two + subexpressions that are the same: (a+b). This optimization would + perform the addition only once and then perform the multiply (but only if + its compulationally correct/safe). +
    +
    +
    @@ -96,6 +122,19 @@
    + +
    +
    +
    IPA
    +
    Inter-Procedural Analysis. Refers to any variety of code analysis that + occurs between procedures, functions or compilation units (modules).
    +
    IPO
    +
    Inter-Procedural Optimization. Refers to any variety of code + optimization that occurs between procedures, functions or compilation units + (modules).
    +
    +
    +
    @@ -131,7 +170,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!">The LLVM Team
    The LLVM Compiler Infrastructure
    -Last modified: $Date: 2004/09/05 03:57:23 $ +Last modified: $Date: 2004/10/30 21:40:28 $ From vadve at cs.uiuc.edu Sat Oct 30 18:11:37 2004 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Sat, 30 Oct 2004 18:11:37 -0500 Subject: [llvm-commits] CVS: llvm/utils/cvsupdate Message-ID: <200410302311.i9UNBbB7031284@apoc.cs.uiuc.edu> Changes in directory llvm/utils: cvsupdate updated: 1.7 -> 1.8 --- Log message: Fix patterns to match only one-char words. --- Diffs of the changes: (+0 -0) From brukman at cs.uiuc.edu Sun Oct 31 11:31:03 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Sun, 31 Oct 2004 11:31:03 -0600 Subject: [llvm-commits] CVS: llvm/tools/llee/Makefile Message-ID: <200410311731.LAA23355@zion.cs.uiuc.edu> Changes in directory llvm/tools/llee: Makefile updated: 1.12 -> 1.13 --- Log message: No, really, the library name is `LLVMexecve' --- Diffs of the changes: (+1 -1) Index: llvm/tools/llee/Makefile diff -u llvm/tools/llee/Makefile:1.12 llvm/tools/llee/Makefile:1.13 --- llvm/tools/llee/Makefile:1.12 Sat Oct 30 04:19:36 2004 +++ llvm/tools/llee/Makefile Sun Oct 31 11:30:52 2004 @@ -18,7 +18,7 @@ $(ToolDir)/llee: Makefile $(Echo) Constructing llee shell script - $(Verb) echo exec env LD_PRELOAD=$(LibDir)/libexecve$(SHLIBEXT) $$\* > $@ + $(Verb) echo exec env LD_PRELOAD=$(LibDir)/libLLVMexecve$(SHLIBEXT) $$\* > $@ $(Verb) chmod u+x $@ clean:: From lattner at cs.uiuc.edu Sun Oct 31 11:45:54 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 31 Oct 2004 11:45:54 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200410311745.i9VHjswQ003410@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.182 -> 1.183 --- Log message: Add more paranoid assertions :) --- Diffs of the changes: (+12 -0) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.182 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.183 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.182 Sat Oct 30 00:41:23 2004 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Sun Oct 31 11:45:40 2004 @@ -1973,6 +1973,18 @@ } AssertCallNodesInGraph(); AssertAuxCallNodesInGraph(); + + // Check that all pointer arguments to any functions in this graph have + // destinations. + for (ReturnNodesTy::const_iterator RI = ReturnNodes.begin(), + E = ReturnNodes.end(); + RI != E; ++RI) { + Function &F = *RI->first; + for (Function::aiterator AI = F.abegin(); AI != F.aend(); ++AI) + if (isPointerType(AI->getType())) + assert(!getNodeForValue(AI).isNull() && + "Pointer argument must be in the scalar map!"); + } } /// computeNodeMapping - Given roots in two different DSGraphs, traverse the From lattner at cs.uiuc.edu Sun Oct 31 11:47:58 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 31 Oct 2004 11:47:58 -0600 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp Message-ID: <200410311747.i9VHlw7j003428@apoc.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: EquivClassGraphs.cpp updated: 1.4 -> 1.5 --- Log message: Only call getNodeForValue on pointer arguments! this fixes a problem running on Prolangs-C++/objects --- Diffs of the changes: (+11 -5) Index: poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp diff -u poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp:1.4 poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp:1.5 --- poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp:1.4 Tue Oct 12 11:52:09 2004 +++ poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp Sun Oct 31 11:47:48 2004 @@ -181,6 +181,7 @@ EqEnd = EqClass.end(); EqI != EqEnd; ++EqI) { Function* F = *EqI; DSGraph*& FG = FoldedGraphsMap[F]; + if (F == LF || FG == mergedG) continue; @@ -194,6 +195,7 @@ GraphsMerged.insert(CBUGraph); DSGraph::NodeMapTy NodeMap; + mergedG->cloneInto(*CBUGraph, mergedG->getScalarMap(), mergedG->getReturnNodes(), NodeMap, 0); @@ -204,10 +206,14 @@ // If there are extra function args, add them to the vector of argNodes Function::aiterator AI2 = F->abegin(), AI2end = F->aend(); for (unsigned arg=0, numArgs=GraphInfo.argNodes.size(); - arg < numArgs && AI2 != AI2end; ++AI2, ++arg) - GraphInfo.argNodes[arg].mergeWith(mergedG->getNodeForValue(AI2)); + arg != numArgs && AI2 != AI2end; ++AI2, ++arg) + if (DS::isPointerType(AI2->getType())) + GraphInfo.argNodes[arg].mergeWith(mergedG->getNodeForValue(AI2)); + for ( ; AI2 != AI2end; ++AI2) - GraphInfo.argNodes.push_back(mergedG->getNodeForValue(AI2)); + if (DS::isPointerType(AI2->getType())) + GraphInfo.argNodes.push_back(mergedG->getNodeForValue(AI2)); + DEBUG(mergedG->AssertGraphOK()); } } } @@ -223,7 +229,6 @@ // Use the CBU graph directly without copying it. // This automatically updates the FoldedGraphsMap via the reference. Graph = &CBU->getDSGraph(F); - return *Graph; } @@ -306,6 +311,7 @@ FG.removeTriviallyDeadNodes(); Stack.pop_back(); + processGraph(FG, F); ValMap[&F] = ~0U; return MyID; @@ -319,7 +325,7 @@ hash_set calls; - DSGraph* CallerGraph = sameAsCBUGraph(F)? NULL : &getOrCreateGraph(F); + DSGraph* CallerGraph = sameAsCBUGraph(F) ? NULL : &getOrCreateGraph(F); // If the function has not yet been cloned, let's check if any callees // need to be inlined before cloning it. From reid at x10sys.com Sun Oct 31 11:51:49 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 31 Oct 2004 11:51:49 -0600 Subject: [llvm-commits] CVS: llvm/docs/MakefileGuide.html Message-ID: <200410311751.LAA07248@zion.cs.uiuc.edu> Changes in directory llvm/docs: MakefileGuide.html updated: 1.5 -> 1.6 --- Log message: Add a tutorial and some more general concepts. --- Diffs of the changes: (+128 -27) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.5 llvm/docs/MakefileGuide.html:1.6 --- llvm/docs/MakefileGuide.html:1.5 Sat Oct 30 16:39:42 2004 +++ llvm/docs/MakefileGuide.html Sun Oct 31 11:51:38 2004 @@ -14,13 +14,23 @@
  • General Concepts
    1. Projects
    2. -
    3. Makefile
    4. -
    5. Makefile.common
    6. -
    7. Makefile.config
    8. -
    9. Makefile.rules
    10. +
    11. Variable Values
    12. +
    13. Including Makefiles
    14. +
        +
      1. Makefile
      2. +
      3. Makefile.common
      4. +
      5. Makefile.config
      6. +
      7. Makefile.rules
      8. +
    15. Comments
  • +
  • Tutorial +
      +
    1. Libraries
    2. +
    3. Tools
    4. +
    +
  • Targets Supported
    1. all
    2. @@ -60,15 +70,14 @@

      This document provides usage information about the LLVM makefile system. While loosely patterned after the BSD makefile system, LLVM has taken a departure from BSD in order to implement additional features needed by LLVM. -

      -

      Although makefile systems such as automake were attempted at one point, it - has become clear that the differences between the LLVM way of doing things and - the Makefile norm are too great to use a more limited tool. Consequently, LLVM requires - simply GNU Make 3.79, a widely portably makefile processor. LLVM unabashedly - makes heavy use of the features of GNU Make so the dependency on GNU Make is - firm. If you're not familiar with make, it is recommended that you - read the - GNU Makefile Manual.

      + Although makefile systems such as automake were attempted at one point, it + has become clear that the features needed by LLVM and the Makefile norm are + too great to use a more limited tool. Consequently, LLVM requires simply GNU + Make 3.79, a widely portable makefile processor. LLVM unabashedly makes heavy + use of the features of GNU Make so the dependency on GNU Make is firm. If + you're not familiar with make, it is recommended that you read the + GNU Makefile Manual + .

      While this document is rightly part of the LLVM Programmer's Manual, it is treated separately here because of the volume of content and because it is often an @@ -80,9 +89,11 @@

      -

      The LLVM makefile system is the component of LLVM that is responsible for - building the software, testing it, generating distributions, rpms and other - packages, installing and uninstalling, etc.

      +

      The LLVM Makefile System is the component of LLVM that is responsible for + building the software, testing it, generating distributions, checking those + distributions, installing and uninstalling, etc. It consists of a several + files throughout the source tree. These files and other general concepts are + described in this section.

      @@ -94,11 +105,30 @@ that has both a configure script and a Makefile is assumed to be a project that uses the LLVM Makefile system. This allows your project to get up and running quickly by utilizing the built-in features that are used - to compile LLVM.

      + to compile LLVM. LLVM compiles itself using the same features of the makefile + system as used for projects.

      +
  • + + + +
    +

    To use the makefile system, you simply create a file named + Makefile in your directory and declare values for certain variables. + The variables and values that you select determine what the makefile system + will do. These variables enable rules and processing in the makefile system + that automatically Do The Right Thing™.

    - + +
    +

    Setting variables alone is not enough. You must include into your Makefile + additional files that provide the rules of the LLVM Makefile system. The + various files involved are described in the sections that follow.

    +
    + + +

    Each directory to participate in the build needs to have a file named Makefile. This is the file first read by make. It has three @@ -108,13 +138,14 @@ first.

  • include $(LEVEL)/Makefile.common - include the LLVM Makefile system. -
  • Overridable Variables - Override variables set by +
  • Override Variables - Override variables set by the LLVM Makefile system.
  • - +

    Every project must have a Makefile.common file at its top source directory. This file serves three purposes:

    @@ -125,14 +156,15 @@
  • It specifies any other (static) values that are needed throughout the project. Only values that are used in all or a large proportion of the project's directories should be placed here.
  • -
  • It include's the standard rules for the LLVM Makefile system, +
  • It includes the standard rules for the LLVM Makefile system, $(LLVM_SRC_ROOT)/Makefile.rules. This file is the "guts" of the LLVM Makefile system.
  • - +

    Every project must have a Makefile.config at the top of its build directory. This file is generated by the @@ -145,7 +177,7 @@

    - +

    This file, located at $(LLVM_SRC_ROOT)/Makefile.rules is the heart of the LLVM Makefile System. It provides all the logic, dependencies, and @@ -165,6 +197,75 @@

    + + +
    +

    This section provides some examples of the different kinds of modules you + can build with the LLVM makefile system. In general, each directory you + provide will build a single object although that object may be composed of + additionally compiled components.

    +
    + + + +
    +

    Only a few variable definitions are needed to build a regular library. + Normally, the makefile system will build all the software into a single + libname.o (pre-linked) object. This means the library is not + searchable and that the distinction between compilation units has been + dissolved. Optionally, you can ask for a shared library (.so), archive library + (.a) or to not have the default (relinked) library built. For example:

    +
    
    +      LIBRARYNAME = mylib
    +      SHARED_LIBRARY = 1
    +      ARCHIVE_LIBRARY = 1
    +      DONT_BUILT_RELINKED = 1
    +  
    +

    says to build a library named "mylib" with both a shared library + (mylib.so) and an archive library (mylib.a) version but + not to build the relinked object (mylib.o). The contents of all the + libraries produced will be the same, they are just constructed differently. + Note that you normally do not need to specify the sources involved. The LLVM + Makefile system will infer the source files from the contents of the source + directory.

    +
    + + + +
    +

    For building executable programs (tools), you must provide the name of the + tool and the names of the libraries you wish to link with the tool. For + example:

    +
    
    +      TOOLNAME = mytool
    +      USEDLIBS = mylib
    +      LLVMLIBS = LLVMSupport.a LLVMSystem.a
    +  
    +

    says that we are to build a tool name mytool and that it requires + three libraries: mylib, LLVMSupport.a and + LLVMSystem.a.

    +

    Note that two different variables are use to indicate which libraries are + linked: USEDLIBS and LLVMLIBS. This distinction is necessary + to support projects. LLVMLIBS refers to the LLVM libraries found in + the LLVM object directory. USEDLIBS refers to the libraries built by + your project. In the case of building LLVM tools, USEDLIBS and + LLVMLIBS can be used interchangeably since the "project" is LLVM + itself and USEDLIBS refers to the same place as LLVMLIBS. +

    +

    Also note that there are two different ways of specifying a library: with a + .a suffix and without. Without the suffix, the entry refers to the + re-linked (.o) file which will include all symbols of the library. + This is useful, for example, to include all passes from a library of passes. + If the .a suffix is used then the library is linked as a searchable + library (with the -l option). In this case, only the symbols that are + unresolved at that point will be resolved from the library, if they + exist. Other (unreferenced) symbols will not be included when the .a + syntax is used. Note that in order to use the .a suffix, the library + in question must have been built with the ARCHIVE_LIBRARY option set. +

    +
    + + @@ -378,7 +479,7 @@
    If set to any value, causes a relinked library (.o) not to be built. By default, libraries are built as re-linked since most LLVM libraries are needed in their entirety and re-linked libraries will be linked more quickly - than equival archive libraries.
    + than equivalent archive libraries.
    ENABLE_OPTIMIZED
    If set to any value, causes the build to generate optimized objects, libraries and executables. This alters the flags specified to the compilers @@ -456,9 +557,9 @@ - +
    -

    Overridable variables can be used to override the default +

    Override variables can be used to override the default values provided by the LLVM makefile system. These variables can be set in several ways:

      @@ -728,7 +829,7 @@ Reid Spencer
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2004/10/30 21:39:42 $ + Last modified: $Date: 2004/10/31 17:51:38 $ From reid at x10sys.com Sun Oct 31 11:57:01 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 31 Oct 2004 11:57:01 -0600 Subject: [llvm-commits] CVS: llvm/docs/MakefileGuide.html Message-ID: <200410311757.LAA10012@zion.cs.uiuc.edu> Changes in directory llvm/docs: MakefileGuide.html updated: 1.6 -> 1.7 --- Log message: Correct tag usage for HTML 4.01 Strict compliance --- Diffs of the changes: (+15 -14) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.6 llvm/docs/MakefileGuide.html:1.7 --- llvm/docs/MakefileGuide.html:1.6 Sun Oct 31 11:51:38 2004 +++ llvm/docs/MakefileGuide.html Sun Oct 31 11:56:50 2004 @@ -15,13 +15,14 @@
      1. Projects
      2. Variable Values
      3. -
      4. Including Makefiles
      5. -
          -
        1. Makefile
        2. -
        3. Makefile.common
        4. -
        5. Makefile.config
        6. -
        7. Makefile.rules
        8. -
        +
      6. Including Makefiles +
          +
        1. Makefile
        2. +
        3. Makefile.common
        4. +
        5. Makefile.config
        6. +
        7. Makefile.rules
        8. +
        +
      7. Comments
      @@ -462,7 +463,7 @@
      BUILT_SOURCES
      Specifies a set of source files that are generated from other source files. These sources will be built before any other target processing to - ensure they are present. + ensure they are present.
      BYTECODE_LIBRARY
      If set to any value, causes a bytecode library (.bc) to be built.
      CONFIG_FILES
      @@ -514,8 +515,8 @@ set in each makefile as it is used to find the top level and thus the other makefiles.
    LIBRARYNAME
    -
    Specify the name of the library to be built. (Required For Libraries)
    - BUILD_OBJ_DIR directory. +
    Specify the name of the library to be built. (Required For + Libraries)
    LLVMLIBS
    Specifies the set of libraries from the LLVM $(ObjDir) that will be linked into the tool or library.
    @@ -531,7 +532,7 @@ all source files to be built twice: once with options for position independent code and once without. Use it only where you really need a shared library. -
    SOURCES(optional) +
    SOURCES(optional)
    Specifies the list of source files in the current directory to be built. Source files of any type may be specified (programs, documentation, config files, etc.). If not specified, the makefile system will infer the @@ -547,10 +548,10 @@
    TOOLNAME
    Specifies the name of the tool that the current directory should build.
    -
    USEDLIBS +
    USEDLIBS
    Specifies the list of project libraries that will be linked into the tool or library.
    -
    VERBOSE +
    VERBOSE
    Tells the Makefile system to produce detailed output of what it is doing instead of just summary comments. This will generate a LOT of output.
    @@ -829,7 +830,7 @@ Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/10/31 17:51:38 $ + Last modified: $Date: 2004/10/31 17:56:50 $ From reid at x10sys.com Sun Oct 31 11:59:09 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 31 Oct 2004 11:59:09 -0600 Subject: [llvm-commits] CVS: llvm/docs/MakefileGuide.html Message-ID: <200410311759.LAA10079@zion.cs.uiuc.edu> Changes in directory llvm/docs: MakefileGuide.html updated: 1.7 -> 1.8 --- Log message: One more missing end tag. --- Diffs of the changes: (+2 -2) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.7 llvm/docs/MakefileGuide.html:1.8 --- llvm/docs/MakefileGuide.html:1.7 Sun Oct 31 11:56:50 2004 +++ llvm/docs/MakefileGuide.html Sun Oct 31 11:58:58 2004 @@ -510,7 +510,7 @@
    If set to any value, specifies that when linking executables the makefiles should retain debug symbols in the executable. Normally, symbols are stripped from the executable.
    -
    LEVEL(required)
    +
    LEVEL(required)
    Specify the level of nesting from the top level. This variable must be set in each makefile as it is used to find the top level and thus the other makefiles.
    @@ -830,7 +830,7 @@ Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/10/31 17:56:50 $ + Last modified: $Date: 2004/10/31 17:58:58 $ From lattner at cs.uiuc.edu Sun Oct 31 12:13:29 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 31 Oct 2004 12:13:29 -0600 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp Message-ID: <200410311813.i9VIDTiP006484@apoc.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: EquivClassGraphs.cpp updated: 1.5 -> 1.6 --- Log message: Fix another bug in Prolangs-C++/objects --- Diffs of the changes: (+2 -1) Index: poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp diff -u poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp:1.5 poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp:1.6 --- poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp:1.5 Sun Oct 31 11:47:48 2004 +++ poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp Sun Oct 31 12:13:19 2004 @@ -171,7 +171,8 @@ // Record the argument nodes for use in merging later below EquivClassGraphArgsInfo& GraphInfo = getECGraphInfo(mergedG); for (Function::aiterator AI1 = LF->abegin(); AI1 != LF->aend(); ++AI1) - GraphInfo.argNodes.push_back(mergedG->getNodeForValue(AI1)); + if (DS::isPointerType(AI1->getType())) + GraphInfo.argNodes.push_back(mergedG->getNodeForValue(AI1)); // Merge in the graphs of all other functions in this equiv. class. // Note that two or more functions may have the same graph, and it From reid at x10sys.com Sun Oct 31 12:50:44 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 31 Oct 2004 12:50:44 -0600 Subject: [llvm-commits] CVS: llvm/docs/MakefileGuide.html Message-ID: <200410311850.MAA25985@zion.cs.uiuc.edu> Changes in directory llvm/docs: MakefileGuide.html updated: 1.8 -> 1.9 --- Log message: Add the preconditions target per suggestion by Henrik Bach. --- Diffs of the changes: (+16 -1) Index: llvm/docs/MakefileGuide.html diff -u llvm/docs/MakefileGuide.html:1.8 llvm/docs/MakefileGuide.html:1.9 --- llvm/docs/MakefileGuide.html:1.8 Sun Oct 31 11:58:58 2004 +++ llvm/docs/MakefileGuide.html Sun Oct 31 12:50:34 2004 @@ -44,6 +44,7 @@
  • dist-check
  • dist-clean
  • install
  • +
  • preconditions
  • printvars
  • tags
  • uninstall
  • @@ -308,6 +309,9 @@ installall Copy built objects to installation directory. + preconditionsall + Check to make sure configuration and makefiles are up to date. + printvarsall Prints variables defined by the makefile system (for debugging). @@ -413,6 +417,17 @@ + +
    +

    This utility target checks to see if the Makefile in the object + directory is older than the Makefile in the source directory and + copies it if so. It also reruns the configure script if that needs to + be done and rebuilds the Makefile.config file similarly. Users may + overload this target to ensure that sanity checks are run before any + building of targets as all the targets depend on preconditions.

    +
    + +

    This utility target just causes LLVM to print out some of its variables so @@ -830,7 +845,7 @@ Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/10/31 17:58:58 $ + Last modified: $Date: 2004/10/31 18:50:34 $ From reid at x10sys.com Sun Oct 31 12:52:25 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 31 Oct 2004 12:52:25 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410311852.MAA26032@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.225 -> 1.226 --- Log message: Actually use the correct variable name for building bytecode files. --- Diffs of the changes: (+2 -2) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.225 llvm/Makefile.rules:1.226 --- llvm/Makefile.rules:1.225 Sat Oct 30 04:19:36 2004 +++ llvm/Makefile.rules Sun Oct 31 12:52:15 2004 @@ -741,11 +741,11 @@ $(ObjDir)/%.bc: %.cpp $(ObjDir)/.dir $(Echo) "Compiling $*.cpp (bytecode)" - $(BCCompileCPP) $< -o $@ + $(BCCompile.CXX) $< -o $@ $(ObjDir)/%.bc: %.c $(ObjDir)/.dir $(Echo) "Compiling $*.c (bytecode)" - $(BCCompileC) $< -o $@ + $(BCCompile.C) $< -o $@ endif From lattner at cs.uiuc.edu Sun Oct 31 13:57:56 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 31 Oct 2004 13:57:56 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200410311957.i9VJvuLh008159@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.183 -> 1.184 --- Log message: Improve comment --- Diffs of the changes: (+4 -2) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.183 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.184 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.183 Sun Oct 31 11:45:40 2004 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Sun Oct 31 13:57:43 2004 @@ -1988,8 +1988,10 @@ } /// computeNodeMapping - Given roots in two different DSGraphs, traverse the -/// nodes reachable from the two graphs, computing the mapping of nodes from -/// the first to the second graph. +/// nodes reachable from the two graphs, computing the mapping of nodes from the +/// first to the second graph. This mapping may be many-to-one (i.e. the first +/// graph may have multiple nodes representing one node in the second graph), +/// but it will not work if there is a one-to-many or many-to-many mapping. /// void DSGraph::computeNodeMapping(const DSNodeHandle &NH1, const DSNodeHandle &NH2, NodeMapTy &NodeMap, From reid at x10sys.com Sun Oct 31 15:07:45 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 31 Oct 2004 15:07:45 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410312107.PAA29277@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.226 -> 1.227 --- Log message: Fix output for building shared libraries per Chris' requirements --- Diffs of the changes: (+1 -1) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.226 llvm/Makefile.rules:1.227 --- llvm/Makefile.rules:1.226 Sun Oct 31 12:52:15 2004 +++ llvm/Makefile.rules Sun Oct 31 15:07:34 2004 @@ -452,7 +452,7 @@ all-local:: $(LibName.LA) $(LibName.LA): $(BUILT_SOURCES) $(ObjectsLO) $(LibDir)/.dir - $(Echo) Linking $(Configuration) Shared Library $(notdir $@) + $(Echo) Linking $(Configuration) Shared Library $(LIBRARYNAME).so $(Verb) $(Link) -o $@ $(ObjectsLO) $(Verb) $(LTInstall) $@ $(LibDir) From lattner at cs.uiuc.edu Sun Oct 31 15:55:05 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 31 Oct 2004 15:55:05 -0600 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Message-ID: <200410312155.i9VLt5D7019638@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.82 -> 1.83 --- Log message: Fix comment --- Diffs of the changes: (+1 -1) Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.82 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.83 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.82 Sun Sep 19 23:45:25 2004 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Sun Oct 31 15:54:51 2004 @@ -323,7 +323,7 @@ DSScalarMap &MainSM = Graph.getScalarMap(); ReachabilityCloner RC(*GlobalsGraph, Graph, DSGraph::StripAllocaBit); - // Clone everything reachable from globals in the "main" graph into the + // Clone everything reachable from globals in the function graph into the // globals graph. for (DSScalarMap::global_iterator I = MainSM.global_begin(), E = MainSM.global_end(); I != E; ++I) From lattner at cs.uiuc.edu Sun Oct 31 15:56:22 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 31 Oct 2004 15:56:22 -0600 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp EquivClassGraphs.h Message-ID: <200410312156.i9VLuM3b019654@apoc.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: EquivClassGraphs.cpp updated: 1.6 -> 1.7 EquivClassGraphs.h updated: 1.4 -> 1.5 --- Log message: Do not do horrible things to the CBU graphs. In particular, we do NOT own the CBU graphs, copy them instead of hacking on the CBU graphs. Also, instead of forwarding request from ECGraphs clients to the CBU graphs clients, service them ourselves. Finally, remove a broken "optimization" --- Diffs of the changes: (+44 -61) Index: poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp diff -u poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp:1.6 poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp:1.7 --- poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp:1.6 Sun Oct 31 12:13:19 2004 +++ poolalloc/lib/PoolAllocate/EquivClassGraphs.cpp Sun Oct 31 15:56:11 2004 @@ -31,7 +31,8 @@ namespace { RegisterAnalysis X("equivdatastructure", "Equivalence-class Bottom-up Data Structure Analysis"); - Statistic<> NumEquivBUInlines("equivdatastructures", "Number of graphs inlined"); + Statistic<> NumEquivBUInlines("equivdatastructures", + "Number of graphs inlined"); Statistic<> NumFoldGraphInlines("Inline equiv-class graphs bottom up", "Number of graphs inlined"); } @@ -44,19 +45,22 @@ getSomeCalleeForCallSite(const CallSite &CS) const { Function *thisFunc = CS.getCaller(); assert(thisFunc && "getDSGraphForCallSite(): Not a valid call site?"); - DSNode *calleeNode = CBU->getDSGraph(*thisFunc). - getNodeForValue(CS.getCalledValue()).getNode(); + DSGraph &DSG = getDSGraph(*thisFunc); + DSNode *calleeNode = DSG.getNodeForValue(CS.getCalledValue()).getNode(); std::map::const_iterator I = OneCalledFunction.find(calleeNode); return (I == OneCalledFunction.end())? NULL : I->second; } -// computeFoldedGraphs - Calculate the bottom up data structure -// graphs for each function in the program. +// runOnModule - Calculate the bottom up data structure graphs for each function +// in the program. // -void PA::EquivClassGraphs::computeFoldedGraphs(Module &M) { +bool PA::EquivClassGraphs::runOnModule(Module &M) { CBU = &getAnalysis(); + GlobalsGraph = new DSGraph(CBU->getGlobalsGraph()); + GlobalsGraph->setPrintAuxCalls(); + // Find equivalence classes of functions called from common call sites. // Fold the CBU graphs for all functions in an equivalence class. buildIndirectFunctionSets(M); @@ -78,6 +82,7 @@ processSCC(getOrCreateGraph(*I), *I, Stack, NextID, ValMap); getGlobalsGraph().removeTriviallyDeadNodes(); + return false; } @@ -163,9 +168,9 @@ #endif if (EqClass.size() > 1) { - // This equiv class has multiple functions: merge their graphs. - // First, clone the CBU graph for the leader and make it the - // common graph for the equivalence graph. + // This equiv class has multiple functions: merge their graphs. First, + // clone the CBU graph for the leader and make it the common graph for the + // equivalence graph. DSGraph* mergedG = cloneGraph(*LF); // Record the argument nodes for use in merging later below @@ -174,9 +179,9 @@ if (DS::isPointerType(AI1->getType())) GraphInfo.argNodes.push_back(mergedG->getNodeForValue(AI1)); - // Merge in the graphs of all other functions in this equiv. class. - // Note that two or more functions may have the same graph, and it - // only needs to be merged in once. Use a set to find repetitions. + // Merge in the graphs of all other functions in this equiv. class. Note + // that two or more functions may have the same graph, and it only needs + // to be merged in once. Use a set to find repetitions. std::set GraphsMerged; for (std::set::const_iterator EqI = EqClass.begin(), EqEnd = EqClass.end(); EqI != EqEnd; ++EqI) { @@ -227,16 +232,13 @@ DSGraph *&Graph = FoldedGraphsMap[&F]; if (Graph) return *Graph; - // Use the CBU graph directly without copying it. - // This automatically updates the FoldedGraphsMap via the reference. - Graph = &CBU->getDSGraph(F); - return *Graph; + return *cloneGraph(F); } DSGraph *PA::EquivClassGraphs::cloneGraph(Function &F) { DSGraph *&Graph = FoldedGraphsMap[&F]; DSGraph &CBUGraph = CBU->getDSGraph(F); - assert(Graph == NULL || Graph == &CBUGraph && "Cloning a graph twice?"); + assert((Graph == NULL || Graph == &CBUGraph) && "Cloning a graph twice?"); // Copy the CBU graph... Graph = new DSGraph(CBUGraph); // updates the map via reference @@ -326,32 +328,7 @@ hash_set calls; - DSGraph* CallerGraph = sameAsCBUGraph(F) ? NULL : &getOrCreateGraph(F); - - // If the function has not yet been cloned, let's check if any callees - // need to be inlined before cloning it. - // - for (unsigned i=0, e=G.getFunctionCalls().size(); i!=e && !CallerGraph; ++i) { - const DSCallSite &CS = G.getFunctionCalls()[i]; - Instruction *TheCall = CS.getCallSite().getInstruction(); - - // Loop over all potential callees to find the first non-external callee. - // Some inlining is needed if there is such a callee and it has changed. - ActualCalleesTy::const_iterator I, E; - for (tie(I, E) = getActualCallees().equal_range(TheCall); I != E; ++I) - if (!I->second->isExternal() && !sameAsCBUGraph(*I->second)) { - // Ok, the caller does need to be cloned... go ahead and do it now. - // clone the CBU graph for F now because we have not cloned it so far - CallerGraph = cloneGraph(F); - break; - } - } - - if (!CallerGraph) { // No inlining is needed. - DEBUG(std::cerr << " --DONE ProcessGraph for function " << F.getName() - << " (NO INLINING NEEDED)\n"); - return; - } + DSGraph* CallerGraph = &getOrCreateGraph(F); // Else we need to inline some callee graph. Visit all call sites. // The edges out of the current node are the call site targets... @@ -377,7 +354,7 @@ break; // Now check if the graph has changed and if so, clone and inline it. - if (I != E && !sameAsCBUGraph(*I->second)) { + if (I != E) { Function *CalleeFunc = I->second; // Merge the callee's graph into this graph, if not already the same. @@ -427,6 +404,20 @@ CallerGraph->removeDeadNodes(DSGraph::KeepUnreachableGlobals); } + + // When this graph is finalized, clone the globals in the graph into the + // globals graph to make sure it has everything, from all graphs. + DSScalarMap &MainSM = CallerGraph->getScalarMap(); + ReachabilityCloner RC(*CallerGraph->getGlobalsGraph(), *CallerGraph, + DSGraph::StripAllocaBit); + + // Clone everything reachable from globals in the function graph into the + // globals graph. + for (DSScalarMap::global_iterator I = MainSM.global_begin(), + E = MainSM.global_end(); I != E; ++I) + RC.getClonedNH(MainSM[*I]); + + DEBUG(std::cerr << " --DONE ProcessGraph for function " << F.getName() << "\n"); } Index: poolalloc/lib/PoolAllocate/EquivClassGraphs.h diff -u poolalloc/lib/PoolAllocate/EquivClassGraphs.h:1.4 poolalloc/lib/PoolAllocate/EquivClassGraphs.h:1.5 --- poolalloc/lib/PoolAllocate/EquivClassGraphs.h:1.4 Sun Sep 19 23:35:26 2004 +++ poolalloc/lib/PoolAllocate/EquivClassGraphs.h Sun Oct 31 15:56:11 2004 @@ -1,4 +1,4 @@ -//===-- EquivClassGraphs.h - Merge equiv-class graphs & inline bottom-up --===// +//===-- EquivClassGraphs.h - Merge equiv-class graphs -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,14 +7,13 @@ // //===----------------------------------------------------------------------===// // -// This pass is the same as the complete bottom-up graphs, but -// with functions partitioned into equivalence classes and a single merged -// DS graph for all functions in an equivalence class. After this merging, -// graphs are inlined bottom-up on the SCCs of the final (CBU) call graph. +// This pass is the same as the complete bottom-up graphs, but with functions +// partitioned into equivalence classes and a single merged DS graph for all +// functions in an equivalence class. After this merging, graphs are inlined +// bottom-up on the SCCs of the final (CBU) call graph. // //===----------------------------------------------------------------------===// - #include "llvm/Analysis/DataStructure/DataStructure.h" #include "llvm/Analysis/DataStructure/DSGraph.h" #include "llvm/ADT/EquivalenceClasses.h" @@ -49,6 +48,8 @@ struct EquivClassGraphs : public ModulePass { CompleteBUDataStructures *CBU; + DSGraph *GlobalsGraph; + // FoldedGraphsMap, one graph for each function hash_map FoldedGraphsMap; @@ -69,7 +70,7 @@ /// EquivClassGraphs - Computes the equivalence classes and then the /// folded DS graphs for each class. /// - virtual bool runOnModule(Module &M) { computeFoldedGraphs(M); return true; } + virtual bool runOnModule(Module &M); /// getCBUDataStructures - Get the CompleteBUDataStructures object /// @@ -117,15 +118,8 @@ return GraphInfo; } - /// sameAsCBUGraph - Check if the folded graph for this function is - /// the same as the CBU graph. - bool sameAsCBUGraph(const Function &F) const { - DSGraph& foldedGraph = getDSGraph(F); - return (&foldedGraph == &CBU->getDSGraph(F)); - } - DSGraph &getGlobalsGraph() const { - return CBU->getGlobalsGraph(); + return *GlobalsGraph; } typedef llvm::BUDataStructures::ActualCalleesTy ActualCalleesTy; @@ -143,8 +137,6 @@ void print(std::ostream &O, const Module *M) const { CBU->print(O, M); } private: - void computeFoldedGraphs(Module &M); - void buildIndirectFunctionSets(Module &M); unsigned processSCC(DSGraph &FG, Function &F, std::vector &Stack, From lattner at cs.uiuc.edu Sun Oct 31 16:25:34 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 31 Oct 2004 16:25:34 -0600 Subject: [llvm-commits] CVS: llvm-www/testresults/index.html Message-ID: <200410312225.i9VMPYfV020293@apoc.cs.uiuc.edu> Changes in directory llvm-www/testresults: index.html updated: 1.17 -> 1.18 --- Log message: update link info --- Diffs of the changes: (+1 -1) Index: llvm-www/testresults/index.html diff -u llvm-www/testresults/index.html:1.17 llvm-www/testresults/index.html:1.18 --- llvm-www/testresults/index.html:1.17 Mon Oct 18 11:20:00 2004 +++ llvm-www/testresults/index.html Sun Oct 31 16:25:23 2004 @@ -23,7 +23,7 @@

  • X86: Linux (Dual P4 Xeon @ 2.3GHz) -- release build
  • X86: -FreeBSD 5.1 (may not be run every day)
  • +FreeBSD 5.3-RC1 -- debug build
  • PPC: Mac OS X 10.3 "Panther" on PowerPC G5 (dual 1.8Ghz CPU) (CBE and LLC From reid at x10sys.com Sun Oct 31 16:53:17 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 31 Oct 2004 16:53:17 -0600 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200410312253.QAA01137@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.227 -> 1.228 --- Log message: Get the shared library extension right on all platforms, regardless of what Chris wants on his platform. --- Diffs of the changes: (+1 -1) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.227 llvm/Makefile.rules:1.228 --- llvm/Makefile.rules:1.227 Sun Oct 31 15:07:34 2004 +++ llvm/Makefile.rules Sun Oct 31 16:53:06 2004 @@ -452,7 +452,7 @@ all-local:: $(LibName.LA) $(LibName.LA): $(BUILT_SOURCES) $(ObjectsLO) $(LibDir)/.dir - $(Echo) Linking $(Configuration) Shared Library $(LIBRARYNAME).so + $(Echo) Linking $(Configuration) Shared Library $(LIBRARYNAME)$(SHLIBEXT) $(Verb) $(Link) -o $@ $(ObjectsLO) $(Verb) $(LTInstall) $@ $(LibDir) From llvm at cs.uiuc.edu Sun Oct 31 16:59:17 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Sun, 31 Oct 2004 16:59:17 -0600 Subject: [llvm-commits] CVS: llvm/docs/ObjectFiles.html Message-ID: <200410312259.QAA01236@zion.cs.uiuc.edu> Changes in directory llvm/docs: ObjectFiles.html (r1.6) removed --- Log message: Renamed UsingLibraries.html --- Diffs of the changes: (+0 -0) From reid at x10sys.com Sun Oct 31 17:00:35 2004 From: reid at x10sys.com (Reid Spencer) Date: Sun, 31 Oct 2004 17:00:35 -0600 Subject: [llvm-commits] CVS: llvm/docs/UsingLibraries.html Message-ID: <200410312300.RAA01335@zion.cs.uiuc.edu> Changes in directory llvm/docs: UsingLibraries.html updated: 1.6 -> 1.7 --- Log message: * Moved from ObjectFiles.html * Changed names of libraries to reflect new naming scheme * Added some more introductory material * Added a rule of thumb. --- Diffs of the changes: (+99 -237) Index: llvm/docs/UsingLibraries.html diff -u llvm/docs/UsingLibraries.html:1.6 llvm/docs/UsingLibraries.html:1.7 --- llvm/docs/UsingLibraries.html:1.6 Sat Sep 4 22:57:23 2004 +++ llvm/docs/UsingLibraries.html Sun Oct 31 17:00:25 2004 @@ -2,23 +2,15 @@ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> - Object Files: Understanding The Result Of LLVM Compilation + Using The LLVM Libraries - -
    - Object Files: Understanding The Result Of LLVM Compilation -
    - +
    Using The LLVM Libraries
    1. Abstract
    2. Introduction
    3. -
    4. File Contents
    5. +
    6. Library Descriptions
    7. Linkage Rules Of Thumb
      1. Always Link vmcore.o, support.a @@ -34,232 +26,97 @@
        -

        This document describes the contents of the many objects files and libraries -that are produced by compiling LLVM. To make use of LLVM this information is -needed in order to understand what files should be linked into your program. +

        Amongst other things, LLVM is a toolkit for building compilers, linkers, + runtime executives, virtual machines, and other program execution related + tools. In addition to the LLVM tool set, the functionality of LLVM is + available through a set of libraries. To use LLVM as a toolkit for + constructing tools, a developer needs to understand what is contained in the + various libraries, what they depend on, and how to use them. This document + describes the contents of the libraries and how and when to use them.

        +
        -

        If you're writing a compiler, virtual machine, or any other utility for - LLVM, you'll need to figure out which of the many .a (archive) and .o - (object) files you will need to link with to be successful. An - understanding of the contents of these files and their inter-relationships - will be useful in coming up with an optimal specification for the objects - and libraries to link with. -

        -

        The purpose of this document is to hopefully reduce some of the trial and - error that the author experienced in using LLVM. -

        -
        - -
        File Contents
        -
        -

        The table below provides a summary of the basic contents of each file.

        - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +

        If you're writing a compiler, virtual machine, or any other utility based + on LLVM, you'll need to figure out which of the many libraries files you will + need to link with to be successful. An understanding of the contents of these + files and their inter-relationships will be useful in coming up with an optimal + specification for the libraries to link with. The purpose of this document is + to reduce some of the trial and error that the author experienced in using + LLVM.

        +

        LLVM produces two types of libraries: archives (ending in .a) and + objects (ending in .o). However, both are libraries. Libraries ending + in .o are known as re-linked libraries because they contain all the + compilation units of the library linked together as a single .o file. + Furthermore, many of the libraries have both forms of library. The + re-linked libraries are used whenever you want to include all symbols from the + library. The archive libraries are used whenever you want to only resolve + outstanding symbols at that point in the link without including everything in + the library.

        +

        When linking your tools, you will use the LLVMLIBS make variable. + (see the Makefile Guide for + details). This variable specifies which LLVM libraries to link into your tool + and the order in which they will be linked. You specify re-linked libraries by + naming the library without a suffix. You specify archive libraries by naming + the library with a .a suffix but without the lib prefix. The + order in which the libraries appear in the LLVMLIBS variable + definition is the order in which they will be linked. Getting this order + correct for your tool can sometimes be challenging. + + +

        Library Descriptions
        +
        +

        The table below categorizes each library +

        Summary Of LLVM Library And Object Files -

        Library

        Description

        libipo.a - An archive of all interprocedural optimizations. -
        libscalaropts.a - An archive of all scalar optimizations. -
        libtransforms.aUncategorized transformations.
        libtarget.aAn archive containing generic code generator support.
        libanalysis.aAn archive containing intraprocedural analyses.
        libdatastructure.aAn archive containing Data Structure Analysis.
        libinstrument.aIntraprocedural instrumentation and utilities.
        libsparcv9regalloc.aSparcV9 graph-coloring register allocator.
        libipa.aAn archive containing interprocedural analyses
        libtransformutils.aUtility functions for transformations.
        libsupport.aGeneral support utilities

        Object File

        Description

        support.oGeneral support utilities
        asmparser.oAssembler Parser
        bcreader.oBytecode Reader
        bcwriter.oBytecode Writer
        sched.oSparcV9 instruction scheduler
        selectiondag.oAggressive instruction selector for Directed Acyclic Graphs
        transformutils.oUtilities for code transformations
        ipa.oInterprocedural Analyses
        sparcv9select.oSparcV9 instruction selector
        cwriter.o"C" Code Writer
        profpaths.oPath profiling instrumentation
        sparcv9regalloc.oSparcV9 graph-coloring register allocator
        instrument.oIntraprocedural instrumentation and utilities.
        datastructure.oData Structure Analysis
        codegen.oNative code generation
        sparcv9livevar.oSparcV9 Live Variable Analysis
        vmcore.oVirtual Machine Core
        lli-interpreter.oInterpreter for LLVM ByteCode
        lli-jit.o - Just-In-Time Compiler For LLVM ByteCode -
        executionengine.oEngine for LLI
        debugger.oSource Level Debugging Support
        analysis.oGeneral framework for Analysis
        sparcv9.oSparcV9 backend
        target.oGeneric backend support
        transforms.oUncategorized transformations.
        x86.oIntel x86 backend
        powerpc.oPowerPC backend
        scalaropts.oOptimizations For Scalars
        ipo.oInterprocedural Optimizations
        trace.oSupport For Tracing/Debugging?
        profile_rt.oRuntime Library For Profiler
        sample.oSample Program ?
        stkr_compiler.oStacker Language Compiler Library
        stkr_runtime.oStacker Language Runtime Library
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        LibraryFormsDescription
        Core Libraries
        LLVMAsmParser.oLLVM Assembly Parsing
        LLVMBCReader.oLLVM Bytecode Reading
        LLVMBCWriter.oLLVM Bytecode Writing
        LLVMDebugger.oSource Level Debugging Support
        LLVMSupport.a .oGeneral support utilities
        LLVMSystem.a .oOperating system abstraction
        LLVMCore.oLLVM Core IR
        Analysis Libraries
        LLVMAnalysis.a .oVarious analysis passes.
        LLVMDataStructure.a .oData structure analysis passes.
        LLVMipa.a .oInter-procedural analysis passes.
        Transformation Libraries
        LLVMInstrumentation.a .oInstrumentation passes.
        LLVMipo.a .oAll inter-procedural optimization passes.
        LLVMScalarOpts.a .oAll scalar optimization passes.
        LLVMTransforms.a .oUncategorized transformation passes.
        LLVMTransformUtils.a .oTransformation utilities.
        LLVMProfilePaths.oProfile paths for instrumentation.
        Code Generation Libraries
        LLVMCodeGen.oNative code generation infrastructure
        Target Libraries
        LLVMCBackend.o'C' language code generator.
        LLVMPowerPC.oPowerPC code generation backend
        LLVMSelectionDAG.oAggressive instruction selector for Directed Acyclic Graphs.
        LLVMSkeleton.a .oSkeleton for a code generation backend.
        LLVMSparcV9.oCode generation for SparcV9.
        LLVMSparcV9RegAlloc.a .oGraph-coloring register allocator for SparcV9.
        LLVMSparcV9InstrSched.oInstruction scheduling for SparcV9.
        LLVMSparcV9LiveVar.oLive variable analysis SparcV9.
        LLVMSparcV9ModuloSched.oModulo scheduling for SparcV9.
        LLVMTarget.a .oGeneric code generation utilities.
        LLVMX86.oIntel x86 code generation backend
        Runtime Libraries
        LLVMInterpreter.oBytecode Interpreter
        LLVMJIT.oBytecode JIT Compiler
        LLVMExecutionEngine.oVirtual machine engine
        LLVMexecve.oexecve(2) replacement for llee
        -

        +
        @@ -267,23 +124,28 @@ should link into your programs.

        - +
        -

        No matter what you do with LLVM, you'll always need to link with vmcore.o - and support.a.

        +

        No matter what you do with LLVM, the last three entries in your linke line + should always be: LLVMCore LLVMSupport.a LLVMSystem.a.

        - +
        -

        Need more rules of thumb here.

        +

        There is never any point to linking both the re-linked (.o) and + the archive (.a) versions of a library. Since the re-linked version + includes the entire library, the archive version will not resolve any symbols. + You could even end up with link error is you place the archive version before + the re-linked version on the linker's command line.


        +
        Last modified: $Date: 2004/10/31 23:00:25 $
  • -
    LLVM-Related Publications
    +
    Publications about LLVM
      @@ -24,7 +24,27 @@
    1. "LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation"
      Chris Lattner & Vikram Adve. Technical Report #UIUCDCS-R-2003-2380, Computer -Science Dept., Univ. of Illinois, Sep. 2003. (to appear in CGO'04) +Science Dept., Univ. of Illinois, Sep. 2003.
    2. + +
    3. "Architecture For a Next-Generation +GCC"
      Chris Lattner & Vikram Adve, First Annual GCC Developers' +Summit, Ottawa, Canada, May 2003.
    4. + +
    5. "LLVM: An Infrastructure for +Multi-Stage Optimization"
      Chris Lattner. Masters Thesis, Dec. +2002
    6. + +
    7. "The LLVM Instruction Set +and Compilation Strategy"
      Chris Lattner & Vikram Adve, Technical +Report #UIUCDCS-R-2002-2292, Computer Science Dept., Univ. of Illinois, Aug. +2002.
    8. + +
    + +
    Publications using LLVM
    + +
    1. "Lightweight, Cross-Procedure Tracing for Runtime Optimization"
      Anand Shukla. Masters Thesis, @@ -40,20 +60,11 @@ Languages Compilers and Tools for Embedded Systems 2003 (LCTES 03), San Diego, CA, June 2003.
    2. -
    3. "Architecture For a Next-Generation -GCC"
      Chris Lattner & Vikram Adve, First Annual GCC Developers' -Summit, Ottawa, Canada, May 2003.
    4. -
    5. "Data Structure Analysis: An Efficient Context-Sensitive Heap Analysis"
      Chris Lattner & Vikram Adve, Technical Report #UIUCDCS-R-2003-2340, Computer Science Dept., Univ. of Illinois, Apr. 2003.
    6. -
    7. "LLVM: An Infrastructure for -Multi-Stage Optimization"
      Chris Lattner. Masters Thesis, Dec. -2002
    8. -
    9. "Ensuring Code Safety Without Runtime Checks for Real-Time Control Systems"
      Sumant Kowshik, Dinakar Dhurjati, and Vikram Adve. , Grenoble, France, Oct. 2002.
    10. -
    11. "The LLVM Instruction Set -and Compilation Strategy"
      Chris Lattner & Vikram Adve, Technical -Report #UIUCDCS-R-2002-2292, Computer Science Dept., Univ. of Illinois, Aug. -2002.
    12. -
    13. "Automatic Pool Allocation for Disjoint Data Structures,"
      Chris Lattner & Vikram Adve, ACM SIGPLAN Workshop From lattner at cs.uiuc.edu Sun Oct 31 20:26:26 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 31 Oct 2004 20:26:26 -0600 Subject: [llvm-commits] CVS: llvm-www/pubs/2004-Spring-AlexanderssonMSThesis.html index.html Message-ID: <200411010226.iA12QQip029427@apoc.cs.uiuc.edu> Changes in directory llvm-www/pubs: 2004-Spring-AlexanderssonMSThesis.html updated: 1.1 -> 1.2 index.html updated: 1.9 -> 1.10 --- Log message: Add Ander's thesis, make a: work right, rearrange and split up the pubs list. --- Diffs of the changes: (+6 -1) Index: llvm-www/pubs/2004-Spring-AlexanderssonMSThesis.html diff -u llvm-www/pubs/2004-Spring-AlexanderssonMSThesis.html:1.1 llvm-www/pubs/2004-Spring-AlexanderssonMSThesis.html:1.2 --- llvm-www/pubs/2004-Spring-AlexanderssonMSThesis.html:1.1 Sun Oct 31 20:21:09 2004 +++ llvm-www/pubs/2004-Spring-AlexanderssonMSThesis.html Sun Oct 31 20:26:16 2004 @@ -30,7 +30,7 @@
      "RubyComp - A Ruby-to-LLVM Compiler Prototype", Anders Alexandersson.
      Masters Thesis, Division of Computer Science at the Department of - Informatics and Mathematics, University of Trollh?ttan/Uddevalla, Sweden + Informatics and Mathematics, University of Trollhättan/Uddevalla, Sweden

      Download:

      Index: llvm-www/pubs/index.html diff -u llvm-www/pubs/index.html:1.9 llvm-www/pubs/index.html:1.10 --- llvm-www/pubs/index.html:1.9 Sun Oct 31 20:21:09 2004 +++ llvm-www/pubs/index.html Sun Oct 31 20:26:16 2004 @@ -46,6 +46,11 @@
        +
      1. "RubyComp - A Ruby-to-LLVM +Compiler Prototype"
        Anders Alexandersson. Masters Thesis, +Division of Computer Science at the Department of Informatics and Mathematics, +University of Trollhättan/Uddevalla, Sweden, Sprint 2004
      2. +
      3. "Lightweight, Cross-Procedure Tracing for Runtime Optimization"
        Anand Shukla. Masters Thesis, July 2003
      4. From lattner at cs.uiuc.edu Sun Oct 31 20:28:38 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun, 31 Oct 2004 20:28:38 -0600 Subject: [llvm-commits] CVS: llvm-www/ProjectsWithLLVM/index.html 2004-Spring-RubyComp.pdf Message-ID: <200411010228.iA12ScG6029452@apoc.cs.uiuc.edu> Changes in directory llvm-www/ProjectsWithLLVM: index.html updated: 1.20 -> 1.21 2004-Spring-RubyComp.pdf (r1.1) removed --- Log message: Move this to the pubs list --- Diffs of the changes: (+0 -39) Index: llvm-www/ProjectsWithLLVM/index.html diff -u llvm-www/ProjectsWithLLVM/index.html:1.20 llvm-www/ProjectsWithLLVM/index.html:1.21 --- llvm-www/ProjectsWithLLVM/index.html:1.20 Wed Sep 29 13:39:02 2004 +++ llvm-www/ProjectsWithLLVM/index.html Sun Oct 31 20:28:28 2004 @@ -33,7 +33,6 @@