[PATCH] D95754: [clang] Print 32 candidates on the first failure, with -fshow-overloads=best.

2021-02-15 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. Thank you for your comments, Aaron! Comment at: clang/lib/Sema/Sema.cpp:2310 + S.Diags.noteNumOverloadCandidatesShown(ShownOverloads); + aaronpuchert wrote: > Why not in the following `if`? I assume we want to show a long list not >

[PATCH] D95754: [clang] Print 32 candidates on the first failure, with -fshow-overloads=best.

2021-02-15 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added inline comments. Comment at: clang/lib/Sema/Sema.cpp:2310 + S.Diags.noteNumOverloadCandidatesShown(ShownOverloads); + aaronpuchert wrote: > jlebar wrote: > > aaronpuchert wrote: > > > Why not in the following `if`? I assume we want to show a long

[PATCH] D95754: [clang] Print 32 candidates on the first failure, with -fshow-overloads=best.

2021-02-19 Thread Justin Lebar via Phabricator via cfe-commits
jlebar updated this revision to Diff 325158. jlebar added a comment. Rename noteNumOverloadCandidatesShown -> overloadCandidatesShown. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95754/new/ https://reviews.llvm.org/D95754 Files: clang/include/

[PATCH] D95754: [clang] Print 32 candidates on the first failure, with -fshow-overloads=best.

2021-02-19 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. > I guess I was confused by the function name Haha, two hardest problems in computer science. :) Changed it to `S.Diags.overloadCandidatesShown(ShownOverloads);` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95754/new/ ht

[PATCH] D95754: [clang] Print 32 candidates on the first failure, with -fshow-overloads=best.

2021-02-20 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. Thank you for the review! I'll put a note in my cal to land this in a few days if I don't hear from @rsmith Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95754/new/ https://reviews.llvm.org/D95754

[PATCH] D95754: [clang] Print 32 candidates on the first failure, with -fshow-overloads=best.

2021-02-25 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc90dac27e94e: [clang] Print 32 candidates on the first failure, with -fshow-overloads=best. (authored by jlebar). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D97708: [CUDA] Remove `noreturn` attribute from __assertfail().

2021-03-01 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. Maybe add a comment on assertfail that we don't want it to be noreturn because blah blah? So someone doesn't come back and add it when we're not looking. :) Repository: rG LLVM Github Mon

[PATCH] D114454: [NFC][AIX]Disable unstable CSA tests failing on AIX

2021-11-24 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. > Let me summon them. *I have no memory of this place.* Sorry to disappoint. That blame was four years ago, not counting covid-related time dilation. I do agree that disabling a test just to please a static analyzer is probably not the best way to go. Repository:

[PATCH] D141555: [CUDA] added cmath wrappers to unbreak CUDA compilation after D79555

2023-01-12 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. LGTM. Do we need changes to the test-suite to cover this too? (test-suite being in a separate repo, so it would be a separate patch.) Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D69878: Consoldiate internal denormal flushing controls

2019-11-08 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. > AMDGPU wants a distinct control for f32 flushing from f16/f64, and as far as > I can tell the same is true for NVPTX (based on the attribute name). I may be corrected, but I believe nvptx only supports ftz for f32. > Double-precision instructions support subnormal inpu

[PATCH] D74384: Use std::foo_t rather than std::foo in LLVM.

2020-02-10 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. > Such changes can be risky. Heh, well said. I feel good about it because I found two or three real bugs in clang/llvm as a result of this cleanup. But still, we've got to land it safely... I joined the group; what do I do to get tests run for this? > Hope someone ca

[PATCH] D74412: Fix SFINAE in CFG.cpp.

2020-02-11 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added reviewers: bkramer, MaskRay. Herald added subscribers: cfe-commits, martong. Herald added a project: clang. jlebar updated this revision to Diff 243877. jlebar added a comment. Rebase Used std::enable_if without ::type. Repository: rG LLVM Github Mo

[PATCH] D74414: Use std::foo_t rather than std::foo in clang.

