[PATCH] D25640: [CUDA] [AST] Allow isInlineDefinitionExternallyVisible to be called on functions without bodies.

2016-10-27 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 76118. jlebar added a comment. Add WillHaveBody flag. https://reviews.llvm.org/D25640 Files: clang/include/clang/AST/Decl.h clang/lib/AST/Decl.cpp clang/lib/Sema/SemaDecl.cpp clang/test/SemaCUDA/gnu-inline.cu Index: clang/test/SemaCUDA/gnu-inline.cu

Re: r285263 - Fix bug when compiling CUDA code with -emit-llvm and -o.

2016-10-26 Thread Justin Lebar via cfe-commits
Thank you for fixing this! On Wed, Oct 26, 2016 at 5:53 PM, Samuel Antao via cfe-commits wrote: > Author: sfantao > Date: Wed Oct 26 19:53:34 2016 > New Revision: 285263 > > URL: http://llvm.org/viewvc/llvm-project?rev=285263&view=rev > Log: > Fix bug when compiling CUDA code with -emit-llvm and

[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.

2016-10-26 Thread Justin Lebar via cfe-commits
jlebar added a comment. So, good news -- these three builtins are already constexpr-evaluatable. :) I'll add a test. https://reviews.llvm.org/D25403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.

2016-10-26 Thread Justin Lebar via cfe-commits
jlebar added a comment. //Let "CE" mean "constexpr-evaluatable". // libc++ attempts to be backwards-compatible with old versions of clang, right? Old versions of clang are going to fail, since the builtin will not be CE. Is the idea to write a test that checks that, if __builtin_isfinite is C

