From owner-svn-src-vendor@FreeBSD.ORG Tue May 22 21:30:24 2012 Return-Path: Delivered-To: svn-src-vendor@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4D811065672; Tue, 22 May 2012 21:30:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 85F638FC0C; Tue, 22 May 2012 21:30:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4MLUOYc028549; Tue, 22 May 2012 21:30:24 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4MLUOLP028544; Tue, 22 May 2012 21:30:24 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201205222130.q4MLUOLP028544@svn.freebsd.org> From: Dimitry Andric Date: Tue, 22 May 2012 21:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235807 - in vendor/llvm/dist: . autoconf docs lib/CodeGen/SelectionDAG X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2012 21:30:24 -0000 Author: dim Date: Tue May 22 21:30:23 2012 New Revision: 235807 URL: http://svn.freebsd.org/changeset/base/235807 Log: Vendor import of llvm release_31 final r156748: http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_31/final@156748 Modified: vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/configure vendor/llvm/dist/docs/ReleaseNotes.html vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Modified: vendor/llvm/dist/autoconf/configure.ac ============================================================================== --- vendor/llvm/dist/autoconf/configure.ac Tue May 22 20:26:14 2012 (r235806) +++ vendor/llvm/dist/autoconf/configure.ac Tue May 22 21:30:23 2012 (r235807) @@ -31,7 +31,7 @@ dnl=== dnl===-----------------------------------------------------------------------=== dnl Initialize autoconf and define the package name, version number and dnl address for reporting bugs. -AC_INIT([LLVM],[3.1svn],[http://llvm.org/bugs/]) +AC_INIT([LLVM],[3.1],[http://llvm.org/bugs/]) AC_DEFINE([LLVM_VERSION_MAJOR], [3], [Major version of the LLVM API]) AC_DEFINE([LLVM_VERSION_MINOR], [1], [Minor version of the LLVM API]) Modified: vendor/llvm/dist/configure ============================================================================== --- vendor/llvm/dist/configure Tue May 22 20:26:14 2012 (r235806) +++ vendor/llvm/dist/configure Tue May 22 21:30:23 2012 (r235807) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.60 for LLVM 3.1svn. +# Generated by GNU Autoconf 2.60 for LLVM 3.1. # # Report bugs to . # @@ -561,8 +561,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='LLVM' PACKAGE_TARNAME='llvm' -PACKAGE_VERSION='3.1svn' -PACKAGE_STRING='LLVM 3.1svn' +PACKAGE_VERSION='3.1' +PACKAGE_STRING='LLVM 3.1' PACKAGE_BUGREPORT='http://llvm.org/bugs/' ac_unique_file="lib/VMCore/Module.cpp" @@ -1318,7 +1318,7 @@ if test "$ac_init_help" = "long"; then # 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 3.1svn to adapt to many kinds of systems. +\`configure' configures LLVM 3.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1384,7 +1384,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of LLVM 3.1svn:";; + short | recursive ) echo "Configuration of LLVM 3.1:";; esac cat <<\_ACEOF @@ -1532,7 +1532,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -LLVM configure 3.1svn +LLVM configure 3.1 generated by GNU Autoconf 2.60 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1548,7 +1548,7 @@ cat >config.log <<_ACEOF 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 3.1svn, which was +It was created by LLVM $as_me 3.1, which was generated by GNU Autoconf 2.60. Invocation command line was $ $0 $@ @@ -21785,7 +21785,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by LLVM $as_me 3.1svn, which was +This file was extended by LLVM $as_me 3.1, which was generated by GNU Autoconf 2.60. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21838,7 +21838,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -LLVM config.status 3.1svn +LLVM config.status 3.1 configured by $0, generated by GNU Autoconf 2.60, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Modified: vendor/llvm/dist/docs/ReleaseNotes.html ============================================================================== --- vendor/llvm/dist/docs/ReleaseNotes.html Tue May 22 20:26:14 2012 (r235806) +++ vendor/llvm/dist/docs/ReleaseNotes.html Tue May 22 21:30:23 2012 (r235807) @@ -3,7 +3,7 @@ - + LLVM 3.1 Release Notes @@ -96,6 +96,7 @@ Release Notes.