2020-02-11 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added reviewers: bkramer, MaskRay. Herald added a reviewer: martong. Herald added a reviewer: shafik. Herald added subscribers: cfe-commits, martong. Herald added a project: clang. No functional change. Repository: rG LLVM Github Monorepo https://reviews.l

[PATCH] D74412: Fix SFINAE in CFG.cpp.

2020-02-11 Thread Justin Lebar via Phabricator via cfe-commits
jlebar updated this revision to Diff 243877. jlebar added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74412/new/ https://reviews.llvm.org/D74412 Files: clang/lib/Analysis/CFG.cpp Index: clang/lib/Analysis/CFG.cpp ==

[PATCH] D74423: Use C++14-style return type deduction in clang.

2020-02-11 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added reviewers: bkramer, MaskRay. Herald added a reviewer: martong. Herald added a reviewer: shafik. Herald added subscribers: cfe-commits, martong. Herald added a project: clang. Simplifies the C++11-style "-> decltype(...)" return-type deduction. Note that

[PATCH] D74414: Use std::foo_t rather than std::foo in clang.

2020-02-11 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG027eb71696f6: Use std::foo_t rather than std::foo in clang. (authored by jlebar). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74414/new/ https://reviews.l

[PATCH] D74412: Fix SFINAE in CFG.cpp.

2020-02-11 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf0fd852fcd05: Fix SFINAE in CFG.cpp. (authored by jlebar). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74412/new/ https://reviews.llvm.org/D74412 Files:

[PATCH] D74423: Use C++14-style return type deduction in clang.

2020-02-11 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac66c61bf946: Use C++14-style return type deduction in clang. (authored by jlebar). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74423/new/ https://reviews

[PATCH] D74384: Use std::foo_t rather than std::foo in LLVM.

2020-02-12 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. In D74384#1872246 , @thakis wrote: > Looks like this broke building on windows with clang-cl as host compiler in > some situations: http://45.33.8.238/win/8160/step_4.txt I'm testing out the following fix, which we verified works

[PATCH] D45068: [NVPTX, CUDA] Added support for m8n32k16 and m32n8k16 variants of wmma instructions.

