[llvm-branch-commits] [cfe-branch] r278374 - Merging r276900:

2016-08-11 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Aug 11 13:13:48 2016
New Revision: 278374

URL: http://llvm.org/viewvc/llvm-project?rev=278374&view=rev
Log:
Merging r276900:

r276900 | epilk | 2016-07-27 11:25:10 -0700 (Wed, 27 Jul 2016) | 5 lines

[Sema] Teach getCurrentThisType to reconize lambda in in-class initializer

Fixes PR27994, a crash on valid.

Differential revision: https://reviews.llvm.org/D21145


Modified:
cfe/branches/release_39/   (props changed)
cfe/branches/release_39/lib/Sema/SemaExprCXX.cpp
cfe/branches/release_39/test/SemaCXX/lambda-expressions.cpp

Propchange: cfe/branches/release_39/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 11 13:13:48 2016
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:275880,275967,276102,276350,276361,276473,276653,276716,276887,276891,276979,276983,277095,277138,277141,277221,277307,277743,277796-277797,277866,277889,277900,278139,278234-278235
+/cfe/trunk:275880,275967,276102,276350,276361,276473,276653,276716,276887,276891,276900,276979,276983,277095,277138,277141,277221,277307,277743,277796-277797,277866,277889,277900,278139,278234-278235
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_39/lib/Sema/SemaExprCXX.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/lib/Sema/SemaExprCXX.cpp?rev=278374&r1=278373&r2=278374&view=diff
==
--- cfe/branches/release_39/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/branches/release_39/lib/Sema/SemaExprCXX.cpp Thu Aug 11 13:13:48 2016
@@ -961,32 +961,26 @@ static QualType adjustCVQualifiersForCXX
 QualType Sema::getCurrentThisType() {
   DeclContext *DC = getFunctionLevelDeclContext();
   QualType ThisTy = CXXThisTypeOverride;
+
   if (CXXMethodDecl *method = dyn_cast(DC)) {
 if (method && method->isInstance())
   ThisTy = method->getThisType(Context);
   }
-  if (ThisTy.isNull()) {
-if (isGenericLambdaCallOperatorSpecialization(CurContext) &&
-CurContext->getParent()->getParent()->isRecord()) {
-  // This is a generic lambda call operator that is being instantiated
-  // within a default initializer - so use the enclosing class as 'this'.
-  // There is no enclosing member function to retrieve the 'this' pointer
-  // from.
-
-  // FIXME: This looks wrong. If we're in a lambda within a lambda within a
-  // default member initializer, we need to recurse up more parents to find
-  // the right context. Looks like we should be walking up to the parent of
-  // the closure type, checking whether that is itself a lambda, and if so,
-  // recursing, until we reach a class or a function that isn't a lambda
-  // call operator. And we should accumulate the constness of *this on the
-  // way.
-
-  QualType ClassTy = Context.getTypeDeclType(
-  cast(CurContext->getParent()->getParent()));
-  // There are no cv-qualifiers for 'this' within default initializers, 
-  // per [expr.prim.general]p4.
-  ThisTy = Context.getPointerType(ClassTy);
-}
+
+  if (ThisTy.isNull() && isLambdaCallOperator(CurContext) &&
+  !ActiveTemplateInstantiations.empty()) {
+
+assert(isa(DC) &&
+   "Trying to get 'this' type from static method?");
+
+// This is a lambda call operator that is being instantiated as a default
+// initializer. DC must point to the enclosing class type, so we can 
recover
+// the 'this' type from it.
+
+QualType ClassTy = Context.getTypeDeclType(cast(DC));
+// There are no cv-qualifiers for 'this' within default initializers,
+// per [expr.prim.general]p4.
+ThisTy = Context.getPointerType(ClassTy);
   }
 
   // If we are within a lambda's call operator, the cv-qualifiers of 'this'

Modified: cfe/branches/release_39/test/SemaCXX/lambda-expressions.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/test/SemaCXX/lambda-expressions.cpp?rev=278374&r1=278373&r2=278374&view=diff
==
--- cfe/branches/release_39/test/SemaCXX/lambda-expressions.cpp (original)
+++ cfe/branches/release_39/test/SemaCXX/lambda-expressions.cpp Thu Aug 11 
13:13:48 2016
@@ -1,5 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -Wno-unused-value -fsyntax-only -verify -fblocks 
%s
-// RUN: %clang_cc1 -std=c++1y -Wno-unused-value -fsyntax-only -verify -fblocks 
%s
+// RUN: %clang_cc1 -std=c++14 -Wno-unused-value -fsyntax-only -verify -fblocks 
%s
 
 namespace std { class type_info; };
 
@@ -499,3 +498,30 @@ void foo() {
   };
 }
 }
