aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-05-22 21:30:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-05-22 21:30:23 +0000
commit887c359eb051bdc13c2fdbb3e943a87b453893ac (patch)
treeda160ab560c031316b2d9c664e8fd04f1f0077e6
parentb61ab53cb789e568acbb2952fbead20ab853a696 (diff)
downloadsrc-887c359eb051bdc13c2fdbb3e943a87b453893ac.tar.gz
src-887c359eb051bdc13c2fdbb3e943a87b453893ac.zip
Vendor import of llvm release_31 final r156748:vendor/llvm/llvm-release_31-r156748
Notes
Notes: svn path=/vendor/llvm/dist/; revision=235807 svn path=/vendor/llvm/llvm-release_31-r156748/; revision=235808; tag=vendor/llvm/llvm-release_31-r156748
-rw-r--r--autoconf/configure.ac2
-rwxr-xr-xconfigure18
-rw-r--r--docs/ReleaseNotes.html50
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp86
4 files changed, 109 insertions, 47 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 51f89217a9f6..e487597463d3 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -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])
diff --git a/configure b/configure
index efa80dbeb952..a4c1592c8a3b 100755
--- a/configure
+++ b/configure
@@ -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'`\\"
diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html
index 3b5c2e65a9d1..3d5b0adf0e37 100644
--- a/docs/ReleaseNotes.html
+++ b/docs/ReleaseNotes.html
@@ -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 in that support.</p>
<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 in that support.</p>
<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 in that support.</p>
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>
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
index 8ec1ae8620f7..748668cdf674 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
@@ -131,30 +131,16 @@ static void CheckForPhysRegDependency(SDNode *Def, SDNode *User, unsigned Op,
}
}
-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 Glue, bool AddGlue, SelectionDAG *DAG) {
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::ClusterNeighboringLoads(SDNode *Node) {
// 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);
}
}