2018-03-29 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:578 + if (CudaInstallation.version() >= CudaVersion::CUDA_91) { +// CUDA-9 uses new instructions that are only avail

[PATCH] D45061: [NVPTX, CUDA] Use custom feature detection to handle NVPTX target builtins.

2018-03-29 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Basic/Cuda.h:55 +static inline const std::vector CudaKnownArchList() { + return {CudaArch::SM_20, CudaArch::SM_21, CudaArch::SM_30, Cud

[PATCH] D45060: Allow target to handle required features for TARGET_BUILTINs.

2018-03-29 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Basic/TargetInfo.h:933 + /// FeatureMap. Targets may override this to provide custom handling of + /// required features. + virtual Opt

[PATCH] D45495: [CUDA] Added --[no-]cuda-include-ptx=sm_XX|all option.

2018-04-10 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. Where do we document the default values for these flags? Like, how is a user supposed to figure out whether the default is to include ptx or not? https://reviews.llvm.org/D45495 _

[PATCH] D45495: [CUDA] Added --[no-]cuda-include-ptx=sm_XX|all option.

2018-04-10 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. lgtm! https://reviews.llvm.org/D45495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39586: [CUDA] Mark CUDA as a no-errno platform.

2017-11-02 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. CUDA doesn't support errno at all, so this is the right thing -- or at least, in the right direction. But also, this unbreaks the CUDA test-suite math tests [0] after https://reviews.llvm.org/D39481. __cuda_cmath.h forwards nexttoward() to __builtin_nexttoward, whic

[PATCH] D39586: [CUDA] Mark CUDA as a no-errno platform.

2017-11-02 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317297: [CUDA] Mark CUDA as a no-errno platform. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D39586?vs=121427&id=121429#toc Repository: rL LLVM https://reviews.llvm.org/D

[PATCH] D39638: [NVPTX] Implement __nvvm_atom_add_gen_d builtin.

2017-11-05 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. Herald added subscribers: hiraditya, sanjoy, jholewinski. This just seems to have been an oversight. We already supported the f64 atomic add with an explicit scope (e.g. "cta"), but not the scopeless version. https://reviews.llvm.org/D39638 Files: clang/include/

[PATCH] D39638: [NVPTX] Implement __nvvm_atom_add_gen_d builtin.

2017-11-05 Thread Justin Lebar via Phabricator via cfe-commits
jlebar updated this revision to Diff 121620. jlebar added a comment. Fix tests. https://reviews.llvm.org/D39638 Files: clang/include/clang/Basic/BuiltinsNVPTX.def clang/lib/CodeGen/CGBuiltin.cpp clang/test/CodeGen/builtins-nvptx-ptx50.cu llvm/include/llvm/IR/IntrinsicsNVVM.td llvm/lib

[PATCH] D39502: [Driver] Make clang/cc conforms to UNIX standard

2017-11-05 Thread Justin Lebar via Phabricator via cfe-commits
jlebar requested changes to this revision. jlebar added a comment. This revision now requires changes to proceed. > Note the host clang side has the inputs "test.cu" and "test-c3378c.fatbin". > Which means if the device side compilation failed, the host side will not > compile because InputOk wi

[PATCH] D39702: [test-suite] [CUDA] Delete nexttoward and nextafter CUDA tests, because these functions have no implementations.

2017-11-06 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. Herald added a subscriber: sanjoy. These functions never actually worked -- if you called them, you'd get a ptxas error when llvm tried to make a libcall to e.g. nexttowardf. This test only compiled because the calls were DCE'ed. Sadly my laziness in not checking th

[PATCH] D39638: [NVPTX] Implement __nvvm_atom_add_gen_d builtin.

2017-11-07 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317623: [NVPTX] Implement __nvvm_atom_add_gen_d builtin. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D39638?vs=121620&id=121984#toc Repository: rL LLVM https://reviews.ll

[PATCH] D39817: [CUDA] Fix std::min on device side to return the min, not the max.

2017-11-08 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. Herald added a subscriber: sanjoy. How embarrassing. This is tested in the test-suite -- fix to come there in a separate patch. https://reviews.llvm.org/D39817 Files: clang/lib/Headers/cuda_wrappers/algorithm Index: clang/lib/Headers/cuda_wrappers/algorithm ==

[PATCH] D39818: [CUDA] [test-suite] Test std::min and std::max with C++11.

2017-11-08 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. Herald added a subscriber: sanjoy. Previously we only tested on C++14 and newer, which let slip a bug where std::min returned the max. :( https://reviews.llvm.org/D39818 Files: External/CUDA/algorithm.cu Index: External/CUDA/algorithm.cu ==

[PATCH] D39703: [CUDA] Remove implementations of nexttoward and nextafter.

2017-11-08 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. > Libdevice does provide implementation for __nv_nextafterf() and > __nv_nextafter() and it has corresponding wrappers in math_functions.h[pp]. > > Perhaps we should keep nextafter around. Oh, that changes things, since nexttoward is basically the same thing as nextafte

[PATCH] D39702: [test-suite] [CUDA] Delete nexttoward and nextafter CUDA tests, because these functions have no implementations.

2017-11-08 Thread Justin Lebar via Phabricator via cfe-commits
jlebar abandoned this revision. jlebar added a comment. Abandoning because it looks like we *can* implement nexttoward in CUDA, see https://reviews.llvm.org/D39703. Will send a different patch. https://reviews.llvm.org/D39702 ___ cfe-commits maili

[PATCH] D39502: [Driver] Make clang/cc conforms to UNIX standard

2017-11-09 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. I abdicate as a reviewer in favor of tra -- if he's happy, I'm happy. https://reviews.llvm.org/D39502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39817: [CUDA] Fix std::min on device side to return the min, not the max.

2017-11-10 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317961: [CUDA] Fix std::min on device side to return the min, not the max. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D39817?vs=122151&id=122563#toc Repository: rL LLVM

[PATCH] D39818: [CUDA] [test-suite] Test std::min and std::max with C++11.

2017-11-10 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317962: [CUDA] [test-suite] Test std::min and std::max with C++11. (authored by jlebar). Repository: rL LLVM https://reviews.llvm.org/D39818 Files: test-suite/trunk/External/CUDA/algorithm.cu Inde

[PATCH] D40151: [CUDA] [test-suite] Remove references to nexttoward in CUDA tests.

2017-11-16 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. Herald added a subscriber: sanjoy. This function never worked -- the only reason the tests passed is because calls to this function were being DCE'ed. We're going to remove this broken function from clang, but first we need to remove it from the test-suite. https:/

[PATCH] D40152: [CUDA] Remove implementations of nexttoward.

2017-11-16 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. __builtin_nexttoward lowers to a libcall, e.g. nexttowardf(), that CUDA does not have. Rather than try to implement it, we simply remove these functions -- nvcc doesn't support them either, and nextafter, which does work, does essentially the same thing on GPUs, beca

[PATCH] D40151: [CUDA] [test-suite] Remove references to nexttoward in CUDA tests.

2017-11-16 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318492: [CUDA] [test-suite] Remove references to nexttoward in CUDA tests. (authored by jlebar). Repository: rL LLVM https://reviews.llvm.org/D40151 Files: test-suite/trunk/External/CUDA/cmath.cu

[PATCH] D40152: [CUDA] Remove implementations of nexttoward.

2017-11-16 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL318494: [CUDA] Remove implementations of nexttoward. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D40152?vs=123257&id=123275#toc Repository: rL LLVM https://reviews.llvm.o

[PATCH] D151601: [NVPTX] Coalesce register classes for {i16,f16,bf16}, {i32,v2f16,v2bf16}

2023-06-02 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. I cannot say that I 100% looked over every line, but in principle this seems fine, and if it's passing TF tests then that's pretty strong evidence this is working. Repository: rG LLVM Gith

[PATCH] D150718: [CUDA] Relax restrictions on GPU-side variadic functions

2023-05-16 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. This seems a little dangerous -- we're saying the frontend will accept this but we can't generate code for it? What happens if we try to generate code? Do we get some sort of error, or do we silently fail? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D150718: [CUDA] Relax restrictions on GPU-side variadic functions

2023-05-17 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. OK, sgtm. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150718/new/ https://reviews.llvm.org/D150718 __

[PATCH] D150820: [NVPTX, CUDA] added optional src_size argument to __nvvm_cp_async*

2023-05-18 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. Re-approval. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150820/new/ https://reviews.llvm.org/D150820 ___

[PATCH] D149364: [CUDA] Temporarily undefine __noinline__ when including bits/shared_ptr_base.h

2023-04-27 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. wow. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149364/new/ https://reviews.llvm.org/D149364 ___

[PATCH] D27788: [CUDA] Add --ptxas-path= flag.

2016-12-14 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. This lets you build with one CUDA installation but use ptxas from another install. This is useful e.g. if you want to avoid bugs in an old ptxas without actually upgrading wholesale to a newer CUDA

[PATCH] D27788: [CUDA] Add --ptxas-path= flag.

2016-12-15 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289847: [CUDA] Add --ptxas-path= flag. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D27788?vs=81501&id=81620#toc Repository: rL LLVM https://reviews.llvm.org/D27788 Files:

[PATCH] D28124: [OpenMP] Code cleanup for NVPTX OpenMP codegen

2016-12-28 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:31 +// NVPTX Address space +enum ADDRESS_SPACE { + ADDRESS_SPACE_SHARED = 3, Please fix enum typename name and the name of the enumerator: http://llvm.org/docs/CodingStandards.html#n

[PATCH] D28125: [OpenMP] Update target codegen for NVPTX device.

2016-12-28 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. Apologies for the drive-by review. Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.h:30 + // Private state and methods. + // + This comment seems redundant with "private:" above? https://reviews.llvm.org/D28125 __

[PATCH] D28162: [ADT] Delete RefCountedBaseVPTR.

2016-12-29 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added reviewers: compnerd, dblaikie. jlebar added subscribers: llvm-commits, cfe-commits. Herald added subscribers: mgorny, klimek. This class is unnecessary. Its comment indicated that it was a compile error to allocate an instance of a class that inherits fr

[PATCH] D28162: [ADT] Delete RefCountedBaseVPTR.

2016-12-29 Thread Justin Lebar via Phabricator via cfe-commits
jlebar marked an inline comment as done. jlebar added inline comments. Comment at: llvm/unittests/ADT/IntrusiveRefCntPtrTest.cpp:14-37 +struct VirtualRefCounted : public llvm::RefCountedBase { + VirtualRefCounted() { ++NumInstances; } + VirtualRefCounted(const VirtualRefCounted

[PATCH] D28162: [ADT] Delete RefCountedBaseVPTR.

2016-12-29 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jlebar marked 2 inline comments as done. Closed by commit rL290717: [ADT] Delete RefCountedBaseVPTR. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D28162?vs=82681&id=82685#toc Repository: rL L

[PATCH] D28271: [Sema] Get rid of unused default argument to Sema::CheckCallingConvAttr.

2017-01-03 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added a subscriber: cfe-commits. All callers of CheckCallingConvAttr passed FD == nullptr, so just get rid of the aspirational function arg. https://reviews.llvm.org/D28271 Files: clang/include/clang/Sema/Sema.h clang/lib/Se

[PATCH] D28271: [Sema] Get rid of unused default argument to Sema::CheckCallingConvAttr.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. Thanks for the review, Reid. https://reviews.llvm.org/D28271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28271: [Sema] Get rid of unused default argument to Sema::CheckCallingConvAttr.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar abandoned this revision. jlebar added a comment. > I think you've discovered this bug: Hm, I guess this is a step in the wrong direction, then. (I spun this patch after writing some code in this function that assumed I'd get a FunctionDecl where appropriate, which of course doesn't work.

[PATCH] D28317: [Windows] Remove functions in intrin.h that are defined in Builtin.def.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added subscribers: echristo, cfe-commits. These duplicate declarations cause a problem for CUDA compiles on Windows. All implicitly-defined functions are host+device, and this applies to the declarations in Builtin.def. But then

[PATCH] D28318: [TableGen] Only normalize the spelling of GNU-style attributes.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added a reviewer: rnk. jlebar added subscribers: tra, cfe-commits. When Sema looks up an attribute name, it strips off leading and trailing "__" if the attribute is GNU-style. That is, __attribute__((foo)) and __attribute__((__foo__)) are equivalent. This is

[PATCH] D28319: [CUDA] Make CUDAInstallationDetector take the host triple in its constructor.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. Previously it was taking the true target triple, which is not really what it needs: The location of the CUDA installation depends on the host OS. https://reviews.llvm.org/D28319 Files: clang/li

[PATCH] D28320: [Driver] Driver changes to support CUDA compilation on Windows.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. For the most part this is straightforward: Just add a CudaInstallation object to the MSVC and MinGW toolchains. CudaToolChain has to override computeMSVCVersion so that Clang::constructJob passes t

[PATCH] D28321: [CUDA] Add __declspec spellings for CUDA attributes.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added subscribers: rnk, cfe-commits. CUDA attributes are spelled __declspec(__foo__) on Windows. https://reviews.llvm.org/D28321 Files: clang/include/clang/Basic/Attr.td clang/test/SemaCUDA/attr-declspec.cu Index: clang/tes

[PATCH] D28322: [CUDA] More correctly inherit primitive types from the host during device compilation.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. CUDA lets users share structs between the host and device, so for that and other reasons, primitive types such as ptrdiff_t should be the same on both sides of the compilation. Our code to do this

[PATCH] D28323: [CUDA] Let NVPTX inherit the host's calling conventions.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. When compiling device code, we may still see host code with explicit calling conventions. NVPTX needs to claim that it supports these CCs, so that (a) we don't raise noisy warnings, and (b) we don'

[PATCH] D28324: [CUDA] Don't define functions that the CUDA headers themselves define on Windows.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. https://reviews.llvm.org/D28324 Files: clang/lib/Headers/__clang_cuda_cmath.h Index: clang/lib/Headers/__clang_cuda_cmath.h === -

[PATCH] D28325: [CUDA] Rename keywords used in macro so they don't conflict with MSVC.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added a reviewer: tra. jlebar added a subscriber: cfe-commits. MSVC seems to use "__in" and "__out" for its own purposes, so we have to pick different names in this macro. https://reviews.llvm.org/D28325 Files: clang/lib/Headers/__clang_cuda_intrinsics.h

[PATCH] D28326: [Docs] Update docs to indicate that CUDA compilation is supported on Windows.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. jlebar added subscribers: llvm-commits, cfe-commits. https://reviews.llvm.org/D28326 Files: llvm/docs/CompileCudaWithLLVM.rst Index: llvm/docs/CompileCudaWithLLVM.rst === --- llvm/docs/CompileCudaWit

[PATCH] D28321: [CUDA] Add __declspec spellings for CUDA attributes.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added inline comments. Comment at: clang/include/clang/Basic/Attr.td:604 +// CUDA attributes are spelled __attribute__((attr)) or __declspec(__attr__). + aaron.ballman wrote: > For my own edification, do you have a link to some documentation of what CUDA

[PATCH] D28321: [CUDA] Add __declspec spellings for CUDA attributes.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added inline comments. Comment at: clang/include/clang/Basic/Attr.td:604 +// CUDA attributes are spelled __attribute__((attr)) or __declspec(__attr__). + aaron.ballman wrote: > jlebar wrote: > > aaron.ballman wrote: > > > For my own edification, do you h

[PATCH] D28321: [CUDA] Add __declspec spellings for CUDA attributes.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. Thank you for the review! Comment at: clang/include/clang/Basic/Attr.td:604 +// CUDA attributes are spelled __attribute__((attr)) or __declspec(__attr__). + aaron.ballman wrote: > jlebar wrote: > > aaron.ballman wrote: > > > jlebar wro

[PATCH] D28320: [Driver] Driver changes to support CUDA compilation on Windows.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar marked an inline comment as done. jlebar added a comment. Thank you for the reviews! Comment at: clang/lib/Driver/ToolChains.cpp:1819 Args.getLastArgValue(options::OPT_cuda_path_EQ)); - else { + else if (HostTriple.isOSLinux() || HostTriple.isMacOSX()) {

[PATCH] D28324: [CUDA] Don't define functions that the CUDA headers themselves define on Windows.

2017-01-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar marked an inline comment as done. jlebar added inline comments. Comment at: clang/lib/Headers/__clang_cuda_cmath.h:76 + +// For inscrutible reasons, the CUDA headers define these functions for us on +// Windows. tra wrote: > inscrut__a__ble? Thanks. :)

[PATCH] D28318: [TableGen] Only normalize the spelling of GNU-style attributes.

2017-01-05 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291129: [TableGen] Only normalize the spelling of GNU-style attributes. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D28318?vs=83125&id=83253#toc Repository: rL LLVM https

[PATCH] D28319: [CUDA] Make CUDAInstallationDetector take the host triple in its constructor.

2017-01-05 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291130: [CUDA] Make CUDAInstallationDetector take the host triple in its constructor. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D28319?vs=83126&id=83254#toc Repository:

[PATCH] D28320: [Driver] Driver changes to support CUDA compilation on Windows.

2017-01-05 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jlebar marked an inline comment as done. Closed by commit rL291131: [Driver] Driver changes to support CUDA compilation on Windows. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D28320?vs=83127&i

[PATCH] D28322: [CUDA] More correctly inherit primitive types from the host during device compilation.

2017-01-05 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291135: [CUDA] More correctly inherit primitive types from the host during device… (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D28322?vs=83129&id=83258#toc Repository: rL

[PATCH] D28321: [CUDA] Add __declspec spellings for CUDA attributes.

2017-01-05 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291134: [CUDA] Add __declspec spellings for CUDA attributes. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D28321?vs=83128&id=83257#toc Repository: rL LLVM https://reviews.

[PATCH] D28324: [CUDA] Don't define functions that the CUDA headers themselves define on Windows.

2017-01-05 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jlebar marked an inline comment as done. Closed by commit rL291137: [CUDA] Don't define functions that the CUDA headers themselves define on… (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D28324?

[PATCH] D28317: [Windows] Remove functions in intrin.h that are defined in Builtin.def.

2017-01-05 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291128: [Windows] Remove functions in intrin.h that are defined in Builtin.def. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D28317?vs=83124&id=83252#toc Repository: rL LLV

[PATCH] D28325: [CUDA] Rename keywords used in macro so they don't conflict with MSVC.

2017-01-05 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291138: [CUDA] Rename keywords used in macro so they don't conflict with MSVC. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D28325?vs=83133&id=83261#toc Repository: rL LLVM

[PATCH] D28326: [Docs] Update docs to indicate that CUDA compilation is supported on Windows.

2017-01-05 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291139: [Docs] Update docs to indicate that CUDA compilation is supported on Windows. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D28326?vs=83134&id=83262#toc Repository:

[PATCH] D28323: [CUDA] Let NVPTX inherit the host's calling conventions.

2017-01-05 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL291136: [CUDA] Let NVPTX inherit the host's calling conventions. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D28323?vs=83130&id=83259#toc Repository: rL LLVM https://revi

[PATCH] D29654: [OpenMP] Integrate OpenMP target region cubin into host binary

2017-03-27 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. With your latest set of updates, I am not sure which, if any, patches you need me to take another look at. Unfortunately I don't have a ton of time for CUDA stuff these days, so where possible I'd prefer to shunt reviews over to hfinkel or chandlerc. But do let me know

[PATCH] D28793: [NVPTX] Auto-upgrade some NVPTX intrinsics to LLVM target-generic code.

2017-01-16 Thread Justin Lebar via Phabricator via cfe-commits
jlebar created this revision. Herald added a subscriber: jholewinski. Specifically, we upgrade llvm.nvvm.: - brev{32,64} - clz.{i,ll} - popc.{i,ll} - abs.{i,ll} - {min,max}.{i,ll,u,ull} - h2f These either map directly to an existing LLVM target-generic intrinsic or map to a simple LLVM target-ge

[PATCH] D28793: [NVPTX] Auto-upgrade some NVPTX intrinsics to LLVM target-generic code.

2017-01-19 Thread Justin Lebar via Phabricator via cfe-commits
jlebar updated this revision to Diff 85076. jlebar added a comment. Remove (broken) implementations of removed intrinsics from clang. We realized we don't need this, as none of these intrinsics are accessible to user code in nvcc. https://reviews.llvm.org/D28793 Files: clang/lib/Headers/__cl

[PATCH] D28793: [NVPTX] Auto-upgrade some NVPTX intrinsics to LLVM target-generic code.

2017-01-19 Thread Justin Lebar via Phabricator via cfe-commits
jlebar marked 4 inline comments as done. jlebar added a comment. Sorry about that broken code in the clang headers. All removed now; we established it's not needed. PHAL. https://reviews.llvm.org/D28793 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D28793: [NVPTX] Auto-upgrade some NVPTX intrinsics to LLVM target-generic code.

2017-01-20 Thread Justin Lebar via Phabricator via cfe-commits
jlebar updated this revision to Diff 85189. jlebar marked an inline comment as done. jlebar added a comment. Address tra's review comments. > Perhaps we should add the list of such intrinsics and what happens to them in > a comment section in NVPTXIntrinsics.td. sgtm, done. https://reviews.ll

[PATCH] D28793: [NVPTX] Auto-upgrade some NVPTX intrinsics to LLVM target-generic code.

2017-01-20 Thread Justin Lebar via Phabricator via cfe-commits
jlebar updated this revision to Diff 85206. jlebar added a comment. Get rid of h2f intrinsics. Thank you for the careful reviews, Art. https://reviews.llvm.org/D28793 Files: clang/include/clang/Basic/BuiltinsNVPTX.def llvm/include/llvm/IR/IntrinsicsNVVM.td llvm/lib/IR/AutoUpgrade.cpp l

[PATCH] D28793: [NVPTX] Auto-upgrade some NVPTX intrinsics to LLVM target-generic code.

2017-01-20 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL292694: [NVPTX] Auto-upgrade some NVPTX intrinsics to LLVM target-generic code. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D28793?vs=85206&id=85221#toc Repository: rL LLV

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-24 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. Eric asked me to do a review of this. I notice now it was submitted while I was doing the review. Oh well. Here are the comments I had. Comment at: llvm/include/llvm/ADT/APFloat.h:1054 + opStatus next(bool nextDown) { +if (usesLayout(getSemant

[PATCH] D27872: [APFloat] Switch from (PPCDoubleDoubleImpl, IEEEdouble) layout to (IEEEdouble, IEEEdouble)

2017-01-24 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added inline comments. Comment at: llvm/unittests/ADT/APFloatTest.cpp:3534 Op2[1]) .str(); } timshen wrote: > jlebar wrote: > > Honestly I am not sure this is an improvement over writing it out by hand: > > > > EXPEC

[PATCH] D29542: [TargetInfo] Adjust x86-32 atomic support to the CPU used

2017-02-04 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. > Could someone help me figure out what is the cause and correct solution to > that failure? @jlebar? The test is checking that the macros have the same value when compiling for CUDA host and device. That is, if we're compiling for an x86 CPU and an NVPTX GPU, we invok

[PATCH] D29542: [TargetInfo] Adjust x86-32 atomic support to the CPU used

2017-02-05 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added inline comments. Comment at: lib/Basic/Targets.cpp:1784 + // atomics. This matches the defaults for the systems using CUDA. + // TODO: pass the host target CPU + if (HostTriple.getArch() == llvm::Triple::x86) Someone else is calling se

[PATCH] D29542: [TargetInfo] Adjust x86-32 atomic support to the CPU used

2017-02-05 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added inline comments. Comment at: lib/Basic/Targets.cpp:1808 +if (HostTriple.getArch() == llvm::Triple::x86) + HostTarget->setCPU("i586"); + Okay, is this still needed now? https://reviews.llvm.org/D29542

[PATCH] D29542: [TargetInfo] Adjust x86-32 atomic support to the CPU used

2017-02-06 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added inline comments. Comment at: lib/Basic/Targets.cpp:1808 +if (HostTriple.getArch() == llvm::Triple::x86) + HostTarget->setCPU("i586"); + mgorny wrote: > jlebar wrote: > > Okay, is this still needed now? > Yes. I've specifically tested with it

[PATCH] D29542: [TargetInfo] Adjust x86-32 atomic support to the CPU used

2017-02-06 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. > Well, the thing is, we don't call HostTarget->setCPU() before this function. > We just call AllocateTarget(), and it does not set the CPU. Ah, got it. LGTM for the nvptx changes. https://reviews.llvm.org/D29542 ___ cfe-c

[PATCH] D29644: [OpenMP] Pass -v to PTXAS if it was passed to the driver.

2017-02-07 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. I'm fine with this. Repository: rL LLVM https://reviews.llvm.org/D29644 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-02-07 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added inline comments. Comment at: lib/Driver/ToolChains.cpp:4902 + DeviceOffloadingKind == Action::OFK_Cuda) && + "The offloading kind is not OpenMP or CUDA."); Not sure this assertion message helps us much beyond what's already in the

[PATCH] D42319: [CUDA] CUDA has no device-side library builtins.

2018-01-21 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. How does this affect e.g. calling memcpy()? There isn't a standard library implementation of this on nvptx, but we do want calls to memcpy() to be lowered to llvm.memcpy so that they can be optimized. https://reviews.llvm.org/D42319 _

[PATCH] D42319: [CUDA] CUDA has no device-side library builtins.

2018-01-22 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added a comment. This revision is now accepted and ready to land. Got it, thanks for the explanation. https://reviews.llvm.org/D42319 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

<    1   2   3   >