Date: Tue, 22 May 2012 21:30:24 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r235807 - in vendor/llvm/dist: . autoconf docs lib/CodeGen/SelectionDAG Message-ID: <201205222130.q4MLUOLP028544@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <http://llvm.org/bugs/>. # @@ -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 <bug-autoconf@gnu.org>." _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 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> - <link rel="stylesheet" href="llvm.css" type="text/css"> + <link rel="stylesheet" href="_static/llvm.css" type="text/css"> <title>LLVM 3.1 Release Notes</title> </head> <body> @@ -96,6 +96,7 @@ Release Notes</a>.</h1> <p>In the LLVM 3.1 time-frame, the Clang team has made many improvements:</p> <ul> + <li>C++11 support is greatly expanded including lambdas, initializer lists, constexpr, user-defined literals, and atomics.</li> <li>...</li> </ul> @@ -119,17 +120,30 @@ Release Notes</a>.</h1> <div> <p><a href="http://dragonegg.llvm.org/">DragonEgg</a> is a <a href="http://gcc.gnu.org/wiki/plugins">gcc plugin</a> 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++.</p> + 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++.</p> <p>The 3.1 release has the following notable changes:</p> <ul> - <li>...</li> + <li>Partial support for gcc-4.7. Ada support is poor, but other languages work + fairly well.</li> + + <li>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.</li> + + <li>Better optimization for Fortran by exploiting the fact that Fortran scalar + arguments have 'restrict' semantics.</li> + + <li>Better optimization for all languages by passing information about type + aliasing and type ranges to the LLVM optimizers.</li> + + <li>A regression test-suite was added.</li> </ul> @@ -250,7 +264,21 @@ Release Notes</a>.</h1> 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.</p> - ... to be filled in right before the release ... +<h3>Pure</h3> + +<p>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).</p> + +<p>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).</p> </div> @@ -536,6 +564,9 @@ syntax, there are still significant gaps <li>The <tt>unwind</tt> instruction is now gone. With the introduction of the new exception handling system in LLVM 3.0, the <tt>unwind</tt> instruction became obsolete.</li> + <li>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.</li> <li>....</li> </ul> @@ -604,6 +635,7 @@ syntax, there are still significant gaps <ul> <li>llvm-stress is a command line tool for generating random .ll files to fuzz different LLVM components. </li> + <li>llvm-ld has been removed. Use llvm-link or Clang instead.</li> <li>....</li> </ul> @@ -682,7 +714,7 @@ syntax, there are still significant gaps src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a> <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br> - 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) $ </address> </body> 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<EVT, 4> 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<EVT> &VTs, + SDValue ExtraOper = SDValue()) { SmallVector<SDValue, 4> 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<EVT, 4> 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<EVT, 4> 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); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205222130.q4MLUOLP028544>