In the LLVM 3.1 time-frame, the Clang team has made many improvements:

    +
  • C++11 support is greatly expanded including lambdas, initializer lists, constexpr, user-defined literals, and atomics.
  • ...
@@ -119,17 +120,30 @@ Release Notes.

DragonEgg is a gcc plugin that replaces GCC's - optimizers and code generators with LLVM's. It works with gcc-4.5 or gcc-4.6, - targets the x86-32 and x86-64 processor families, and has been successfully - used on the Darwin, FreeBSD, KFreeBSD, Linux and OpenBSD platforms. It fully - supports Ada, C, C++ and Fortran. It has partial support for Go, Java, Obj-C - and Obj-C++.

+ optimizers and code generators with LLVM's. It works with gcc-4.5 and gcc-4.6 + (and partially with gcc-4.7), can target the x86-32/x86-64 and ARM processor + families, and has been successfully used on the Darwin, FreeBSD, KFreeBSD, + Linux and OpenBSD platforms. It fully supports Ada, C, C++ and Fortran. It + has partial support for Go, Java, Obj-C and Obj-C++.

The 3.1 release has the following notable changes:

    -
  • ...
  • +
  • Partial support for gcc-4.7. Ada support is poor, but other languages work + fairly well.
  • + +
  • Support for ARM processors. Some essential gcc headers that are needed to + build DragonEgg for ARM are not installed by gcc. To work around this, + copy the missing headers from the gcc source tree.
  • + +
  • Better optimization for Fortran by exploiting the fact that Fortran scalar + arguments have 'restrict' semantics.
  • + +
  • Better optimization for all languages by passing information about type + aliasing and type ranges to the LLVM optimizers.
  • + +
  • A regression test-suite was added.
@@ -250,7 +264,21 @@ Release Notes. a lot of other language and tools projects. This section lists some of the projects that have already been updated to work with LLVM 3.1.

- ... to be filled in right before the release ... +

Pure

+ +