[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.

2016-10-26 Thread Justin Lebar via cfe-commits
jlebar added a comment. > I'm not sure about that. It seems like a useful feature for the builtins to > have. Logically speaking, they should be constexpr. I agree that it's logically correct for the builtins to be constexpr-evaluatable. My point is just that doing this work and then writing

[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.

2016-10-26 Thread Justin Lebar via cfe-commits
jlebar added a comment. In https://reviews.llvm.org/D25403#580422, @hfinkel wrote: > Okay. Why not fix the Clang builtins so that they're evaluatable for constant > inputs in a constexpr context? Then we can do this and test the change. I am not sure how much value we would derive from testing

[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.

2016-10-26 Thread Justin Lebar via cfe-commits
jlebar added a comment. > Is this because the functions are in instead of in are you > don't want to mark all of as host/device? Yes. cmath is its own beast; we need to have our own implementation of it in order to direct the std functions to the appropriate low-level device functions. (A

r285251 - [CUDA] Move device placement new definitions into a wrapper header.

2016-10-26 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Oct 26 17:13:26 2016 New Revision: 285251 URL: http://llvm.org/viewvc/llvm-project?rev=285251&view=rev Log: [CUDA] Move device placement new definitions into a wrapper header. Previously, these were always included -- after this change, you have to #include , which is co

r285250 - [CUDA] Switch cuda_wrappers/complex to use a proper include guard instead of #pragma once.

2016-10-26 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Oct 26 17:13:20 2016 New Revision: 285250 URL: http://llvm.org/viewvc/llvm-project?rev=285250&view=rev Log: [CUDA] Switch cuda_wrappers/complex to use a proper include guard instead of #pragma once. This is consistent with the rest of our internal headers. Modified:

[PATCH] D18172: [CUDA][OpenMP] Add a generic offload action builder

2016-10-26 Thread Justin Lebar via cfe-commits
jlebar added a comment. Hi, Samuel. This change introduced a new crash / assertion failure in the driver. $ echo | llvm-run clang -emit-llvm -c -x cuda - -o /dev/null Before this patch, we get an error (perhaps not as helpful as we might want, but still): clang-3.8: error: cannot specify

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-25 Thread Justin Lebar via cfe-commits
jlebar added a comment. Doesn't look like we changed any testcases when we changed this behavior? The change in behavior may be unobservable, but even still it seems worthwhile to have tests that check that we're not doing any of the alternatives we considered. Comment at:

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-25 Thread Justin Lebar via cfe-commits
jlebar added a comment. Is it possible to write a testcase for the using-declaration change? https://reviews.llvm.org/D25809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25640: [CUDA] [AST] Allow isInlineDefinitionExternallyVisible to be called on functions without bodies.

2016-10-25 Thread Justin Lebar via cfe-commits
jlebar added a comment. In https://reviews.llvm.org/D25640#579238, @tra wrote: > I'm OK with the change, but the comments suggest that things may be more > complicated. > How about disabling assert for CUDA only? I don't think that is the right approach. This function has nothing to do with

[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.

2016-10-23 Thread Justin Lebar via cfe-commits
jlebar added a comment. Friendly ping? https://reviews.llvm.org/D25403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r284947 - Remove LLVM_CONSTEXPR.

2016-10-23 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Sun Oct 23 14:39:16 2016 New Revision: 284947 URL: http://llvm.org/viewvc/llvm-project?rev=284947&view=rev Log: Remove LLVM_CONSTEXPR. Summary: With MSVC 2013 and GCC < 4.8 gone, we can use the "constexpr" keyword. Reviewers: bkramer, mehdi_amini Subscribers: llvm-commits

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added inline comments. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaCUDA.cpp:87 + + if ((HasHostAttr && HasDeviceAttr) || ForceCUDAHostDeviceDepth > 0) +return CFT_HostDevice; tra wrote: > jl

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:5628 case AttributeList::AT_CUDAHost: -handleSimpleAttributeWithExclusions(S, D, - Attr); +if (!D->hasAttr()) + handleSimpleAtt

[PATCH] D25640: [CUDA] [AST] Allow isInlineDefinitionExternallyVisible to be called on functions without bodies.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. Friendly ping. This assert breaks basically all cuda compilation on certain libstdc++ versions. If this change is wrong, I sort of urgently need to figure out the right thing. https://reviews.llvm.org/D25640 ___ cfe-commi

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: test/SemaCUDA/function-template-overload.cu:44 +// explicitly specialize or instantiate function tempaltes. +template <> __host__ HType overload_hd(int a); +// expected-error@-1 {{no function template matches function template specializa

[PATCH] D25809: [CUDA] Improved target attribute-based overloading.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:87 + + if ((HasHostAttr && HasDeviceAttr) || ForceCUDAHostDeviceDepth > 0) +return CFT_HostDevice; Checking ForceCUDAHostDeviceDepth here is...yeah. Especially because the other overload of th

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: include/clang/Sema/Sema.h:9396 + CUDAFunctionTarget IdentifyCUDATarget(const FunctionDecl *D, +bool IgnoreImplicitHDAttr = false); CUDAFunctionTarget IdentifyCUDATarget(const AttributeList *Attr

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. To close the loop, we talked about this IRL, and I agree this is the most sane option we can come up with. The user-facing principle is that the signatures of function template specializations must match. We consider CUDA attributes to be part of the function's signatu

r284887 - Switch SmallSetVector to use DenseSet when it overflows its inline space.

2016-10-21 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Oct 21 16:45:01 2016 New Revision: 284887 URL: http://llvm.org/viewvc/llvm-project?rev=284887&view=rev Log: Switch SmallSetVector to use DenseSet when it overflows its inline space. Summary: SetVector already used DenseSet, but SmallSetVector used std::set. This leads to

r284882 - [CUDA] Simplify some repeated diagnostic expectations in CUDA tests.

2016-10-21 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Oct 21 15:50:47 2016 New Revision: 284882 URL: http://llvm.org/viewvc/llvm-project?rev=284882&view=rev Log: [CUDA] Simplify some repeated diagnostic expectations in CUDA tests. Instead of repeating the diagnostic, use "expected-note N". Test-only change. Modified: c

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. > This patch changes the way we match target attributes of base template vs > attributes used in explicit instantiation or specialization so that only > explicitly specified attributes are considered. Another question about this: When we have something inside of the for

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. Thank you for the reviews, everyone! Repository: rL LLVM https://reviews.llvm.org/D25647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r284873 - [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Oct 21 15:13:39 2016 New Revision: 284873 URL: http://llvm.org/viewvc/llvm-project?rev=284873&view=rev Log: [clang-tidy] Don't use a SmallSetVector of an enum. Summary: This doesn't work after converting SmallSetVector to use DenseSet. Instead we can just use a SmallVect

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284873: [clang-tidy] Don't use a SmallSetVector of an enum. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25647?vs=75443&id=75478#toc Repository: rL LLVM https://reviews.l

[PATCH] D25797: [CUDA] Use FunctionDeclAndLoc for the Sema::LocsWithCUDACallDiags hashtable.

2016-10-21 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284869: [CUDA] Use FunctionDeclAndLoc for the Sema::LocsWithCUDACallDiags hashtable. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25797?vs=75231&id=75474#toc Repository: r

r284869 - [CUDA] Use FunctionDeclAndLoc for the Sema::LocsWithCUDACallDiags hashtable.

2016-10-21 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Fri Oct 21 15:08:52 2016 New Revision: 284869 URL: http://llvm.org/viewvc/llvm-project?rev=284869&view=rev Log: [CUDA] Use FunctionDeclAndLoc for the Sema::LocsWithCUDACallDiags hashtable. Summary: NFC Reviewers: rnk Subscribers: cfe-commits Differential Revision: https://

[PATCH] D25796: [CUDA] Create __host__ and device variants of standard allocator declarations.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added inline comments. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaExprCXX.cpp:2596 - QualType FnType = Context.getFunctionType(Return, Params, EPI); - FunctionDecl *Alloc = -FunctionDecl::Create(Context,

[PATCH] D25845: [CUDA] Ignore implicit target attributes during function template instantiation.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: test/SemaCUDA/function-template-overload.cu:62 +template constexpr T overload_ce_implicit_hd(T a) { return a+1; } +// expected-note@-1 3 {{candidate template ignored: target attributes do not match}} + Oh, I didn't know

[PATCH] D25796: [CUDA] Create __host__ and device variants of standard allocator declarations.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:2596 - QualType FnType = Context.getFunctionType(Return, Params, EPI); - FunctionDecl *Alloc = -FunctionDecl::Create(Context, GlobalCtx, SourceLocation(), - SourceLocation(), Name,

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:103 + auto &Members = ClassWithSpecialMembers[ID]; + if (find(Members, Kind) == Members.end()) Members.push_back(Kind); +} jleb

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 75443. jlebar marked 5 inline comments as done. jlebar added a comment. Adjust formatting, write out type of 'auto'. https://reviews.llvm.org/D25647 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp clang-tools-extra/c

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. Thank you very much for the review! Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:103 + auto &Members = ClassWithSpecialMembers[ID]; + if (find(Members, Kind) == Members.end()) Members.push_back(Kin

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. Thank you very much for the review! Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:103 + auto &Members = ClassWithSpecialMembers[ID]; + if (find(Members, Kind) == Members.end()) Members.push_back(Kin

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. Hi, friendly ping? This trivial patch is the only blocker remaining before I can land https://reviews.llvm.org/D25648, which is the first part of my Grand Set Refactoring (see mail to llvm-dev about a week ago). Repository: rL LLVM https://reviews.llvm.org/D25647

[PATCH] D25796: [CUDA] Create __host__ and device variants of standard allocator declarations.

2016-10-21 Thread Justin Lebar via cfe-commits
jlebar added a comment. Is it not possible to write a testcase for this? https://reviews.llvm.org/D25796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25797: [CUDA] Use FunctionDeclAndLoc for the Sema::LocsWithCUDACallDiags hashtable.

2016-10-19 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added a subscriber: cfe-commits. NFC https://reviews.llvm.org/D25797 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaCUDA.cpp Index: clang/lib/Sema/SemaCUDA.cpp ===

r284647 - [CUDA] When we emit an error that might have been deferred, also print a callstack.

2016-10-19 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Oct 19 16:15:01 2016 New Revision: 284647 URL: http://llvm.org/viewvc/llvm-project?rev=284647&view=rev Log: [CUDA] When we emit an error that might have been deferred, also print a callstack. Summary: Previously, when you did something not allowed in a host+device functi

[PATCH] D25704: [CUDA] When we emit an error that might have been deferred, also print a callstack.

2016-10-19 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284647: [CUDA] When we emit an error that might have been deferred, also print a… (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25704?vs=75178&id=75226#toc Repository: rL L

[PATCH] D25702: [CUDA] Emit errors for wrong-side calls made on the same line as non-wrong-side calls.

2016-10-19 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284643: [CUDA] Emit errors for wrong-side calls made on the same line as non-wrong-side… (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25702?vs=74910&id=75220#toc Repository:

[PATCH] D25703: [AST] Add CanonicalDeclPtr.

2016-10-19 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284644: [AST] Add CanonicalDeclPtr. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25703?vs=74911&id=75222#toc Repository: rL LLVM https://reviews.llvm.org/D25703 Files:

r284644 - [AST] Add CanonicalDeclPtr.

2016-10-19 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Oct 19 16:03:42 2016 New Revision: 284644 URL: http://llvm.org/viewvc/llvm-project?rev=284644&view=rev Log: [AST] Add CanonicalDeclPtr. Summary: CanonicalDeclPtr is just like a T*, except it calls T::getCanonicalDecl() on construction. This is useful as the key in a "set

r284643 - [CUDA] Emit errors for wrong-side calls made on the same line as non-wrong-side calls.

2016-10-19 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Oct 19 16:03:38 2016 New Revision: 284643 URL: http://llvm.org/viewvc/llvm-project?rev=284643&view=rev Log: [CUDA] Emit errors for wrong-side calls made on the same line as non-wrong-side calls. Summary: This fixes two related bugs: 1) Previously, if you had a non-wrong

[PATCH] D25704: [CUDA] When we emit an error that might have been deferred, also print a callstack.

2016-10-19 Thread Justin Lebar via cfe-commits
jlebar marked 2 inline comments as done. jlebar added a comment. Thank you for the review, Reid. https://reviews.llvm.org/D25704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25704: [CUDA] When we emit an error that might have been deferred, also print a callstack.

2016-10-19 Thread Justin Lebar via cfe-commits
jlebar marked 2 inline comments as done. jlebar added a comment. I'm going to submit this and send a patch to reuse FunctionDeclAndLoc. But I'm happy to add a comment about the note as well. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6707 +def note_called_

[PATCH] D25704: [CUDA] When we emit an error that might have been deferred, also print a callstack.

2016-10-19 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: clang/include/clang/Sema/Sema.h:9292 + llvm::DenseMap, + /* Callees = */ llvm::SetVector> + CUDACallGraph; rnk wrote: > Rather than having a custom key type, maybe it would be better to phrase this

[PATCH] D25704: [CUDA] When we emit an error that might have been deferred, also print a callstack.

2016-10-19 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 75178. jlebar marked 2 inline comments as done. jlebar added a comment. Address rnk's comments. https://reviews.llvm.org/D25704 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaCUDA.cpp clang/

[PATCH] D25702: [CUDA] Emit errors for wrong-side calls made on the same line as non-wrong-side calls.

2016-10-19 Thread Justin Lebar via cfe-commits
jlebar added a comment. In https://reviews.llvm.org/D25702#574289, @rnk wrote: > lgtm > > I'm assuming you're going to follow this up with CanonicalDeclPtr usage. Yes, that's in https://reviews.llvm.org/D25704. https://reviews.llvm.org/D25702 ___

r284553 - [CUDA] Rework tests now that we emit deferred diagnostics during sema. Test-only change.

2016-10-18 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Oct 18 19:06:49 2016 New Revision: 284553 URL: http://llvm.org/viewvc/llvm-project?rev=284553&view=rev Log: [CUDA] Rework tests now that we emit deferred diagnostics during sema. Test-only change. Summary: Previously we had to split out a lot of our tests into a test th

[PATCH] D25755: [CUDA] Rework tests now that we emit deferred diagnostics during sema. Test-only change.

2016-10-18 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284553: [CUDA] Rework tests now that we emit deferred diagnostics during sema. Test… (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25755?vs=75085&id=75099#toc Repository:

[PATCH] D25755: [CUDA] Rework tests now that we emit deferred diagnostics during sema. Test-only change.

2016-10-18 Thread Justin Lebar via cfe-commits
jlebar updated this revision to Diff 75085. jlebar added a comment. Remove line that should be added in a different patch. https://reviews.llvm.org/D25755 Files: clang/test/PCH/pragma-cuda-force-host-device.cu clang/test/Parser/cuda-force-host-device-templates.cu clang/test/SemaCUDA/devic

[PATCH] D25755: [CUDA] Rework tests now that we emit deferred diagnostics during sema. Test-only change.

2016-10-18 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. Previously we had to split out a lot of our tests into a test that checked only immediate errors and a test that checked only deferred errors. This was because, if you emitted any immediate errors,

[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.

2016-10-18 Thread Justin Lebar via cfe-commits
jlebar added a comment. In https://reviews.llvm.org/D25403#573666, @mclow.lists wrote: > Yesterday and today is the first time in a while that clang has been > seriously broken for more than an hour or so. > I'm not inclined to worry about it yet. Oh, awesome. That sounds good to me. The qu

[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.

2016-10-18 Thread Justin Lebar via cfe-commits
jlebar added a comment. Thank you, Marshall. In https://reviews.llvm.org/D25403#572998, @mclow.lists wrote: > My build setup is similar to yours (on Mac OS X): > > cd $LLVM_BUILD ; rm -rf libcxx ; mkdir libcxx ; cd libcxx > CXX=$LLVM_BIN/clang++ cmake -DLLVM_PATH=$LLVM/llvm > -DLIBCXX_CXX_

[PATCH] D25403: [CUDA] Mark __libcpp_{isnan, isinf, isfinite} as constexpr.

2016-10-17 Thread Justin Lebar via cfe-commits
jlebar added a comment. > The tests should be runnable with lit. I generally just do an in-tree build > and run make check-libcxx. @EricWF , what's the recommended way of running > the tests from an out-of-tree build? Things seem broken at the moment with clang from tip of tree. I did a clean

[PATCH] D25711: [Basic] unique_ptr-ify SourceManager::MacroArgsCacheMap (NFC)

2016-10-17 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. The great thing about unique_ptr is, if it compiles, we're probably good. :) https://reviews.llvm.org/D25711 ___ cfe-commits mailing list cfe-co

[PATCH] D25703: [AST] Add CanonicalDeclPtr.

2016-10-17 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added subscribers: tra, cfe-commits. CanonicalDeclPtr is just like a T*, except it calls T::getCanonicalDecl() on construction. This is useful as the key in a "set of canonical Decls" -- it's much less error-prone than calling get

[PATCH] D25704: [CUDA] When we emit an error that might have been deferred, also print a callstack.

2016-10-17 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added subscribers: tra, cfe-commits. Previously, when you did something not allowed in a host+device function and then caused it to be codegen'ed, we would print out an error telling you that you did something bad, but we wouldn't

[PATCH] D25702: [CUDA] Emit errors for wrong-side calls made on the same line as non-wrong-side calls.

2016-10-17 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: cfe-commits, rnk. This fixes two related bugs: 1. Previously, if you had a non-wrong side call at some source code location L, we wouldn't emit errors for wrong-side calls that appeared at L. 2. We'd only emit

r284355 - [CUDA] Fix false-positive in known-emitted handling.

2016-10-16 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Sun Oct 16 21:25:55 2016 New Revision: 284355 URL: http://llvm.org/viewvc/llvm-project?rev=284355&view=rev Log: [CUDA] Fix false-positive in known-emitted handling. Previously: When compiling for host, our constructed call graph went *through* kernel calls. This meant that i

[PATCH] D25647: [clang-tidy] Don't use a SmallSetVector of an enum.

2016-10-15 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: timshen. jlebar added a subscriber: cfe-commits. Herald added a subscriber: nemanjai. This doesn't work after converting SmallSetVector to use DenseSet. Instead we can just use a SmallVector. https://reviews.llvm.org/D25647 Files: clang-

[PATCH] D25640: [CUDA] [AST] Allow isInlineDefinitionExternallyVisible to be called on functions without bodies.

2016-10-14 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added reviewers: rsmith, tra. jlebar added a subscriber: cfe-commits. Herald added a subscriber: aemerson. In CUDA compilation, we call isInlineDefinitionExternallyVisible (via getGVALinkageForFunction) on functions while parsing their definitions. At the poin

[PATCH] D25571: Add and use isDiscardableGVALinkage function.

2016-10-13 Thread Justin Lebar via cfe-commits
jlebar added inline comments. Comment at: clang/include/clang/Sema/Sema.h:9244 /// CUDAKnownEmittedFns. - llvm::DenseMap> CUDACallGraph; + llvm::DenseMap> CUDACallGraph; rnk wrote: > I think you meant to make this change as part of the original patch. Oop

[PATCH] D25571: Add and use isDiscardableGVALinkage function.

2016-10-13 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284159: Add and use isDiscardableGVALinkage function. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25571?vs=74562&id=74580#toc Repository: rL LLVM https://reviews.llvm.or

r284159 - Add and use isDiscardableGVALinkage function.

2016-10-13 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Oct 13 15:52:17 2016 New Revision: 284159 URL: http://llvm.org/viewvc/llvm-project?rev=284159&view=rev Log: Add and use isDiscardableGVALinkage function. Reviewers: rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25571 Modified: cfe/tr

[PATCH] D25541: [CUDA] Emit deferred diagnostics during Sema rather than during codegen.

2016-10-13 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. jlebar marked an inline comment as done. Closed by commit rL284158: [CUDA] Emit deferred diagnostics during Sema rather than during codegen. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25541?v

r284158 - [CUDA] Emit deferred diagnostics during Sema rather than during codegen.

2016-10-13 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Oct 13 15:52:12 2016 New Revision: 284158 URL: http://llvm.org/viewvc/llvm-project?rev=284158&view=rev Log: [CUDA] Emit deferred diagnostics during Sema rather than during codegen. Summary: Emitting deferred diagnostics during codegen was a hack. It did work, but usabili

[PATCH] D25139: [CUDA] Add Sema::CUDADiagBuilder and Sema::CUDADiagIfDeviceCode().

2016-10-13 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284143: [CUDA] Add Sema::CUDADiagBuilder and Sema::CUDADiagIf{Device,Host}Code(). (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25139?vs=73576&id=74564#toc Repository: rL L

[PATCH] D25150: [CUDA] Allow static variables in __host__ __device__ functions, so long as they're never codegen'ed for device.

2016-10-13 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284145: [CUDA] Allow static variables in __host__ __device__ functions, so long as… (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25150?vs=73182&id=74566#toc Repository: rL

[PATCH] D25143: [CUDA] Disallow __shared__ variables in host functions.

2016-10-13 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL284144: [CUDA] Disallow __shared__ variables in host functions. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25143?vs=73172&id=74565#toc Repository: rL LLVM https://revie

r284145 - [CUDA] Allow static variables in __host__ __device__ functions, so long as they're never codegen'ed for device.

2016-10-13 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Oct 13 13:45:17 2016 New Revision: 284145 URL: http://llvm.org/viewvc/llvm-project?rev=284145&view=rev Log: [CUDA] Allow static variables in __host__ __device__ functions, so long as they're never codegen'ed for device. Reviewers: tra, rnk Subscribers: cfe-commits Diff

r284143 - [CUDA] Add Sema::CUDADiagBuilder and Sema::CUDADiagIf{Device, Host}Code().

2016-10-13 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Oct 13 13:45:08 2016 New Revision: 284143 URL: http://llvm.org/viewvc/llvm-project?rev=284143&view=rev Log: [CUDA] Add Sema::CUDADiagBuilder and Sema::CUDADiagIf{Device,Host}Code(). Summary: Together these let you easily create diagnostics that - are never emitted for h

r284144 - [CUDA] Disallow __shared__ variables in host functions.

2016-10-13 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Oct 13 13:45:13 2016 New Revision: 284144 URL: http://llvm.org/viewvc/llvm-project?rev=284144&view=rev Log: [CUDA] Disallow __shared__ variables in host functions. Reviewers: tra, rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25143 Modif

[PATCH] D25541: [CUDA] Emit deferred diagnostics during Sema rather than during codegen.

2016-10-13 Thread Justin Lebar via cfe-commits
jlebar marked 2 inline comments as done. jlebar added a comment. In https://reviews.llvm.org/D25541#569360, @rnk wrote: > Nice! Looks like this wasn't too bad. Like many things in my life lately, it wasn't after Richard explained to me how to do it. :) Thank you for the review. =

[PATCH] D25571: Add and use isDiscardableGVALinkage function.

2016-10-13 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added a subscriber: cfe-commits. https://reviews.llvm.org/D25571 Files: clang/include/clang/Basic/Linkage.h clang/include/clang/Sema/Sema.h clang/lib/AST/ASTContext.cpp clang/lib/Sema/SemaCUDA.cpp Index: clang/lib/Sema/S

[PATCH] D25541: [CUDA] Emit deferred diagnostics during Sema rather than during codegen.

2016-10-12 Thread Justin Lebar via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added subscribers: tra, rsmith, cfe-commits. Emitting deferred diagnostics during codegen was a hack. It did work, but usability was poor, both for us as compiler devs and for users. We don't codegen if there are any sema errors,

[PATCH] D25139: [CUDA] Add Sema::CUDADiagBuilder and Sema::CUDADiagIfDeviceCode().

2016-10-12 Thread Justin Lebar via cfe-commits
jlebar added a comment. If you're busy with other stuff, that's cool, this is not urgent, but pinging in case this got lost. https://reviews.llvm.org/D25139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

Re: r283963 - [CUDA] Make touching a kernel from a __host__ __device__ function a deferred error.

2016-10-11 Thread Justin Lebar via cfe-commits
Yes, I have yet to figure out when that REQUIRES comment is, erm, required. Sorry. :-/ I believe Art checked in a fix. On Oct 11, 2016 7:22 PM, "Chandler Carruth" wrote: > On Tue, Oct 11, 2016 at 6:39 PM Justin Lebar via cfe-commits < > cfe-commits@lists.llvm.org> wrot

r283963 - [CUDA] Make touching a kernel from a __host__ __device__ function a deferred error.

2016-10-11 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Oct 11 20:30:08 2016 New Revision: 283963 URL: http://llvm.org/viewvc/llvm-project?rev=283963&view=rev Log: [CUDA] Make touching a kernel from a __host__ __device__ function a deferred error. Previously, this was an immediate, don't pass go, don't collect $200 error. Bu

r283907 - [CUDA] Re-land support for (r283683 and r283680).

2016-10-11 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Tue Oct 11 12:36:03 2016 New Revision: 283907 URL: http://llvm.org/viewvc/llvm-project?rev=283907&view=rev Log: [CUDA] Re-land support for (r283683 and r283680). These were reverted in r283753 and r283747. The first patch added a header to the root 'Headers' install directo

Re: r283680 - [CUDA] Support and std::min/max on the device.

2016-10-11 Thread Justin Lebar via cfe-commits
>> >> Easiest fix at this point would be to find someone with ssh access to >> the buildbots to rm -rf the stage 1 directory. >> >> On Mon, Oct 10, 2016 at 7:19 AM, Nico Weber wrote: >> > This broke bootstrap builds, I reverted it for now in r283747. >>

[PATCH] D25425: [AST] Convert Marshallers to use unique_ptr.

2016-10-11 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. jlebar marked an inline comment as done. Closed by commit rL283773: [AST] Convert Marshallers to use unique_ptr. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25425?vs=74103&id=74207#toc Reposi

[PATCH] D25419: Use unique_ptr in LLVMContextImpl's constant maps.

2016-10-11 Thread Justin Lebar via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL283767: Use unique_ptr in LLVMContextImpl's constant maps. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D25419?vs=74097&id=74206#toc Repository: rL LLVM https://reviews.ll

r283833 - [Sema] Add explicit move constructor for ExpressionEvaluationContextRecord.

2016-10-10 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Oct 10 19:23:53 2016 New Revision: 283833 URL: http://llvm.org/viewvc/llvm-project?rev=283833&view=rev Log: [Sema] Add explicit move constructor for ExpressionEvaluationContextRecord. This is needed to keep MSVC 2013 happy. Modified: cfe/trunk/include/clang/Sema/Sema

[PATCH] D25405: [Sema] Use unique_ptr instead of raw pointers in the late-parsed templates map.

2016-10-10 Thread Justin Lebar via cfe-commits
jlebar closed this revision. jlebar added a comment. https://github.com/llvm-mirror/clang/commit/1f062cda84f537547021640c8bcd9c589c418d96 https://reviews.llvm.org/D25405 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D25420: [AST] Convert MangleNumberingContext to a unique_ptr.

2016-10-10 Thread Justin Lebar via cfe-commits
jlebar closed this revision. jlebar added a comment. https://github.com/llvm-mirror/clang/commit/7c4b8c0a7921b999f5a73d6ba47ee8350676f747 https://reviews.llvm.org/D25420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D25421: [AST] Use unique_ptr for VTableLayout.

2016-10-10 Thread Justin Lebar via cfe-commits
jlebar closed this revision. jlebar added a comment. https://github.com/llvm-mirror/clang/commit/7b7c816e52feba6f89acde8b43bb0d67b5042697 https://reviews.llvm.org/D25421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D25422: Use unique_ptr for VPtrLocationsMap and VPtrInfoVector.

2016-10-10 Thread Justin Lebar via cfe-commits
jlebar closed this revision. jlebar added a comment. https://github.com/llvm-mirror/clang/commit/dd0969a0ae3b6421685a9d78953bb1127a8cfe9c https://reviews.llvm.org/D25422 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D25423: Use unique_ptr for VTableBuilder::VFTableLayouts map.

2016-10-10 Thread Justin Lebar via cfe-commits
jlebar closed this revision. jlebar added a comment. https://github.com/llvm-mirror/clang/commit/be96a853a5dd33cce210617fb11575d33df7 https://reviews.llvm.org/D25423 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D25424: Use unique_ptr for VTableBuilder::VBaseInfo map.

2016-10-10 Thread Justin Lebar via cfe-commits
jlebar closed this revision. jlebar added a comment. Phab seemed to be having trouble closing revisions today. https://github.com/llvm-mirror/clang/commit/c4e9e7b35a2d113c8aa3bcdaf858c5bac4d78b03 https://reviews.llvm.org/D25424 ___ cfe-commits mail

[PATCH] D25427: [Analysis] Use unique_ptr for CallGraph::FunctionMap.

2016-10-10 Thread Justin Lebar via cfe-commits
jlebar accepted this revision. jlebar added a reviewer: jlebar. jlebar marked an inline comment as done. jlebar added a comment. This revision is now accepted and ready to land. https://github.com/llvm-mirror/clang/commit/b28828e8b38c7e208386f783e6502305c42cb479 https://reviews.llvm.org/D25427

[PATCH] D25426: [Analysis] Use unique_ptr in AnalyaisDeclContextManager's ContextMap.

2016-10-10 Thread Justin Lebar via cfe-commits
jlebar added a comment. Heh, all right. So long as I didn't screw anything up, I'm happy with it being a mystery. https://reviews.llvm.org/D25426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D25426: [Analysis] Use unique_ptr in AnalyaisDeclContextManager's ContextMap.

2016-10-10 Thread Justin Lebar via cfe-commits
jlebar added a comment. Do you know why phab didn't pick up this change when I pushed it? https://reviews.llvm.org/D25426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r283766 - [Sema] Use unique_ptr instead of raw pointers in the late-parsed templates map.

2016-10-10 Thread Justin Lebar via cfe-commits
Some of your resent commits broke the next builder: > http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/12710 > > Please have a look at it? > > Thanks > > Galina > > > > On Mon, Oct 10, 2016 at 9:26 AM, Justin Lebar via cfe-commits &

r283790 - [AST] Don't use make_pointee_iterator in VTableBuilder.

2016-10-10 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Oct 10 14:26:22 2016 New Revision: 283790 URL: http://llvm.org/viewvc/llvm-project?rev=283790&view=rev Log: [AST] Don't use make_pointee_iterator in VTableBuilder. Our implementation of make_pointee_iterator seems to be causing MSVC 2015 to crash, so I'm going to remove i

r283778 - [Examples] Fix use of sema.LateParsedTemplateMap in clang/examples.

2016-10-10 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Oct 10 11:41:00 2016 New Revision: 283778 URL: http://llvm.org/viewvc/llvm-project?rev=283778&view=rev Log: [Examples] Fix use of sema.LateParsedTemplateMap in clang/examples. Modified: cfe/trunk/examples/PrintFunctionNames/PrintFunctionNames.cpp Modified: cfe/trunk/

r283775 - [Analysis] Use unique_ptr for CallGraph::FunctionMap.

2016-10-10 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Mon Oct 10 11:26:48 2016 New Revision: 283775 URL: http://llvm.org/viewvc/llvm-project?rev=283775&view=rev Log: [Analysis] Use unique_ptr for CallGraph::FunctionMap. Reviewers: timshen Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25427 Modified

<    1   2   3   4   5   6   7   8   9   >