+
+namespace PR27994 {
+struct A { template  A(T); };
+
+template 
+struct B {
+  int x;
+  A a = [&] { int y = x; };
+  A b = [&] { [&] 

[llvm-branch-commits] [cfe-branch] r278376 - Merging r277522:

2016-08-11 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Aug 11 13:16:47 2016
New Revision: 278376

URL: http://llvm.org/viewvc/llvm-project?rev=278376&view=rev
Log:
Merging r277522:

r277522 | dcoughlin | 2016-08-02 14:07:23 -0700 (Tue, 02 Aug 2016) | 8 lines

[CFG] Fix crash finding destructor of lifetime-extended temporary.

Fix a crash under -Wthread-safety when finding the destructor for a
lifetime-extending reference.

A patch by Nandor Licker!

Differential Revision: https://reviews.llvm.org/D22419


Modified:
cfe/branches/release_39/   (props changed)
cfe/branches/release_39/lib/Analysis/CFG.cpp
cfe/branches/release_39/test/SemaCXX/warn-thread-safety-analysis.cpp

Propchange: cfe/branches/release_39/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 11 13:16:47 2016
@@ -1,4 +1,4 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:275880,275967,276102,276350,276361,276473,276653,276716,276887,276891,276900,276979,276983,277095,277138,277141,277221,277307,277743,277796-277797,277866,277889,277900,278139,278234-278235
+/cfe/trunk:275880,275967,276102,276350,276361,276473,276653,276716,276887,276891,276900,276979,276983,277095,277138,277141,277221,277307,277522,277743,277796-277797,277866,277889,277900,278139,278234-278235
 /cfe/trunk/test:170344
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_39/lib/Analysis/CFG.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/lib/Analysis/CFG.cpp?rev=278376&r1=278375&r2=278376&view=diff
==
--- cfe/branches/release_39/lib/Analysis/CFG.cpp (original)
+++ cfe/branches/release_39/lib/Analysis/CFG.cpp Thu Aug 11 13:16:47 2016
@@ -3902,7 +3902,17 @@ CFGImplicitDtor::getDestructorDecl(ASTCo
 case CFGElement::AutomaticObjectDtor: {
   const VarDecl *var = castAs().getVarDecl();
   QualType ty = var->getType();
-  ty = ty.getNonReferenceType();
+
+  // FIXME: See CFGBuilder::addLocalScopeForVarDecl.
+  //
+  // Lifetime-extending constructs are handled here. This works for a 
single
+  // temporary in an initializer expression.
+  if (ty->isReferenceType()) {
+if (const Expr *Init = var->getInit()) {
+  ty = getReferenceInitTemporaryType(astContext, Init);
+}
+  }
+
   while (const ArrayType *arrayType = astContext.getAsArrayType(ty)) {
 ty = arrayType->getElementType();
   }

Modified: cfe/branches/release_39/test/SemaCXX/warn-thread-safety-analysis.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/test/SemaCXX/warn-thread-safety-analysis.cpp?rev=278376&r1=278375&r2=278376&view=diff
==
--- cfe/branches/release_39/test/SemaCXX/warn-thread-safety-analysis.cpp 
(original)
+++ cfe/branches/release_39/test/SemaCXX/warn-thread-safety-analysis.cpp Thu 
Aug 11 13:16:47 2016
@@ -5160,6 +5160,21 @@ void test3() {
 }  // end namespace  GlobalAcquiredBeforeAfterTest
 
 
+namespace LifetimeExtensionText {
+
+struct Holder {
+  virtual ~Holder() throw() {}
+  int i = 0;
+};
+
+void test() {
+  // Should not crash.
+  const auto &value = Holder().i;
+}
+
+} // end namespace LifetimeExtensionTest
+
+
 namespace LockableUnions {
 
 union LOCKABLE MutexUnion {


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r277462 - Merging r277457

2016-08-11 Thread Diana Picus via llvm-branch-commits
Author: rovka
Date: Tue Aug  2 09:34:15 2016
New Revision: 277462

URL: http://llvm.org/viewvc/llvm-project?rev=277462&view=rev
Log:
Merging r277457

[clang-cl] Fix PCH tests to use x86_64 as target

These tests require x86-registered-target, but they don't force the target as
x86 on the command line, which means they will be run and they might fail when
building the x86 backend on another platform (such as AArch64).

Fixes https://llvm.org/bugs/show_bug.cgi?id=28797

Modified:
cfe/branches/release_39/test/Driver/cl-pch-errorhandling.cpp
cfe/branches/release_39/test/Driver/cl-pch-search.cpp
cfe/branches/release_39/test/Driver/cl-pch-showincludes.cpp

Modified: cfe/branches/release_39/test/Driver/cl-pch-errorhandling.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/test/Driver/cl-pch-errorhandling.cpp?rev=277462&r1=277461&r2=277462&view=diff
==
--- cfe/branches/release_39/test/Driver/cl-pch-errorhandling.cpp (original)
+++ cfe/branches/release_39/test/Driver/cl-pch-errorhandling.cpp Tue Aug  2 
09:34:15 2016
@@ -6,7 +6,7 @@
 // code generation, which makes this test require an x86 backend.
 // REQUIRES: x86-registered-target
 
-// RUN: not %clang_cl -Werror /Yc%S/Inputs/pchfile.h /FI%S/Inputs/pchfile.h 
/Fp%t.pch /c -DERR_HEADER -- %s 2>&1 \
+// RUN: not %clang_cl -Werror --target=x86_64 /Yc%S/Inputs/pchfile.h 
/FI%S/Inputs/pchfile.h /Fp%t.pch /c -DERR_HEADER -- %s 2>&1 \
 // RUN:   | FileCheck %s
 
 // CHECK: nope1

Modified: cfe/branches/release_39/test/Driver/cl-pch-search.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/test/Driver/cl-pch-search.cpp?rev=277462&r1=277461&r2=277462&view=diff
==
--- cfe/branches/release_39/test/Driver/cl-pch-search.cpp (original)
+++ cfe/branches/release_39/test/Driver/cl-pch-search.cpp Tue Aug  2 09:34:15 
2016
@@ -3,4 +3,4 @@
 
 // REQUIRES: x86-registered-target
 // Check that pchfile.h next to to pchfile.cc is found correctly.
-// RUN: %clang_cl -Werror /Ycpchfile.h /FIpchfile.h /c /Fo%t.obj /Fp%t.pch -- 
%S/Inputs/pchfile.cpp 
+// RUN: %clang_cl -Werror --target=x86_64 /Ycpchfile.h /FIpchfile.h /c 
/Fo%t.obj /Fp%t.pch -- %S/Inputs/pchfile.cpp

Modified: cfe/branches/release_39/test/Driver/cl-pch-showincludes.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/test/Driver/cl-pch-showincludes.cpp?rev=277462&r1=277461&r2=277462&view=diff
==
--- cfe/branches/release_39/test/Driver/cl-pch-showincludes.cpp (original)
+++ cfe/branches/release_39/test/Driver/cl-pch-showincludes.cpp Tue Aug  2 
09:34:15 2016
@@ -8,14 +8,14 @@
 
 // When building the pch, header1.h (included by header2.h), header2.h (the pch
 // input itself) and header3.h (included directly, above) should be printed.
-// RUN: %clang_cl -Werror /showIncludes /I%S/Inputs /Ycheader2.h /FIheader2.h 
/Fp%t.pch /c /Fo%t -- %s \
+// RUN: %clang_cl -Werror --target=x86_64 /showIncludes /I%S/Inputs 
/Ycheader2.h /FIheader2.h /Fp%t.pch /c /Fo%t -- %s \
 // RUN:   | FileCheck --strict-whitespace -check-prefix=CHECK-YC %s
 // CHECK-YC: Note: including file: {{[^ ]*header2.h}}
 // CHECK-YC: Note: including file:  {{[^ ]*header1.h}}
 // CHECK-YC: Note: including file: {{[^ ]*header3.h}}
 
 // When using the pch, only the direct include is printed.
-// RUN: %clang_cl -Werror /showIncludes /I%S/Inputs /Yuheader2.h /FIheader2.h 
/Fp%t.pch /c /Fo%t -- %s \
+// RUN: %clang_cl -Werror --target=x86_64 /showIncludes /I%S/Inputs 
/Yuheader2.h /FIheader2.h /Fp%t.pch /c /Fo%t -- %s \
 // RUN:   | FileCheck --strict-whitespace -check-prefix=CHECK-YU %s
 // CHECK-YU-NOT: Note: including file: {{.*pch}}
 // CHECK-YU-NOT: Note: including file: {{.*header1.h}}
@@ -23,7 +23,7 @@
 // CHECK-YU: Note: including file: {{[^ ]*header3.h}}
 
 // When not using pch at all, all the /FI files are printed.
-// RUN: %clang_cl -Werror /showIncludes /I%S/Inputs /FIheader2.h /c /Fo%t -- 
%s \
+// RUN: %clang_cl -Werror --target=x86_64 /showIncludes /I%S/Inputs 
/FIheader2.h /c /Fo%t -- %s \
 // RUN:   | FileCheck --strict-whitespace -check-prefix=CHECK-FI %s
 // CHECK-FI: Note: including file: {{[^ ]*header2.h}}
 // CHECK-FI: Note: including file:  {{[^ ]*header1.h}}
@@ -32,7 +32,7 @@
 // Also check that /FI arguments before the /Yc / /Yu flags are printed right.
 
 // /FI flags before the /Yc arg should be printed, /FI flags after it 
shouldn't.
-// RUN: %clang_cl -Werror /showIncludes /I%S/Inputs /Ycheader2.h /FIheader0.h 
/FIheader2.h /FIheader4.h /Fp%t.pch /c /Fo%t -- %s \
+// RUN: %clang_cl -Werror --target=x86_64 /showIncludes /I%S/Inputs 
/Ycheader2.h /FIheader0.h /FIheader2.h /FIheader4.h /Fp%t.pch /c /Fo%t -- %s \
 // RUN:   | FileCheck --strict-whitespace -check-prefix=CHECK-YCFI %s
 // CHECK-YCFI: Note: including file: {{[^ ]*header0.h}}
 // CHECK-YC

[llvm-branch-commits] [cfe-branch] r277751 - Add a note about clang-cl pch support to the 3.9 release notes.

2016-08-11 Thread Nico Weber via llvm-branch-commits
Author: nico
Date: Thu Aug  4 13:55:57 2016
New Revision: 277751

URL: http://llvm.org/viewvc/llvm-project?rev=277751&view=rev
Log:
Add a note about clang-cl pch support to the 3.9 release notes.

Modified:
cfe/branches/release_39/docs/ReleaseNotes.rst

Modified: cfe/branches/release_39/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/docs/ReleaseNotes.rst?rev=277751&r1=277750&r2=277751&view=diff
==
--- cfe/branches/release_39/docs/ReleaseNotes.rst (original)
+++ cfe/branches/release_39/docs/ReleaseNotes.rst Thu Aug  4 13:55:57 2016
@@ -95,6 +95,11 @@ TLS is enabled for Cygwin defaults to -f
 Proper support, including correct mangling and overloading, added for
 MS-specific "__unaligned" type qualifier.
 
+clang-cl now has limited support for the precompiled header flags /Yc, /Yu, and
+/Fp.  If the precompiled header is passed on the compile command with /FI, then
+the precompiled header flags are honored.  But if the precompiled header is
+included by an `#include ` in each source file instead of by a
+`/FIstdafx.h` flag, these flag continue to be ignored.
 
 C Language Changes in Clang
 ---


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


Re: [llvm-branch-commits] [llvm-branch] r276647 - Merging r276479:

2016-08-11 Thread Robinson, Paul via llvm-branch-commits
Hans, it looks like this merge is incomplete--the trunk patch
also modified test/Feature/optnone-opt.ll and that isn't reflected
in the branch.  We have a 3.9 bot already running and it caught
this.

(Removing the test for GVN Hoisting isn't actually the best tactic
here, I'll fix that on trunk after I get some sleep.)
Thanks,
--paulr

> -Original Message-
> From: llvm-branch-commits [mailto:llvm-branch-commits-
> boun...@lists.llvm.org] On Behalf Of Hans Wennborg via llvm-branch-commits
> Sent: Monday, July 25, 2016 9:38 AM
> To: llvm-branch-commits@lists.llvm.org
> Subject: [llvm-branch-commits] [llvm-branch] r276647 - Merging r276479:
> 
> Author: hans
> Date: Mon Jul 25 11:37:31 2016
> New Revision: 276647
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=276647&view=rev
> Log:
> Merging r276479:
> 
> r276479 | asbirlea | 2016-07-22 15:02:19 -0700 (Fri, 22 Jul 2016) | 11
> lines
> 
> Add flag to PassManagerBuilder to disable GVN Hoist Pass.
> 
> Summary:
> Adding a flag to diable GVN Hoisting by default.
> Note: The GVN Hoist Pass causes some Halide tests to hang. Halide will
> disable the pass while investigating.
> 
> Reviewers: llvm-commits, chandlerc, spop, dberlin
> 
> Subscribers: mehdi_amini
> 
> Differential Revision: https://reviews.llvm.org/D22639
> 
> 
> Modified:
> llvm/branches/release_39/   (props changed)
> llvm/branches/release_39/lib/Transforms/IPO/PassManagerBuilder.cpp
> 
> Propchange: llvm/branches/release_39/
> --
> 
> --- svn:mergeinfo (original)
> +++ svn:mergeinfo Mon Jul 25 11:37:31 2016
> @@ -1,3 +1,3 @@
>  /llvm/branches/Apple/Pertwee:110850,110961
>  /llvm/branches/type-system-rewrite:133420-134817
> -
> /llvm/trunk:155241,275870,275879,275898,275935,275946,276181,276358,276364
> ,276368
> +/llvm/trunk:155241,275870,275879,275898,275935,275946,276181,276358,27636
> 4,276368,276479
> 
> Modified:
> llvm/branches/release_39/lib/Transforms/IPO/PassManagerBuilder.cpp
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/branches/release_39/lib/Transforms/IPO/PassManagerBuilder.cpp
> ?rev=276647&r1=276646&r2=276647&view=diff
> ==
> 
> --- llvm/branches/release_39/lib/Transforms/IPO/PassManagerBuilder.cpp
> (original)
> +++ llvm/branches/release_39/lib/Transforms/IPO/PassManagerBuilder.cpp Mon
> Jul 25 11:37:31 2016
> @@ -134,6 +134,10 @@ static cl::opt PreInlineThreshold(
>  cl::desc("Control the amount of inlining in pre-instrumentation
> inliner "
>   "(default = 75)"));
> 
> +static cl::opt EnableGVNHoist(
> +"enable-gvn-hoist", cl::init(false), cl::Hidden,
> +cl::desc("Enable the experimental GVN Hoisting pass"));
> +
>  PassManagerBuilder::PassManagerBuilder() {
>  OptLevel = 2;
>  SizeLevel = 0;
> @@ -232,7 +236,8 @@ void PassManagerBuilder::populateFunctio
>FPM.add(createCFGSimplificationPass());
>FPM.add(createSROAPass());
>FPM.add(createEarlyCSEPass());
> -  FPM.add(createGVNHoistPass());
> +  if(EnableGVNHoist)
> +FPM.add(createGVNHoistPass());
>FPM.add(createLowerExpectIntrinsicPass());
>  }
> 
> 
> 
> ___
> llvm-branch-commits mailing list
> llvm-branch-commits@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r276337 - [MSSA] Fix PR28632 in the 3.9 branch.

2016-08-11 Thread George Burgess IV via llvm-branch-commits
Author: gbiv
Date: Thu Jul 21 16:09:24 2016
New Revision: 276337

URL: http://llvm.org/viewvc/llvm-project?rev=276337&view=rev
Log:
[MSSA] Fix PR28632 in the 3.9 branch.

The now-removed assertion was really more for initial debugging; it's
perfectly valid (albeit relatively rare) for `Q.Visited.size()` to be
greater than 1,000. A similar patch hasn't been applied to trunk
because the piece of code this assertion was a part of no longer exists
in trunk.

Fix okayed by Danny, merge to 3.9 okayed by Hans.

Modified:
llvm/branches/release_39/lib/Transforms/Utils/MemorySSA.cpp

Modified: llvm/branches/release_39/lib/Transforms/Utils/MemorySSA.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/lib/Transforms/Utils/MemorySSA.cpp?rev=276337&r1=276336&r2=276337&view=diff
==
--- llvm/branches/release_39/lib/Transforms/Utils/MemorySSA.cpp (original)
+++ llvm/branches/release_39/lib/Transforms/Utils/MemorySSA.cpp Thu Jul 21 
16:09:24 2016
@@ -1225,7 +1225,6 @@ MemoryAccessPair MemorySSA::CachingWalke
 MemoryAccess *CacheAccess = DFI.getPath(N - 1);
 doCacheInsert(CacheAccess, ModifyingAccess, Q, Loc);
   }
-  assert(Q.Visited.size() < 1000 && "Visited too much");
 
   return {ModifyingAccess, Loc};
 }


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r277590 - Add a few things to the AArch64 release notes

2016-08-11 Thread Diana Picus via llvm-branch-commits
Author: rovka
Date: Wed Aug  3 07:00:27 2016
New Revision: 277590

URL: http://llvm.org/viewvc/llvm-project?rev=277590&view=rev
Log:
Add a few things to the AArch64 release notes

Modified:
llvm/branches/release_39/docs/ReleaseNotes.rst

Modified: llvm/branches/release_39/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/docs/ReleaseNotes.rst?rev=277590&r1=277589&r2=277590&view=diff
==
--- llvm/branches/release_39/docs/ReleaseNotes.rst (original)
+++ llvm/branches/release_39/docs/ReleaseNotes.rst Wed Aug  3 07:00:27 2016
@@ -136,10 +136,24 @@ link-time may be differently optimized t
 during optimization, and may have arbitrarily different observable
 behavior.  See `PR26774 `_ for more details.
 
-Changes to the ARM Backend
+Changes to the ARM Targets
 --
 
- During this release ...
+ During this release the AArch64 backend has:
+
+* Gained support for Qualcomm's Kryo and Broadcom's Vulcan CPUs, including
+  scheduling models
+* Landed a scheduling model for Samsung's Exynos M1
+* Seen a lot of work on GlobalISel
+* Learned a few more useful combines (fadd and fmul into fmadd, adjustments to 
the
+  stack pointer for callee-save stack memory and local stack memory etc)
+* Gained support for the Swift calling convention
+* Switched to using SubtargetFeatures rather than testing for specific CPUs and
+  to using TableGen for handling system instruction operands
+* Gained a big batch of tests from Halide
+
+ Furthermore, LLDB now supports AArch64 compact unwind tables, as used on iOS,
+ tvos and watchos.
 
 
 Changes to the MIPS Target


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r277750 - grammar fix

2016-08-11 Thread Nico Weber via llvm-branch-commits
Author: nico
Date: Thu Aug  4 13:52:17 2016
New Revision: 277750

URL: http://llvm.org/viewvc/llvm-project?rev=277750&view=rev
Log:
grammar fix

Modified:
cfe/branches/release_39/docs/ReleaseNotes.rst

Modified: cfe/branches/release_39/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/docs/ReleaseNotes.rst?rev=277750&r1=277749&r2=277750&view=diff
==
--- cfe/branches/release_39/docs/ReleaseNotes.rst (original)
+++ cfe/branches/release_39/docs/ReleaseNotes.rst Thu Aug  4 13:52:17 2016
@@ -47,7 +47,7 @@ sections with improvements to Clang's su
 Major New Features
 --
 
-- Clang will no longer passes --build-id by default to the linker. In modern
+- Clang will no longer pass --build-id by default to the linker. In modern
   linkers that is a relatively expensive option. It can be passed explicitly
   with -Wl,--build-id. To have clang always pass it, build clang with
   -DENABLE_LINKER_BUILD_ID.


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r277617 - [docs] Release Notes: autoconf has been removed

2016-08-11 Thread Chris Bieneman via llvm-branch-commits
Author: cbieneman
Date: Wed Aug  3 13:08:14 2016
New Revision: 277617

URL: http://llvm.org/viewvc/llvm-project?rev=277617&view=rev
Log:
[docs] Release Notes: autoconf has been removed

Fleshing out the note about the autoconf build system being removed and 
pointing to CMake documentation.

Modified:
llvm/branches/release_39/docs/ReleaseNotes.rst

Modified: llvm/branches/release_39/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/docs/ReleaseNotes.rst?rev=277617&r1=277616&r2=277617&view=diff
==
--- llvm/branches/release_39/docs/ReleaseNotes.rst (original)
+++ llvm/branches/release_39/docs/ReleaseNotes.rst Wed Aug  3 13:08:14 2016
@@ -40,7 +40,10 @@ Non-comprehensive list of changes in thi
 
 * There is no longer a "global context" available in LLVM, except for the C 
API.
 
-* .. note about autoconf build having been removed.
+* The autoconf build system has been removed in favor of CMake. LLVM 3.9
+  requires CMake 3.4.3 or later to build. For information about using CMake
+  please see the documentation on :doc:`CMake`. For information about the CMake
+  language there is also a :doc:`CMakePrimer` document available.
 
 * .. note about C API functions LLVMParseBitcode,
LLVMParseBitcodeInContext, LLVMGetBitcodeModuleInContext and


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


Re: [llvm-branch-commits] [llvm-branch] r276647 - Merging r276479:

2016-08-11 Thread Robinson, Paul via llvm-branch-commits


> -Original Message-
> From: Hans Wennborg [mailto:h...@hanshq.net]
> Sent: Friday, July 29, 2016 8:44 AM
> To: Robinson, Paul
> Cc: llvm-branch-commits@lists.llvm.org
> Subject: RE: [llvm-branch-commits] [llvm-branch] r276647 - Merging
> r276479:
> 
> Hi Paul,
> 
> It seems the 3.9 branch didn't have that line in optnone-opt.ll in the
> first place, since it was added in r276048 which came after the branch.

Huh. I am obviously trying to do too many things at once...
I forgot we merged r276048 into our local release branch and that's the
one showing the failure, not upstream 3.9.

> 
> I suppose we could merge that one too, but since gvn-hoist is now disabled
> on the branch, maybe it doesn't matter. Let me know what you think.

I agree, not important for a disabled pass to obey optnone.  I have the
test sorted out on trunk with r277158; we can leave the branch as it is.

> 
> Also, very excited to hear that you have a 3.9 bot going already. Now I
> shall sleep better at night :-)

Happy to be of service.  Basic x86_64 Linux on the upstream branch, and
a Windows VS2013 with PS4 target on our local branch.  I'll try to keep
them straight in the future!
Thanks,
--paulr

> 
> Cheers,
> Hans
> 
> On Fri, July 29, 2016 10:00, Robinson, Paul wrote:
> > Hans, it looks like this merge is incomplete--the trunk patch
> > also modified test/Feature/optnone-opt.ll and that isn't reflected
> > in the branch.  We have a 3.9 bot already running and it caught
> > this.
> >
> > (Removing the test for GVN Hoisting isn't actually the best tactic
> > here, I'll fix that on trunk after I get some sleep.)
> > Thanks,
> > --paulr
> >
> >> -Original Message-
> >> From: llvm-branch-commits [mailto:llvm-branch-commits-
> >> boun...@lists.llvm.org] On Behalf Of Hans Wennborg via
> >> llvm-branch-commits
> >> Sent: Monday, July 25, 2016 9:38 AM
> >> To: llvm-branch-commits@lists.llvm.org
> >> Subject: [llvm-branch-commits] [llvm-branch] r276647 - Merging r276479:
> >>
> >> Author: hans
> >> Date: Mon Jul 25 11:37:31 2016
> >> New Revision: 276647
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=276647&view=rev
> >> Log:
> >> Merging r276479:
> >> ---
> -
> >> r276479 | asbirlea | 2016-07-22 15:02:19 -0700 (Fri, 22 Jul 2016) | 11
> >> lines
> >>
> >> Add flag to PassManagerBuilder to disable GVN Hoist Pass.
> >>
> >> Summary:
> >> Adding a flag to diable GVN Hoisting by default.
> >> Note: The GVN Hoist Pass causes some Halide tests to hang. Halide will
> >> disable the pass while investigating.
> >>
> >> Reviewers: llvm-commits, chandlerc, spop, dberlin
> >>
> >> Subscribers: mehdi_amini
> >>
> >> Differential Revision: https://reviews.llvm.org/D22639
> >> ---
> -
> >>
> >> Modified:
> >> llvm/branches/release_39/   (props changed)
> >> llvm/branches/release_39/lib/Transforms/IPO/PassManagerBuilder.cpp
> >>
> >> Propchange: llvm/branches/release_39/
> >> ---
> ---
> >> 
> >> --- svn:mergeinfo (original)
> >> +++ svn:mergeinfo Mon Jul 25 11:37:31 2016
> >> @@ -1,3 +1,3 @@
> >>  /llvm/branches/Apple/Pertwee:110850,110961
> >>  /llvm/branches/type-system-rewrite:133420-134817
> >> -
> >>
> /llvm/trunk:155241,275870,275879,275898,275935,275946,276181,276358,276364
> >> ,276368
> >>
> +/llvm/trunk:155241,275870,275879,275898,275935,275946,276181,276358,27636
> >> 4,276368,276479
> >>
> >> Modified:
> >> llvm/branches/release_39/lib/Transforms/IPO/PassManagerBuilder.cpp
> >> URL: http://llvm.org/viewvc/llvm-
> >>
> project/llvm/branches/release_39/lib/Transforms/IPO/PassManagerBuilder.cpp
> >> ?rev=276647&r1=276646&r2=276647&view=diff
> >>
> ==
> >> 
> >> --- llvm/branches/release_39/lib/Transforms/IPO/PassManagerBuilder.cpp
> >> (original)
> >> +++ llvm/branches/release_39/lib/Transforms/IPO/PassManagerBuilder.cpp
> >> Mon
> >> Jul 25 11:37:31 2016
> >> @@ -134,6 +134,10 @@ static cl::opt PreInlineThreshold(
> >>  cl::desc("Control the amount of inlining in pre-instrumentation
> >> inliner "
> >>   "(default = 75)"));
> >>
> >> +static cl::opt EnableGVNHoist(
> >> +"enable-gvn-hoist", cl::init(false), cl::Hidden,
> >> +cl::desc("Enable the experimental GVN Hoisting pass"));
> >> +
> >>  PassManagerBuilder::PassManagerBuilder() {
> >>  OptLevel = 2;
> >>  SizeLevel = 0;
> >> @@ -232,7 +236,8 @@ void PassManagerBuilder::populateFunctio
> >>FPM.add(createCFGSimplificationPass());
> >>FPM.add(createSROAPass());
> >>FPM.add(createEarlyCSEPass());
> >> -  FPM.add(createGVNHoistPass());
> >> +  if(EnableGVNHoist)
> >> +FPM.add(createGVNHoistPass());
> >>FPM.add(createLowerExpectIntrinsicPass());
> >>  }
> >>
> >>
> >>
> >> ___
> >> llvm-bra

Re: [llvm-branch-commits] [lldb] r270065 - Checkout release_38 branches of llvm and clang when building lldb 3.8

2016-08-11 Thread Stephane Sezer via llvm-branch-commits
Hey Hans,

Yes, `scripts/Xcode/build-llvm.py` is the script that needs to be updated now. 
You can ignore `build-lldb-llvm-clang`.


> On Jul 27, 2016, at 5:07 PM, Francis Ricci  wrote:
> 
> Stephane can look at this, CC-ing here
> 
> On Wed, Jul 27, 2016 at 8:25 PM Hans Wennborg  wrote:
> I tried to figure out what to do here for the 3.9 branch. It seems
> scripts/build-llvm.pl has moved to scripts/Xcode/build-llvm.py. Should
> I update that instead?
> 
> There's also scripts/build-lldb-llvm-clang. Should that be updated
> too? I don't think it was for previous branches?
> 
> Thanks,
> Hans
> 
> On Thu, May 19, 2016 at 7:31 AM, Francis Ricci via llvm-branch-commits
>  wrote:
> > Author: fjricci
> > Date: Thu May 19 09:31:00 2016
> > New Revision: 270065
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=270065&view=rev
> > Log:
> > Checkout release_38 branches of llvm and clang when building lldb 3.8
> >
> > Summary:
> > This commit is intended only for the release_38 branch, not for master.
> >
> > Fixes xcodebuild for the release_38 branch, since llvm and clang must
> > be on the same branch as lldb when building.
> >
> > Reviewers: jasonmolenda, sas, clayborg
> >
> > Subscribers: tstellarAMD, lldb-commits, sas, hans
> >
> > Differential Revision: http://reviews.llvm.org/D19608
> >
> > Modified:
> > lldb/branches/release_38/scripts/build-llvm.pl
> >
> > Modified: lldb/branches/release_38/scripts/build-llvm.pl
> > URL: 
> > http://llvm.org/viewvc/llvm-project/lldb/branches/release_38/scripts/build-llvm.pl?rev=270065&r1=270064&r2=270065&view=diff
> > ==
> > --- lldb/branches/release_38/scripts/build-llvm.pl (original)
> > +++ lldb/branches/release_38/scripts/build-llvm.pl Thu May 19 09:31:00 2016
> > @@ -22,10 +22,6 @@ our $archive_filelist_file = $ENV{SCRIPT
> >
> >  our $llvm_configuration = $ENV{LLVM_CONFIGURATION};
> >
> > -our $llvm_revision = "HEAD";
> > -our $clang_revision = "HEAD";
> > -our $compiler_rt_revision = "HEAD";
> > -
> >  our $SRCROOT = "$ENV{SRCROOT}";
> >  our @archs = split (/\s+/, $ENV{ARCHS});
> >  my $os_release = 11;
> > @@ -64,12 +60,12 @@ if (-e "$llvm_srcroot/lib")
> >  }
> >  else
> >  {
> > -print "Checking out llvm sources from revision $llvm_revision...\n";
> > -do_command ("cd '$SRCROOT' && svn co --quiet --revision $llvm_revision 
> > http://llvm.org/svn/llvm-project/llvm/trunk llvm", "checking out llvm from 
> > repository", 1);
> > -print "Checking out clang sources from revision $clang_revision...\n";
> > -do_command ("cd '$llvm_srcroot/tools' && svn co --quiet --revision 
> > $clang_revision http://llvm.org/svn/llvm-project/cfe/trunk clang", 
> > "checking out clang from repository", 1);
> > -#print "Checking out compiler-rt sources from revision 
> > $compiler_rt_revision...\n";
> > -#do_command ("cd '$llvm_srcroot/projects' && svn co --quiet --revision 
> > $compiler_rt_revision http://llvm.org/svn/llvm-project/compiler-rt/trunk 
> > compiler-rt", "checking out compiler-rt from repository", 1);
> > +print "Checking out llvm sources from release_38...\n";
> > +do_command ("cd '$SRCROOT' && svn co --quiet 
> > http://llvm.org/svn/llvm-project/llvm/branches/release_38 llvm", "checking 
> > out llvm from repository", 1);
> > +print "Checking out clang sources from release_38...\n";
> > +do_command ("cd '$llvm_srcroot/tools' && svn co --quiet 
> > http://llvm.org/svn/llvm-project/cfe/branches/release_38 clang", "checking 
> > out clang from repository", 1);
> > +#print "Checking out compiler-rt sources from release_38...\n";
> > +#do_command ("cd '$llvm_srcroot/projects' && svn co --quiet 
> > http://llvm.org/svn/llvm-project/compiler-rt/branches/release_38 
> > compiler-rt", "checking out compiler-rt from repository", 1);
> >  print "Applying any local patches to LLVM/Clang...";
> >
> >  my @llvm_patches = bsd_glob("$ENV{SRCROOT}/scripts/llvm.*.diff");
> >
> >
> > ___
> > llvm-branch-commits mailing list
> > llvm-branch-commits@lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


Re: [llvm-branch-commits] [lldb] r270065 - Checkout release_38 branches of llvm and clang when building lldb 3.8

2016-08-11 Thread Stephane Sezer via llvm-branch-commits
Thanks!

> On Jul 28, 2016, at 8:54 AM, Hans Wennborg  wrote:
> 
> Thanks! I've committed
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_pipermail_llvm-2Dbranch-2Dcommits_2016-2DJuly_010248.html&d=CwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=zTo4_G7o7BiHqh4aItULRg&m=9akx-P7i0kEiricd02XwoduY21OOp-DiI6eEuHgjw0M&s=6AfuT4n4YTDDjlIW4_I4ZFATqwhwAGg6exl9q990L8Y&e=
>  
> 
> Cheers,
> Hans
> 
> On Wed, Jul 27, 2016 at 7:52 PM, Todd Fiala  wrote:
>> Yep, what Stephane said.
>> 
>> On Wed, Jul 27, 2016 at 5:16 PM, Stephane Sezer  wrote:
>>> 
>>> Hey Hans,
>>> 
>>> Yes, `scripts/Xcode/build-llvm.py` is the script that needs to be updated
>>> now. You can ignore `build-lldb-llvm-clang`.
>>> 
>>> 
 On Jul 27, 2016, at 5:07 PM, Francis Ricci 
 wrote:
 
 Stephane can look at this, CC-ing here
 
 On Wed, Jul 27, 2016 at 8:25 PM Hans Wennborg  wrote:
 I tried to figure out what to do here for the 3.9 branch. It seems
 scripts/build-llvm.pl has moved to scripts/Xcode/build-llvm.py. Should
 I update that instead?
 
 There's also scripts/build-lldb-llvm-clang. Should that be updated
 too? I don't think it was for previous branches?
 
 Thanks,
 Hans
 
 On Thu, May 19, 2016 at 7:31 AM, Francis Ricci via llvm-branch-commits
  wrote:
> Author: fjricci
> Date: Thu May 19 09:31:00 2016
> New Revision: 270065
> 
> URL: 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D270065-26view-3Drev&d=CwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=zTo4_G7o7BiHqh4aItULRg&m=9akx-P7i0kEiricd02XwoduY21OOp-DiI6eEuHgjw0M&s=UPLOYtztTAsNsE8o4xE7T2IONsEUaQVAGNjEdIe5rzY&e=
>  
> Log:
> Checkout release_38 branches of llvm and clang when building lldb 3.8
> 
> Summary:
> This commit is intended only for the release_38 branch, not for
> master.
> 
> Fixes xcodebuild for the release_38 branch, since llvm and clang must
> be on the same branch as lldb when building.
> 
> Reviewers: jasonmolenda, sas, clayborg
> 
> Subscribers: tstellarAMD, lldb-commits, sas, hans
> 
> Differential Revision: 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D19608&d=CwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=zTo4_G7o7BiHqh4aItULRg&m=9akx-P7i0kEiricd02XwoduY21OOp-DiI6eEuHgjw0M&s=m9_3GS1TL1UEGYVm2wTlZy7w8PCiD6NAeODyLJ2aFf8&e=
>  
> 
> Modified:
>lldb/branches/release_38/scripts/build-llvm.pl
> 
> Modified: lldb/branches/release_38/scripts/build-llvm.pl
> URL:
> https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_lldb_branches_release-5F38_scripts_build-2Dllvm.pl-3Frev-3D270065-26r1-3D270064-26r2-3D270065-26view-3Ddiff&d=CwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=zTo4_G7o7BiHqh4aItULRg&m=9akx-P7i0kEiricd02XwoduY21OOp-DiI6eEuHgjw0M&s=RH8sv7qkAgf8O91Lt0gEFm7c30ad0kig5_ZTlCooP8U&e=
>  
> 
> ==
> --- lldb/branches/release_38/scripts/build-llvm.pl (original)
> +++ lldb/branches/release_38/scripts/build-llvm.pl Thu May 19 09:31:00
> 2016
> @@ -22,10 +22,6 @@ our $archive_filelist_file = $ENV{SCRIPT
> 
> our $llvm_configuration = $ENV{LLVM_CONFIGURATION};
> 
> -our $llvm_revision = "HEAD";
> -our $clang_revision = "HEAD";
> -our $compiler_rt_revision = "HEAD";
> -
> our $SRCROOT = "$ENV{SRCROOT}";
> our @archs = split (/\s+/, $ENV{ARCHS});
> my $os_release = 11;
> @@ -64,12 +60,12 @@ if (-e "$llvm_srcroot/lib")
> }
> else
> {
> -print "Checking out llvm sources from revision
> $llvm_revision...\n";
> -do_command ("cd '$SRCROOT' && svn co --quiet --revision
> $llvm_revision 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_svn_llvm-2Dproject_llvm_trunk&d=CwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=zTo4_G7o7BiHqh4aItULRg&m=9akx-P7i0kEiricd02XwoduY21OOp-DiI6eEuHgjw0M&s=J6lJexEtuz-Z8sbrDX64gtAdw1LIMN7-IhECk4NmkO8&e=
>  llvm", "checking
> out llvm from repository", 1);
> -print "Checking out clang sources from revision
> $clang_revision...\n";
> -do_command ("cd '$llvm_srcroot/tools' && svn co --quiet
> --revision $clang_revision 
> https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_svn_llvm-2Dproject_cfe_trunk&d=CwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=zTo4_G7o7BiHqh4aItULRg&m=9akx-P7i0kEiricd02XwoduY21OOp-DiI6eEuHgjw0M&s=65bVQoiWvA3NCjDEgx4PO9SSJ7hji2SOAAD8JR22cjs&e=
>  
> clang", "checking out clang from repository", 1);
> -#print "Checking out compiler-rt sources from revision
> $compiler_rt_revision...\n";
> -#do_command ("cd '$llvm_srcroot/projects' && svn co --quiet
> --revision $compiler_rt_revision
> https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_svn_llvm-2Dproject_compiler-2Drt_trunk&d=CwIBaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=zTo4_G7o7BiHqh4

Re: [llvm-branch-commits] [llvm-branch] r275865 - Updating branches/google/testing to r275480

2016-08-11 Thread Tim Shen via llvm-branch-commits
To be clear, those are likely source bugs, and the most common failure mode
is like:

A Foo(const TempType& t) {
  return A(&t);  // keeps the pointer to a temporary.
}

const A& a = Foo(MakeTemporary());
// the temporary is gone.

On Mon, Jul 18, 2016 at 1:28 PM Hans Wennborg  wrote:

> On Mon, Jul 18, 2016 at 12:00 PM, David Jones  wrote:
> > On Mon, Jul 18, 2016 at 11:38 AM, Hans Wennborg 
> wrote:
> >>
> >> On Mon, Jul 18, 2016 at 11:24 AM, David L. Jones via
> >> llvm-branch-commits  wrote:
> >> > Author: dlj
> >> > Date: Mon Jul 18 13:24:53 2016
> >> > New Revision: 275865
> >> >
> >> > URL: http://llvm.org/viewvc/llvm-project?rev=275865&view=rev
> >> > Log:
> >> > Updating branches/google/testing to r275480
> >> >
> >> > Added:
> >> > llvm/branches/google/testing/   (props changed)
> >> >   - copied from r275480, llvm/trunk/
> >>
> >> This is pretty much exactly the same version that LLVM 3.9 will be
> >> based on, so I'd be extra interested to hear the results from testing
> >> here :-)
> >
> >
> > I've seen a small number of failures due to dangling references after
> > r274385. Tim checked the suspicious failures and verified they disappear
> > with his change disabled.
>
> Thanks, I've filed PR28603 to track this.
>
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


Re: [llvm-branch-commits] [llvm-branch] r275828 - Creating release_39 branch off revision 275826

2016-08-11 Thread Anton Korobeynikov via llvm-branch-commits
Should be there - I kicked the updates for all the repos.

Note that in general the branches will be created with the first
commit to trunk after the branch point.

On Mon, Jul 18, 2016 at 9:32 PM, Anton Korobeynikov
 wrote:
> Yep, doing this right now :)
>
> On Mon, Jul 18, 2016 at 9:29 PM, Hans Wennborg  wrote:
>> Hi Anton,
>>
>> On Mon, Jul 18, 2016 at 10:52 AM, Hans Wennborg via
>> llvm-branch-commits  wrote:
>>> Author: hans
>>> Date: Mon Jul 18 12:52:41 2016
>>> New Revision: 275828
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=275828&view=rev
>>> Log:
>>> Creating release_39 branch off revision 275826
>>>
>>> Added:
>>> llvm/branches/release_39/   (props changed)
>>>   - copied from r275826, llvm/trunk/
>>
>> Can you make this 3.9 branch appear on the git mirror?
>>
>> Cheers,
>> Hans
>
>
>
> --
> With best regards, Anton Korobeynikov
> Department of Statistical Modelling, Saint Petersburg State University



-- 
With best regards, Anton Korobeynikov
Department of Statistical Modelling, Saint Petersburg State University
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r277739 - Add release note for MemorySSA.

2016-08-11 Thread George Burgess IV via llvm-branch-commits
Author: gbiv
Date: Thu Aug  4 12:51:18 2016
New Revision: 277739

URL: http://llvm.org/viewvc/llvm-project?rev=277739&view=rev
Log:
Add release note for MemorySSA.

Modified:
llvm/branches/release_39/docs/ReleaseNotes.rst

Modified: llvm/branches/release_39/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/docs/ReleaseNotes.rst?rev=277739&r1=277738&r2=277739&view=diff
==
--- llvm/branches/release_39/docs/ReleaseNotes.rst (original)
+++ llvm/branches/release_39/docs/ReleaseNotes.rst Thu Aug  4 12:51:18 2016
@@ -74,6 +74,11 @@ Non-comprehensive list of changes in thi
 
 * Raised the minimum required CMake version to 3.4.3.
 
+* Added the MemorySSA analysis, which hopes to replace 
MemoryDependenceAnalysis.
+  It should provide higher-quality results than MemDep, and be algorithmically
+  faster than MemDep. Currently, GVNHoist (which is off by default) makes use 
of
+  MemorySSA.
+
 .. NOTE
For small 1-3 sentence descriptions, just add an entry at the end of
this list. If your description won't fit comfortably in one bullet


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r276489 - Merging r276232:

2016-08-11 Thread George Burgess IV via llvm-branch-commits
Author: gbiv
Date: Fri Jul 22 17:57:21 2016
New Revision: 276489

URL: http://llvm.org/viewvc/llvm-project?rev=276489&view=rev
Log:
Merging r276232:

r276232 | gbiv | 2016-07-20 20:28:13 -0700 (Wed, 20 Jul 2016) | 13 lines

[Sema] Fix PR28623.

In atomic builtins, we assumed that the LValue conversion on the first
argument would succeed. So, we would crash given code like:

```
void ovl(char);
void ovl(int);
__atomic_store_n(ovl, 0, 0);
```

This patch makes us not assume that said conversion is successful. :)



Added:
cfe/branches/release_39/test/SemaCXX/atomic-ops.cpp
Modified:
cfe/branches/release_39/lib/Sema/SemaChecking.cpp

Modified: cfe/branches/release_39/lib/Sema/SemaChecking.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/lib/Sema/SemaChecking.cpp?rev=276489&r1=276488&r2=276489&view=diff
==
--- cfe/branches/release_39/lib/Sema/SemaChecking.cpp (original)
+++ cfe/branches/release_39/lib/Sema/SemaChecking.cpp Fri Jul 22 17:57:21 2016
@@ -2399,7 +2399,11 @@ ExprResult Sema::SemaAtomicOpsOverloaded
 
   // Inspect the first argument of the atomic operation.
   Expr *Ptr = TheCall->getArg(0);
-  Ptr = DefaultFunctionArrayLvalueConversion(Ptr).get();
+  ExprResult ConvertedPtr = DefaultFunctionArrayLvalueConversion(Ptr);
+  if (ConvertedPtr.isInvalid())
+return ExprError();
+
+  Ptr = ConvertedPtr.get();
   const PointerType *pointerType = Ptr->getType()->getAs();
   if (!pointerType) {
 Diag(DRE->getLocStart(), diag::err_atomic_builtin_must_be_pointer)

Added: cfe/branches/release_39/test/SemaCXX/atomic-ops.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/test/SemaCXX/atomic-ops.cpp?rev=276489&view=auto
==
--- cfe/branches/release_39/test/SemaCXX/atomic-ops.cpp (added)
+++ cfe/branches/release_39/test/SemaCXX/atomic-ops.cpp Fri Jul 22 17:57:21 2016
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 %s -verify -fsyntax-only -triple=i686-linux-gnu -std=c++11
+
+// We crashed when we couldn't properly convert the first arg of __atomic_* to
+// an lvalue.
+void PR28623() {
+  void helper(int); // expected-note{{target}}
+  void helper(char); // expected-note{{target}}
+  __atomic_store_n(helper, 0, 0); // expected-error{{reference to overloaded 
function could not be resolved}}
+}


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r277998 - Add release note for the MIPS target.

2016-08-11 Thread Vasileios Kalintiris via llvm-branch-commits
Author: vkalintiris
Date: Mon Aug  8 07:28:57 2016
New Revision: 277998

URL: http://llvm.org/viewvc/llvm-project?rev=277998&view=rev
Log:
Add release note for the MIPS target.

Modified:
llvm/branches/release_39/docs/ReleaseNotes.rst

Modified: llvm/branches/release_39/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/docs/ReleaseNotes.rst?rev=277998&r1=277997&r2=277998&view=diff
==
--- llvm/branches/release_39/docs/ReleaseNotes.rst (original)
+++ llvm/branches/release_39/docs/ReleaseNotes.rst Mon Aug  8 07:28:57 2016
@@ -192,7 +192,47 @@ Changes to the ARM Targets
 Changes to the MIPS Target
 --
 
- During this release ...
+**During this release the MIPS target has:**
+
+* Enabled the Integrated Assembler by default for all ``mips-*`` and
+  ``mipsel-*`` triples.
+* Significantly improved the Integrated Assembler support for the n64 ABI.
+* Added the Clang frontend ``-mcompact-branches={never,optimal,always}`` option
+  that controls how LLVM generates compact branches for MIPS targets.
+* Improved performance and code size for stack pointer adjustments in functions
+  with large frames.
+* Implemented many instructions from the microMIPS32R6 ISA and added CodeGen
+  support for most of them.
+* Added support for the triple used by Debian Stretch for little endian
+  MIPS64, ie. ``mips64el-linux-gnuabi64``.
+* Removed EABI which was neither tested nor properly supported.
+* Gained the ability to self-host on MIPS32R6.
+* Gained the ability to self-host on MIPS64R2 and MIPS64R6 when using the n64
+  ABI.
+* Added support for the ``LA`` macro in PIC mode for o32.
+* Added support for safestack in compiler-rt.
+* Added support for the MIPS n64 ABI in LLD.
+* Added LLD support for TLS relocations for both o32 and n64 MIPS ABIs.
+
+**The MIPS target has also fixed various bugs including the following notable
+fixes:**
+
+* Delay slots are no longer filled multiple times when either ``-save-temps``
+  or ``-via-file-asm`` are used.
+* Updated n32 and n64 to follow the standard ELF conventions for label prefixes
+  (``.L``), whereas o32 still uses its own (``$``).
+* Properly sign-extend values to GPR width for instructions that expect 32-bit
+  values on 64-bit ISAs.
+* Several fixes for the delay-slot filler pass, including correct
+  forbidden-slot hazard handling.
+* Fixed several errors caught by the machine verifier when turned on for MIPS.
+* Fixed broken predicate for ``SELECT`` patterns in MIPS64.
+* Fixed wrong truncation of memory address for ``LL``/``SC`` seqeuences in
+  MIPS64.
+* Fixed the o32, n32 and n64 handling of ``.cprestore`` directives when inside
+  a ``.set noat`` region by the Integrated Assembler.
+* Fixed the ordering of ``HI``/``LO`` pairs in the relocation table.
+* Fixed the generated ELF ``EFlags`` when Octeon is the target.
 
 
 Changes to the PowerPC Target


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


Re: [llvm-branch-commits] [lldb] r270065 - Checkout release_38 branches of llvm and clang when building lldb 3.8

2016-08-11 Thread Todd Fiala via llvm-branch-commits
Yep, what Stephane said.

On Wed, Jul 27, 2016 at 5:16 PM, Stephane Sezer  wrote:

> Hey Hans,
>
> Yes, `scripts/Xcode/build-llvm.py` is the script that needs to be updated
> now. You can ignore `build-lldb-llvm-clang`.
>
>
> > On Jul 27, 2016, at 5:07 PM, Francis Ricci 
> wrote:
> >
> > Stephane can look at this, CC-ing here
> >
> > On Wed, Jul 27, 2016 at 8:25 PM Hans Wennborg  wrote:
> > I tried to figure out what to do here for the 3.9 branch. It seems
> > scripts/build-llvm.pl has moved to scripts/Xcode/build-llvm.py. Should
> > I update that instead?
> >
> > There's also scripts/build-lldb-llvm-clang. Should that be updated
> > too? I don't think it was for previous branches?
> >
> > Thanks,
> > Hans
> >
> > On Thu, May 19, 2016 at 7:31 AM, Francis Ricci via llvm-branch-commits
> >  wrote:
> > > Author: fjricci
> > > Date: Thu May 19 09:31:00 2016
> > > New Revision: 270065
> > >
> > > URL: http://llvm.org/viewvc/llvm-project?rev=270065&view=rev
> > > Log:
> > > Checkout release_38 branches of llvm and clang when building lldb 3.8
> > >
> > > Summary:
> > > This commit is intended only for the release_38 branch, not for master.
> > >
> > > Fixes xcodebuild for the release_38 branch, since llvm and clang must
> > > be on the same branch as lldb when building.
> > >
> > > Reviewers: jasonmolenda, sas, clayborg
> > >
> > > Subscribers: tstellarAMD, lldb-commits, sas, hans
> > >
> > > Differential Revision: http://reviews.llvm.org/D19608
> > >
> > > Modified:
> > > lldb/branches/release_38/scripts/build-llvm.pl
> > >
> > > Modified: lldb/branches/release_38/scripts/build-llvm.pl
> > > URL:
> http://llvm.org/viewvc/llvm-project/lldb/branches/release_38/scripts/build-llvm.pl?rev=270065&r1=270064&r2=270065&view=diff
> > >
> ==
> > > --- lldb/branches/release_38/scripts/build-llvm.pl (original)
> > > +++ lldb/branches/release_38/scripts/build-llvm.pl Thu May 19
> 09:31:00 2016
> > > @@ -22,10 +22,6 @@ our $archive_filelist_file = $ENV{SCRIPT
> > >
> > >  our $llvm_configuration = $ENV{LLVM_CONFIGURATION};
> > >
> > > -our $llvm_revision = "HEAD";
> > > -our $clang_revision = "HEAD";
> > > -our $compiler_rt_revision = "HEAD";
> > > -
> > >  our $SRCROOT = "$ENV{SRCROOT}";
> > >  our @archs = split (/\s+/, $ENV{ARCHS});
> > >  my $os_release = 11;
> > > @@ -64,12 +60,12 @@ if (-e "$llvm_srcroot/lib")
> > >  }
> > >  else
> > >  {
> > > -print "Checking out llvm sources from revision
> $llvm_revision...\n";
> > > -do_command ("cd '$SRCROOT' && svn co --quiet --revision
> $llvm_revision http://llvm.org/svn/llvm-project/llvm/trunk llvm",
> "checking out llvm from repository", 1);
> > > -print "Checking out clang sources from revision
> $clang_revision...\n";
> > > -do_command ("cd '$llvm_srcroot/tools' && svn co --quiet
> --revision $clang_revision http://llvm.org/svn/llvm-project/cfe/trunk
> clang", "checking out clang from repository", 1);
> > > -#print "Checking out compiler-rt sources from revision
> $compiler_rt_revision...\n";
> > > -#do_command ("cd '$llvm_srcroot/projects' && svn co --quiet
> --revision $compiler_rt_revision
> http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt",
> "checking out compiler-rt from repository", 1);
> > > +print "Checking out llvm sources from release_38...\n";
> > > +do_command ("cd '$SRCROOT' && svn co --quiet
> http://llvm.org/svn/llvm-project/llvm/branches/release_38 llvm",
> "checking out llvm from repository", 1);
> > > +print "Checking out clang sources from release_38...\n";
> > > +do_command ("cd '$llvm_srcroot/tools' && svn co --quiet
> http://llvm.org/svn/llvm-project/cfe/branches/release_38 clang",
> "checking out clang from repository", 1);
> > > +#print "Checking out compiler-rt sources from release_38...\n";
> > > +#do_command ("cd '$llvm_srcroot/projects' && svn co --quiet
> http://llvm.org/svn/llvm-project/compiler-rt/branches/release_38
> compiler-rt", "checking out compiler-rt from repository", 1);
> > >  print "Applying any local patches to LLVM/Clang...";
> > >
> > >  my @llvm_patches = bsd_glob("$ENV{SRCROOT}/scripts/llvm.*.diff");
> > >
> > >
> > > ___
> > > llvm-branch-commits mailing list
> > > llvm-branch-commits@lists.llvm.org
> > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
>
>


-- 
-Todd
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r277628 - Add ThinLTO release note.

2016-08-11 Thread Teresa Johnson via llvm-branch-commits
Author: tejohnson
Date: Wed Aug  3 13:52:04 2016
New Revision: 277628

URL: http://llvm.org/viewvc/llvm-project?rev=277628&view=rev
Log:
Add ThinLTO release note.

Modified:
llvm/branches/release_39/docs/ReleaseNotes.rst

Modified: llvm/branches/release_39/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/docs/ReleaseNotes.rst?rev=277628&r1=277627&r2=277628&view=diff
==
--- llvm/branches/release_39/docs/ReleaseNotes.rst (original)
+++ llvm/branches/release_39/docs/ReleaseNotes.rst Wed Aug  3 13:52:04 2016
@@ -72,9 +72,6 @@ Non-comprehensive list of changes in thi
   need to be updated to replace the argument node and remove any dead nodes in
   cases where they currently return an ``SDNode *`` from this interface.
 
-* Introduction of ThinLTO: [FIXME: needs to be documented more extensively in
-  /docs/ ; ping Mehdi/Teresa before the release if not done]
-
 * Raised the minimum required CMake version to 3.4.3.
 
 .. NOTE
@@ -139,6 +136,16 @@ link-time may be differently optimized t
 during optimization, and may have arbitrarily different observable
 behavior.  See `PR26774 `_ for more details.
 
+Support for ThinLTO
+---
+
+LLVM now supports ThinLTO compilation, which can be invoked by compiling
+and linking with -flto=thin. The gold linker plugin, as well as linkers
+that use the new ThinLTO API in libLTO (like ld64), will transparently
+execute the ThinLTO backends in parallel threads.
+For more information on ThinLTO and the LLVM implementation, see the
+`ThinLTO blog post 
`_.
+
 Changes to the ARM Targets
 --
 


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r277803 - Add release note for AMDGPU target.

2016-08-11 Thread Nicolai Haehnle via llvm-branch-commits
Author: nha
Date: Fri Aug  5 03:31:59 2016
New Revision: 277803

URL: http://llvm.org/viewvc/llvm-project?rev=277803&view=rev
Log:
Add release note for AMDGPU target.

Modified:
llvm/branches/release_39/docs/ReleaseNotes.rst

Modified: llvm/branches/release_39/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/docs/ReleaseNotes.rst?rev=277803&r1=277802&r2=277803&view=diff
==
--- llvm/branches/release_39/docs/ReleaseNotes.rst (original)
+++ llvm/branches/release_39/docs/ReleaseNotes.rst Fri Aug  5 03:31:59 2016
@@ -216,6 +216,9 @@ Changes to the X86 Target
 Changes to the AMDGPU Target
 -
 
+ * Added backend support for OpenGL shader image, buffer storage, atomic
+   counter, and compute shader extensions (supported since Mesa 12)
+
  * Mesa 11.0.x is no longer supported
 
 


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


Re: [llvm-branch-commits] [llvm-branch] r275828 - Creating release_39 branch off revision 275826

2016-08-11 Thread Anton Korobeynikov via llvm-branch-commits
Yep, doing this right now :)

On Mon, Jul 18, 2016 at 9:29 PM, Hans Wennborg  wrote:
> Hi Anton,
>
> On Mon, Jul 18, 2016 at 10:52 AM, Hans Wennborg via
> llvm-branch-commits  wrote:
>> Author: hans
>> Date: Mon Jul 18 12:52:41 2016
>> New Revision: 275828
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=275828&view=rev
>> Log:
>> Creating release_39 branch off revision 275826
>>
>> Added:
>> llvm/branches/release_39/   (props changed)
>>   - copied from r275826, llvm/trunk/
>
> Can you make this 3.9 branch appear on the git mirror?
>
> Cheers,
> Hans



-- 
With best regards, Anton Korobeynikov
Department of Statistical Modelling, Saint Petersburg State University
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r278388 - Merging r271801:

2016-08-11 Thread Joerg Sonnenberger via llvm-branch-commits
Author: joerg
Date: Thu Aug 11 13:47:43 2016
New Revision: 278388

URL: http://llvm.org/viewvc/llvm-project?rev=278388&view=rev
Log:
Merging r271801:

r271801 | joerg | 2016-06-04 22:03:26 +0200 (Sa, 04 Jun 2016) | 3 lines

Add PIE magic for NetBSD. Add tests for the correct flags for
non-shared, PIE and shared output mode.



Modified:
cfe/branches/release_38/lib/Driver/Tools.cpp
cfe/branches/release_38/test/Driver/netbsd.c

Modified: cfe/branches/release_38/lib/Driver/Tools.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_38/lib/Driver/Tools.cpp?rev=278388&r1=278387&r2=278388&view=diff
==
--- cfe/branches/release_38/lib/Driver/Tools.cpp (original)
+++ cfe/branches/release_38/lib/Driver/Tools.cpp Thu Aug 11 13:47:43 2016
@@ -8181,6 +8181,7 @@ void netbsd::Linker::ConstructJob(Compil
 if (Args.hasArg(options::OPT_shared)) {
   CmdArgs.push_back("-Bshareable");
 } else {
+  Args.AddAllArgs(CmdArgs, options::OPT_pie);
   CmdArgs.push_back("-dynamic-linker");
   CmdArgs.push_back("/libexec/ld.elf_so");
 }
@@ -8282,15 +8283,15 @@ void netbsd::Linker::ConstructJob(Compil
 if (!Args.hasArg(options::OPT_shared)) {
   CmdArgs.push_back(
   Args.MakeArgString(getToolChain().GetFilePath("crt0.o")));
+}
+CmdArgs.push_back(
+Args.MakeArgString(getToolChain().GetFilePath("crti.o")));
+if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_pie)) {
   CmdArgs.push_back(
-  Args.MakeArgString(getToolChain().GetFilePath("crti.o")));
-  CmdArgs.push_back(
-  Args.MakeArgString(getToolChain().GetFilePath("crtbegin.o")));
+  Args.MakeArgString(getToolChain().GetFilePath("crtbeginS.o")));
 } else {
   CmdArgs.push_back(
-  Args.MakeArgString(getToolChain().GetFilePath("crti.o")));
-  CmdArgs.push_back(
-  Args.MakeArgString(getToolChain().GetFilePath("crtbeginS.o")));
+  Args.MakeArgString(getToolChain().GetFilePath("crtbegin.o")));
 }
   }
 
@@ -8356,12 +8357,12 @@ void netbsd::Linker::ConstructJob(Compil
   }
 
   if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
-if (!Args.hasArg(options::OPT_shared))
+if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_pie))
   CmdArgs.push_back(
-  Args.MakeArgString(getToolChain().GetFilePath("crtend.o")));
+  Args.MakeArgString(getToolChain().GetFilePath("crtendS.o")));
 else
   CmdArgs.push_back(
-  Args.MakeArgString(getToolChain().GetFilePath("crtendS.o")));
+  Args.MakeArgString(getToolChain().GetFilePath("crtend.o")));
 
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath("crtn.o")));
   }
 