Pure (http://pure-lang.googlecode.com/) is an algebraic/functional +programming language based on term rewriting. Programs are collections of +equations which are used to evaluate expressions in a symbolic fashion. The +interpreter uses LLVM as a backend to JIT-compile Pure programs to fast native +code. Pure offers dynamic typing, eager and lazy evaluation, lexical closures, a +hygienic macro system (also based on term rewriting), built-in list and matrix +support (including list and matrix comprehensions) and an easy-to-use interface +to C and other programming languages (including the ability to load LLVM bitcode +modules, and inline C, C++, Fortran and Faust code in Pure programs if the +corresponding LLVM-enabled compilers are installed).

+ +

Pure version 0.54 has been tested and is known to work with LLVM 3.1 (and +continues to work with older LLVM releases >= 2.5).

@@ -536,6 +564,9 @@ syntax, there are still significant gaps
  • The unwind instruction is now gone. With the introduction of the new exception handling system in LLVM 3.0, the unwind instruction became obsolete.
  • +
  • LLVM 3.0 and earlier automatically added the returns_twice fo functions + like setjmp based on the name. This functionality was removed in 3.1. + This affects Clang users, if -ffreestanding is used.
  • ....
  • @@ -604,6 +635,7 @@ syntax, there are still significant gaps
    • llvm-stress is a command line tool for generating random .ll files to fuzz different LLVM components.
    • +
    • llvm-ld has been removed. Use llvm-link or Clang instead.
    • ....
    @@ -682,7 +714,7 @@ syntax, there are still significant gaps src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> LLVM Compiler Infrastructure
    - Last modified: $Date: 2012-04-17 03:13:53 +0200 (Tue, 17 Apr 2012) $ + Last modified: $Date: 2012-05-13 12:04:01 +0200 (Sun, 13 May 2012) $ Modified: vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp ============================================================================== --- vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Tue May 22 20:26:14 2012 (r235806) +++ vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Tue May 22 21:30:23 2012 (r235807) @@ -131,30 +131,16 @@ static void CheckForPhysRegDependency(SD } } -static void AddGlue(SDNode *N, SDValue Glue, bool AddGlue, SelectionDAG *DAG) { - SmallVector VTs; - SDNode *GlueDestNode = Glue.getNode(); - - // Don't add glue from a node to itself. - if (GlueDestNode == N) return; - - // Don't add glue to something that already has it, either as a use or value. - if (N->getOperand(N->getNumOperands()-1).getValueType() == MVT::Glue || - N->getValueType(N->getNumValues() - 1) == MVT::Glue) { - return; - } - for (unsigned I = 0, E = N->getNumValues(); I != E; ++I) - VTs.push_back(N->getValueType(I)); - - if (AddGlue) - VTs.push_back(MVT::Glue); - +// Helper for AddGlue to clone node operands. +static void CloneNodeWithValues(SDNode *N, SelectionDAG *DAG, + SmallVectorImpl &VTs, + SDValue ExtraOper = SDValue()) { SmallVector Ops; for (unsigned I = 0, E = N->getNumOperands(); I != E; ++I) Ops.push_back(N->getOperand(I)); - if (GlueDestNode) - Ops.push_back(Glue); + if (ExtraOper.getNode()) + Ops.push_back(ExtraOper); SDVTList VTList = DAG->getVTList(&VTs[0], VTs.size()); MachineSDNode::mmo_iterator Begin = 0, End = 0; @@ -173,6 +159,46 @@ static void AddGlue(SDNode *N, SDValue G MN->setMemRefs(Begin, End); } +static bool AddGlue(SDNode *N, SDValue Glue, bool AddGlue, SelectionDAG *DAG) { + SmallVector VTs; + SDNode *GlueDestNode = Glue.getNode(); + + // Don't add glue from a node to itself. + if (GlueDestNode == N) return false; + + // Don't add a glue operand to something that already uses glue. + if (GlueDestNode && + N->getOperand(N->getNumOperands()-1).getValueType() == MVT::Glue) { + return false; + } + // Don't add glue to something that already has a glue value. + if (N->getValueType(N->getNumValues() - 1) == MVT::Glue) return false; + + for (unsigned I = 0, E = N->getNumValues(); I != E; ++I) + VTs.push_back(N->getValueType(I)); + + if (AddGlue) + VTs.push_back(MVT::Glue); + + CloneNodeWithValues(N, DAG, VTs, Glue); + + return true; +} + +// Cleanup after unsuccessful AddGlue. Use the standard method of morphing the +// node even though simply shrinking the value list is sufficient. +static void RemoveUnusedGlue(SDNode *N, SelectionDAG *DAG) { + assert((N->getValueType(N->getNumValues() - 1) == MVT::Glue && + !N->hasAnyUseOfValue(N->getNumValues() - 1)) && + "expected an unused glue value"); + + SmallVector VTs; + for (unsigned I = 0, E = N->getNumValues()-1; I != E; ++I) + VTs.push_back(N->getValueType(I)); + + CloneNodeWithValues(N, DAG, VTs); +} + /// ClusterNeighboringLoads - Force nearby loads together by "gluing" them. /// This function finds loads of the same base and different offsets. If the /// offsets are not far apart (target specific), it add MVT::Glue inputs and @@ -240,19 +266,23 @@ void ScheduleDAGSDNodes::ClusterNeighbor // Cluster loads by adding MVT::Glue outputs and inputs. This also // ensure they are scheduled in order of increasing addresses. SDNode *Lead = Loads[0]; - AddGlue(Lead, SDValue(0, 0), true, DAG); - - SDValue InGlue = SDValue(Lead, Lead->getNumValues() - 1); + SDValue InGlue = SDValue(0, 0); + if (AddGlue(Lead, InGlue, true, DAG)) + InGlue = SDValue(Lead, Lead->getNumValues() - 1); for (unsigned I = 1, E = Loads.size(); I != E; ++I) { bool OutGlue = I < E - 1; SDNode *Load = Loads[I]; - AddGlue(Load, InGlue, OutGlue, DAG); + // If AddGlue fails, we could leave an unsused glue value. This should not + // cause any + if (AddGlue(Load, InGlue, OutGlue, DAG)) { + if (OutGlue) + InGlue = SDValue(Load, Load->getNumValues() - 1); - if (OutGlue) - InGlue = SDValue(Load, Load->getNumValues() - 1); - - ++LoadsClustered; + ++LoadsClustered; + } + else if (!OutGlue && InGlue.getNode()) + RemoveUnusedGlue(InGlue.getNode(), DAG); } }