Modified: cfe/branches/release_38/test/Driver/netbsd.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_38/test/Driver/netbsd.c?rev=278388&r1=278387&r2=278388&view=diff
==
--- cfe/branches/release_38/test/Driver/netbsd.c (original)
+++ cfe/branches/release_38/test/Driver/netbsd.c Thu Aug 11 13:47:43 2016
@@ -1,5 +1,15 @@
 // RUN: %clang -no-canonical-prefixes -target x86_64--netbsd \
 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=STATIC %s
+// RUN: %clang -no-canonical-prefixes -target x86_64--netbsd \
+// RUN: -pie --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=PIE %s
+// RUN: %clang -no-canonical-prefixes -target x86_64--netbsd \
+// RUN: -shared --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=SHARED %s
+
+// RUN: %clang -no-canonical-prefixes -target x86_64--netbsd \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
 // RUN: | FileCheck -check-prefix=X86_64 %s
 // RUN: %clang -no-canonical-prefixes -target x86_64--netbsd7.0.0 \
 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
@@ -105,6 +115,32 @@
 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
 // RUN: | FileCheck -check-prefix=S-POWERPC64 %s
 
+// STATIC: ld{{.*}}"
+// STATIC-NOT: "-pie"
+// STATIC-NOT: "-Bshareable"
+// STATIC: "-dynamic-linker" "/libexec/ld.elf_so"
+// STATIC-NOT: "-pie"
+// STATIC-NOT: "-Bshareable"
+// STATIC: "{{.*}}/usr/lib{{/|}}crt0.o"
+// STATIC: "{{.*}}/usr/lib{{/|}}crti.o" 
"{{.*}}/usr/lib{{/|}}crtbegin.o"
+// STATIC: "{{.*}}/usr/lib{{/|}}crtend.o" "{{.*}}/usr/lib{{/|}}crtn.o"
+
+// SHARED: ld{{.*}}"
+// SHARED-NOT: "-pie"
+// SHARED-NOT: "-dynamic-linker"
+// SHARED-NOT: "{{.*}}/usr/lib{{/|}}crt0.o"
+// SHARED: "{{.*}}/usr/lib{{/|}}crti.o" 
"{{.*}}/usr/lib{{/|}}crtbeginS.o"
+// SHARED: "{{.*}}/usr/lib{{/|}}crtendS.o" "{{.*}}/usr/lib{{/|\\

[llvm-branch-commits] [llvm-branch] r278422 - Merging r278370:

2016-08-11 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Aug 11 16:39:47 2016
New Revision: 278422

URL: http://llvm.org/viewvc/llvm-project?rev=278422&view=rev
Log:
Merging r278370:

r278370 | mkuper | 2016-08-11 10:38:33 -0700 (Thu, 11 Aug 2016) | 7 lines

Make TwoAddressInstructionPass::rescheduleMIBelowKill subreg-aware

This fixes PR28824.

Differential Revision: https://reviews.llvm.org/D23220




Added:
llvm/branches/release_39/test/CodeGen/X86/pr28824.ll
  - copied unchanged from r278370, llvm/trunk/test/CodeGen/X86/pr28824.ll
Modified:
llvm/branches/release_39/   (props changed)
llvm/branches/release_39/lib/CodeGen/TwoAddressInstructionPass.cpp

Propchange: llvm/branches/release_39/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 11 16:39:47 2016
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277114,277135,277371,277500,277504,277625,277691,277693,23,278002,278086,278133
+/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277114,277135,277371,277500,277504,277625,277691,277693,23,278002,278086,278133,278370

Modified: llvm/branches/release_39/lib/CodeGen/TwoAddressInstructionPass.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=278422&r1=278421&r2=278422&view=diff
==
--- llvm/branches/release_39/lib/CodeGen/TwoAddressInstructionPass.cpp 
(original)
+++ llvm/branches/release_39/lib/CodeGen/TwoAddressInstructionPass.cpp Thu Aug 
11 16:39:47 2016
@@ -29,7 +29,7 @@
 
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/SmallSet.h"
+#include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/CodeGen/LiveIntervalAnalysis.h"
@@ -539,6 +539,16 @@ regsAreCompatible(unsigned RegA, unsigne
   return TRI->regsOverlap(RegA, RegB);
 }
 
+// Returns true if Reg is equal or aliased to at least one register in Set.
+static bool regOverlapsSet(const SmallVectorImpl &Set, unsigned Reg,
+   const TargetRegisterInfo *TRI) {
+  for (unsigned R : Set)
+if (TRI->regsOverlap(R, Reg))
+  return true;
+
+  return false;
+}
+
 /// Return true if it's potentially profitable to commute the two-address
 /// instruction that's being processed.
 bool
@@ -864,9 +874,9 @@ rescheduleMIBelowKill(MachineBasicBlock:
 // FIXME: Needs more sophisticated heuristics.
 return false;
 
-  SmallSet Uses;
-  SmallSet Kills;
-  SmallSet Defs;
+  SmallVector Uses;
+  SmallVector Kills;
+  SmallVector Defs;
   for (const MachineOperand &MO : MI->operands()) {
 if (!MO.isReg())
   continue;
@@ -874,12 +884,12 @@ rescheduleMIBelowKill(MachineBasicBlock:
 if (!MOReg)
   continue;
 if (MO.isDef())
-  Defs.insert(MOReg);
+  Defs.push_back(MOReg);
 else {
-  Uses.insert(MOReg);
+  Uses.push_back(MOReg);
   if (MOReg != Reg && (MO.isKill() ||
(LIS && isPlainlyKilled(MI, MOReg, LIS
-Kills.insert(MOReg);
+Kills.push_back(MOReg);
 }
   }
 
@@ -888,8 +898,9 @@ rescheduleMIBelowKill(MachineBasicBlock:
   MachineBasicBlock::iterator AfterMI = std::next(Begin);
 
   MachineBasicBlock::iterator End = AfterMI;
-  while (End->isCopy() && Defs.count(End->getOperand(1).getReg())) {
-Defs.insert(End->getOperand(0).getReg());
+  while (End->isCopy() &&
+ regOverlapsSet(Defs, End->getOperand(1).getReg(), TRI)) {
+Defs.push_back(End->getOperand(0).getReg());
 ++End;
   }
 
@@ -915,21 +926,21 @@ rescheduleMIBelowKill(MachineBasicBlock:
   if (!MOReg)
 continue;
   if (MO.isDef()) {
-if (Uses.count(MOReg))
+if (regOverlapsSet(Uses, MOReg, TRI))
   // Physical register use would be clobbered.
   return false;
-if (!MO.isDead() && Defs.count(MOReg))
+if (!MO.isDead() && regOverlapsSet(Defs, MOReg, TRI))
   // May clobber a physical register def.
   // FIXME: This may be too conservative. It's ok if the instruction
   // is sunken completely below the use.
   return false;
   } else {
-if (Defs.count(MOReg))
+if (regOverlapsSet(Defs, MOReg, TRI))
 

[llvm-branch-commits] [llvm-branch] r278424 - Merging r278413:

2016-08-11 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Aug 11 16:43:23 2016
New Revision: 278424

URL: http://llvm.org/viewvc/llvm-project?rev=278424&view=rev
Log:
Merging r278413:

r278413 | gberry | 2016-08-11 14:05:17 -0700 (Thu, 11 Aug 2016) | 17 lines

[SCEV] Update interface to handle SCEVExpander insert point motion.

Summary:
This is an extension of the fix in r271424.  That fix dealt with builder
insert points being moved by SCEV expansion, but only for the lifetime
of the expand call.  This change modifies the interface so that LSR can
safely call expand multiple times at the same insert point and do the
right thing if one of the expansions decides to move the original insert
point.

This is a fix for PR28719.

Reviewers: sanjoy

Subscribers: llvm-commits, mcrosier, mzolotukhin

Differential Revision: https://reviews.llvm.org/D23342


Added:
llvm/branches/release_39/test/Transforms/LoopStrengthReduce/X86/pr28719.ll
  - copied unchanged from r278413, 
llvm/trunk/test/Transforms/LoopStrengthReduce/X86/pr28719.ll
Modified:
llvm/branches/release_39/   (props changed)
llvm/branches/release_39/include/llvm/Analysis/ScalarEvolutionExpander.h
llvm/branches/release_39/lib/Analysis/ScalarEvolutionExpander.cpp
llvm/branches/release_39/lib/Transforms/Scalar/LoopStrengthReduce.cpp

Propchange: llvm/branches/release_39/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 11 16:43:23 2016
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277114,277135,277371,277500,277504,277625,277691,277693,23,278002,278086,278133,278370
+/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277114,277135,277371,277500,277504,277625,277691,277693,23,278002,278086,278133,278370,278413

Modified: 
llvm/branches/release_39/include/llvm/Analysis/ScalarEvolutionExpander.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/include/llvm/Analysis/ScalarEvolutionExpander.h?rev=278424&r1=278423&r2=278424&view=diff
==
--- llvm/branches/release_39/include/llvm/Analysis/ScalarEvolutionExpander.h 
(original)
+++ llvm/branches/release_39/include/llvm/Analysis/ScalarEvolutionExpander.h 
Thu Aug 11 16:43:23 2016
@@ -196,6 +196,13 @@ namespace llvm {
 /// block.
 Value *expandCodeFor(const SCEV *SH, Type *Ty, Instruction *I);
 
+/// \brief Insert code to directly compute the specified SCEV expression
+/// into the program.  The inserted code is inserted into the 
SCEVExpander's
+/// current insertion point. If a type is specified, the result will be
+/// expanded to have that type, with a cast if necessary.
+Value *expandCodeFor(const SCEV *SH, Type *Ty = nullptr);
+
+
 /// \brief Generates a code sequence that evaluates this predicate.
 /// The inserted instructions will be at position \p Loc.
 /// The result will be of type i1 and will have a value of 0 when the
@@ -253,6 +260,15 @@ namespace llvm {
 
 void enableLSRMode() { LSRMode = true; }
 
+/// \brief Set the current insertion point. This is useful if multiple 
calls
+/// to expandCodeFor() are going to be made with the same insert point and
+/// the insert point may be moved during one of the expansions (e.g. if the
+/// insert point is not a block terminator).
+void setInsertPoint(Instruction *IP) {
+  assert(IP);
+  Builder.SetInsertPoint(IP);
+}
+
 /// \brief Clear the current insertion point. This is useful if the
 /// instruction that had been serving as the insertion point may have been
 /// deleted.
@@ -313,12 +329,6 @@ namespace llvm {
 
 Value *expand(const SCEV *S);
 
-/// \brief Insert code to directly compute the specified SCEV expression
-/// into the program.  The inserted code is inserted into the 
SCEVExpander's
-/// current insertion point. If a type is specified, the result will be
-/// expanded to have that type, with a cast if necessary.
-Value *expandCodeFor(const SCEV *SH, Type *Ty = nullptr);
-
 /// \brief Determine the most "relevant" loop for the given SCEV.
 const Loop *getRelevantLoop(const SCEV *);
 

Modified: llvm/branches/release_39/lib/Analysis/ScalarEvolutionExpander.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/

[llvm-branch-commits] [compiler-rt-branch] r278427 - Remove test/asan/TestCases/Darwin/dead-strip.c

2016-08-11 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Aug 11 16:50:18 2016
New Revision: 278427

URL: http://llvm.org/viewvc/llvm-project?rev=278427&view=rev
Log:
Remove test/asan/TestCases/Darwin/dead-strip.c

The test is gated on OS version, but actually depends on what SDK
is used, see PR28743. Deleting to unblock 3.9.

Removed:
compiler-rt/branches/release_39/test/asan/TestCases/Darwin/dead-strip.c
Modified:
compiler-rt/branches/release_39/   (props changed)

Propchange: compiler-rt/branches/release_39/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 11 16:50:18 2016
@@ -1 +1 @@
-/compiler-rt/trunk:275946,275948,277297,277300
+/compiler-rt/trunk:275946,275948,276015,277297,277300

Removed: compiler-rt/branches/release_39/test/asan/TestCases/Darwin/dead-strip.c
URL: 
http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_39/test/asan/TestCases/Darwin/dead-strip.c?rev=278426&view=auto
==
--- compiler-rt/branches/release_39/test/asan/TestCases/Darwin/dead-strip.c 
(original)
+++ compiler-rt/branches/release_39/test/asan/TestCases/Darwin/dead-strip.c 
(removed)
@@ -1,22 +0,0 @@
-// Test that AddressSanitizer does not re-animate dead globals when dead
-// stripping is turned on.
-//
-// This test verifies that an out-of-bounds access on a global variable is
-// detected after dead stripping has been performed. This proves that the
-// runtime is able to register globals in the __DATA,__asan_globals section.
-
-// REQUIRES: osx-ld64-live_support
-// RUN: %clang_asan -mllvm -asan-globals-live-support -Xlinker -dead_strip -o 
%t %s
-// RUN: llvm-nm -format=posix %t | FileCheck --check-prefix NM-CHECK %s
-// RUN: not %run %t 2>&1 | FileCheck --check-prefix ASAN-CHECK %s
-
-int alive[1] = {};
-int dead[1] = {};
-// NM-CHECK: {{^_alive }}
-// NM-CHECK-NOT: {{^_dead }}
-
-int main(int argc, char *argv[]) {
-  alive[argc] = 0;
-  // ASAN-CHECK: {{0x.* is located 0 bytes to the right of global variable}}
-  return 0;
-}


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [llvm-branch] r278428 - Merging r277093:

2016-08-11 Thread Hans Wennborg via llvm-branch-commits
Author: hans
Date: Thu Aug 11 16:55:38 2016
New Revision: 278428

URL: http://llvm.org/viewvc/llvm-project?rev=278428&view=rev
Log:
Merging r277093:

r277093 | eugenezelenko | 2016-07-28 17:46:13 -0700 (Thu, 28 Jul 2016) | 4 lines

Add LLVM_ENABLE_LLD option to use LLD as C/C++ linker.

Differential revision: https://reviews.llvm.org/D22896



Modified:
llvm/branches/release_39/   (props changed)
llvm/branches/release_39/CMakeLists.txt
llvm/branches/release_39/cmake/modules/HandleLLVMOptions.cmake

Propchange: llvm/branches/release_39/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug 11 16:55:38 2016
@@ -1,3 +1,3 @@
 /llvm/branches/Apple/Pertwee:110850,110961
 /llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277114,277135,277371,277500,277504,277625,277691,277693,23,278002,278086,278133,278370,278413
+/llvm/trunk:155241,275868-275870,275879,275898,275928,275935,275946,275978,275981,276015,276051,276077,276109,276119,276181,276209,276236-276237,276358,276364,276368,276389,276435,276438,276479,276510,276648,276676,276712,276740,276823,276956,276980,277093,277114,277135,277371,277500,277504,277625,277691,277693,23,278002,278086,278133,278370,278413

Modified: llvm/branches/release_39/CMakeLists.txt
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/CMakeLists.txt?rev=278428&r1=278427&r2=278428&view=diff
==
--- llvm/branches/release_39/CMakeLists.txt (original)
+++ llvm/branches/release_39/CMakeLists.txt Thu Aug 11 16:55:38 2016
@@ -293,6 +293,7 @@ endif()
 option(LLVM_ENABLE_CXX1Y "Compile with C++1y enabled." OFF)
 option(LLVM_ENABLE_LIBCXX "Use libc++ if available." OFF)
 option(LLVM_ENABLE_LIBCXXABI "Use libc++abi when using libc++." OFF)
+option(LLVM_ENABLE_LLD "Use lld as C and C++ linker." OFF)
 option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
 option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
 

Modified: llvm/branches/release_39/cmake/modules/HandleLLVMOptions.cmake
URL: 
http://llvm.org/viewvc/llvm-project/llvm/branches/release_39/cmake/modules/HandleLLVMOptions.cmake?rev=278428&r1=278427&r2=278428&view=diff
==
--- llvm/branches/release_39/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/branches/release_39/cmake/modules/HandleLLVMOptions.cmake Thu Aug 11 
16:55:38 2016
@@ -144,6 +144,12 @@ function(add_flag_or_print_warning flag
   endif()
 endfunction()
 
+if(LLVM_ENABLE_LLD)
+  check_cxx_compiler_flag("-fuse-ld=lld" CXX_SUPPORTS_LLD)
+  append_if(CXX_SUPPORTS_LLD "-fuse-ld=lld"
+CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
+endif()
+
 if( LLVM_ENABLE_PIC )
   if( XCODE )
 # Xcode has -mdynamic-no-pic on by default, which overrides -fPIC. I don't


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r278441 - Update release notes for new warnings.

2016-08-11 Thread Richard Trieu via llvm-branch-commits
Author: rtrieu
Date: Thu Aug 11 19:00:21 2016
New Revision: 278441

URL: http://llvm.org/viewvc/llvm-project?rev=278441&view=rev
Log:
Update release notes for new warnings.

Document -Wcomma, -Wfloat-zero-conversion, and -Wfloat-overflow-conversion

Modified:
cfe/branches/release_39/docs/ReleaseNotes.rst

Modified: cfe/branches/release_39/docs/ReleaseNotes.rst
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/docs/ReleaseNotes.rst?rev=278441&r1=278440&r2=278441&view=diff
==
--- cfe/branches/release_39/docs/ReleaseNotes.rst (original)
+++ cfe/branches/release_39/docs/ReleaseNotes.rst Thu Aug 11 19:00:21 2016
@@ -62,7 +62,13 @@ Clang's diagnostics are constantly being
 explain them more clearly, and provide more accurate source information
 about them. The improvements since the 3.8 release include:
 
--  ...
+- -Wcomma is a new warning to show most uses of the builtin comma operator.
+- -Wfloat-conversion has two new sub-warnings to give finer grain control for
+  floating point to integer conversion warnings.
+  - -Wfloat-overflow-convserion detects when a constant floating point value
+is converted to an integer type and will overflow the target type.
+  - -Wfloat-zero-conversion detects when a non-zero floating point value is
+converted to a zero integer value.
 
 New Compiler Flags
 --


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits


[llvm-branch-commits] [cfe-branch] r278479 - Merging r278471:

2016-08-11 Thread George Burgess IV via llvm-branch-commits
Author: gbiv
Date: Fri Aug 12 00:11:46 2016
New Revision: 278479

URL: http://llvm.org/viewvc/llvm-project?rev=278479&view=rev
Log:
Merging r278471:

r278471 | gbiv | 2016-08-11 21:12:31 -0700 (Thu, 11 Aug 2016) | 11 lines

[Sema] Fix a crash on variadic enable_if functions.

Currently, when trying to evaluate an enable_if condition, we try to
evaluate all arguments a user passes to a function. Given that we can't
use variadic arguments from said condition anyway, not converting them
is a reasonable thing to do. So, this patch makes us ignore any varargs
when attempting to check an enable_if condition.

We'd crash because, in order to convert an argument, we need its
ParmVarDecl. Variadic arguments don't have ParmVarDecls.



Modified:
cfe/branches/release_39/lib/Sema/SemaOverload.cpp
cfe/branches/release_39/test/Sema/enable_if.c
cfe/branches/release_39/test/SemaCXX/enable_if.cpp

Modified: cfe/branches/release_39/lib/Sema/SemaOverload.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/lib/Sema/SemaOverload.cpp?rev=278479&r1=278478&r2=278479&view=diff
==
--- cfe/branches/release_39/lib/Sema/SemaOverload.cpp (original)
+++ cfe/branches/release_39/lib/Sema/SemaOverload.cpp Fri Aug 12 00:11:46 2016
@@ -5975,8 +5975,12 @@ EnableIfAttr *Sema::CheckEnableIf(Functi
   SmallVector ConvertedArgs;
   bool InitializationFailed = false;
 
+  // Ignore any variadic parameters. Converting them is pointless, since the
+  // user can't refer to them in the enable_if condition.
+  unsigned ArgSizeNoVarargs = std::min(Function->param_size(), Args.size());
+
   // Convert the arguments.
-  for (unsigned I = 0, E = Args.size(); I != E; ++I) {
+  for (unsigned I = 0; I != ArgSizeNoVarargs; ++I) {
 ExprResult R;
 if (I == 0 && !MissingImplicitThis && isa(Function) &&
 !cast(Function)->isStatic() &&

Modified: cfe/branches/release_39/test/Sema/enable_if.c
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/test/Sema/enable_if.c?rev=278479&r1=278478&r2=278479&view=diff
==
--- cfe/branches/release_39/test/Sema/enable_if.c (original)
+++ cfe/branches/release_39/test/Sema/enable_if.c Fri Aug 12 00:11:46 2016
@@ -149,4 +149,25 @@ void PR27122_ext() {
   regular_enable_if(1, 2); // expected-error{{too many arguments}}
   regular_enable_if(); // expected-error{{too few arguments}}
 }
+
+// We had a bug where we'd crash upon trying to evaluate varargs.
+void variadic_enable_if(int a, ...) __attribute__((enable_if(a, ""))); // 
expected-note 6 {{disabled}}
+void variadic_test() {
+  variadic_enable_if(1);
+  variadic_enable_if(1, 2);
+  variadic_enable_if(1, "c", 3);
+
+  variadic_enable_if(0); // expected-error{{no matching}}
+  variadic_enable_if(0, 2); // expected-error{{no matching}}
+  variadic_enable_if(0, "c", 3); // expected-error{{no matching}}
+
+  int m;
+  variadic_enable_if(1);
+  variadic_enable_if(1, m);
+  variadic_enable_if(1, m, "c");
+
+  variadic_enable_if(0); // expected-error{{no matching}}
+  variadic_enable_if(0, m); // expected-error{{no matching}}
+  variadic_enable_if(0, m, 3); // expected-error{{no matching}}
+}
 #endif

Modified: cfe/branches/release_39/test/SemaCXX/enable_if.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/branches/release_39/test/SemaCXX/enable_if.cpp?rev=278479&r1=278478&r2=278479&view=diff
==
--- cfe/branches/release_39/test/SemaCXX/enable_if.cpp (original)
+++ cfe/branches/release_39/test/SemaCXX/enable_if.cpp Fri Aug 12 00:11:46 2016
@@ -417,3 +417,26 @@ template  constexpr int callTempl
 constexpr int B = callTemplated<0>(); // expected-error{{initialized by a 
constant expression}} expected-error@-2{{no matching function for call to 
'templated'}} expected-note{{in instantiation of function template}} 
expected-note@-9{{candidate disabled}}
 static_assert(callTemplated<1>() == 1, "");
 }
+
+namespace variadic {
+void foo(int a, int b = 0, ...) __attribute__((enable_if(a && b, ""))); // 
expected-note 6{{disabled}}
+
+void testFoo() {
+  foo(1, 1);
+  foo(1, 1, 2);
+  foo(1, 1, 2, 3);
+
+  foo(1, 0); // expected-error{{no matching}}
+  foo(1, 0, 2); // expected-error{{no matching}}
+  foo(1, 0, 2, 3); // expected-error{{no matching}}
+
+  int m;
+  foo(1, 1);
+  foo(1, 1, m);
+  foo(1, 1, m, 3);
+
+  foo(1, 0); // expected-error{{no matching}}
+  foo(1, 0, m); // expected-error{{no matching}}
+  foo(1, 0, m, 3); // expected-error{{no matching}}
+}
+}


___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits