Skip to content
  1. Apr 05, 2019
    • Evgeny Mankov's avatar
      [CUDA][Windows] Last fix for the clang Bug 38811 "Clang fails to compile with... · 66a8b07c
      Evgeny Mankov authored
      [CUDA][Windows] Last fix for the clang Bug 38811 "Clang fails to compile with CUDA-9.x on Windows" (https://bugs.llvm.org/show_bug.cgi?id=38811).
      
      [IMPORTANT]
      With that last fix, CUDA has just started being compiling by clang on Windows after nearly a year and two clang’s major releases (7 and 8).
      As long as the last LLVM release, in which clang was compiling CUDA on Windows successfully, was 6.0.1, this fix and two previous have to be included into upcoming 7.1.0 and 8.0.1 releases.
      
      [How to repro]
      clang++.exe -x cuda "c:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.0\0_Simple\simplePrintf\simplePrintf.cu" -I"c:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.0\common\inc" --cuda-gpu-arch=sm_50 --cuda-path="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0" -L"c:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64" -lcudart.lib  -v
      
      [Output]
      In file included from C:\GIT\LLVM\trunk-for-submits\llvm-64-release-vs2017-15.9.9\dist\lib\clang\9.0.0\include\__clang_cuda_runtime_wrapper.h:327:
      C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:390:11: error: no matching function for call to '__isinfl'
        return (__isinfl(a) != 0);
                ^~~~~~~~
      C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:2662:14: note: candidate function not viable: call to __host__ function from __device__ function
      __func__(int __isinfl(long double a))
                   ^
      In file included from <built-in>:1:
      In file included from C:\GIT\LLVM\trunk-for-submits\llvm-64-release-vs2017-15.9.9\dist\lib\clang\9.0.0\include\__clang_cuda_runtime_wrapper.h:327:
      C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:438:11: error: no matching function for call to '__isnanl'
        return (__isnanl(a) != 0);
                ^~~~~~~~
      C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:2672:14: note: candidate function not viable: call to __host__ function from __device__ function
      __func__(int __isnanl(long double a))
                   ^
      In file included from <built-in>:1:
      In file included from C:\GIT\LLVM\trunk-for-submits\llvm-64-release-vs2017-15.9.9\dist\lib\clang\9.0.0\include\__clang_cuda_runtime_wrapper.h:327:
      C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:486:11: error: no matching function for call to '__finitel'
        return (__finitel(a) != 0);
                ^~~~~~~~~
      C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0/include\crt/math_functions.hpp:2652:14: note: candidate function not viable: call to __host__ function from __device__ function
      __func__(int __finitel(long double a))
                   ^
      3 errors generated when compiling for sm_50.
      
      [Solution]
      Add missing long double device functions' declarations. Provide only declarations to prevent any use of long double on the device side, because CUDA does not support long double on the device side.
      
      [Testing]
      {Windows 10, Ubuntu 16.04.5}/{Visual C++ 2017 15.9.9, gcc+ 5.4.0}/CUDA {8.0, 9.0, 9.1, 9.2, 10.0, 10.1}
      
      Reviewed by: Artem Belevich
      
      Differential Revision: http://reviews.llvm.org/D60220
      
      llvm-svn: 357779
      66a8b07c
    • Sam McCall's avatar
      [Tooling] add a Heuristic field indicating that a CompileCommand was guessed. · 36913e3f
      Sam McCall authored
      Summary:
      Use cases:
       - a tool that dumps the heuristic used for each header in a project can
         be used to evaluate changes to the heuristic
       - we want to expose this information to users in clangd as it affects
         accuracy/reliability of editor features
       - express interpolation tests more directly
      
      Reviewers: ilya-biryukov, klimek
      
      Subscribers: ioeric, kadircet, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D60194
      
      llvm-svn: 357770
      36913e3f
    • Yitzhak Mandelbaum's avatar
      [LibTooling] Add Transformer, a library for source-to-source transformations. · fdd98782
      Yitzhak Mandelbaum authored
      Summary: Adds a basic version of Transformer, a library supporting the concise specification of clang-based source-to-source transformations.  A full discussion of the end goal can be found on the cfe-dev list with subject "[RFC] Easier source-to-source transformations with clang tooling".
      
      Reviewers: ilya-biryukov
      
      Reviewed By: ilya-biryukov
      
      Subscribers: ioeric, ABataev, mgorny, jfb, jdoerfert, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D59376
      
      llvm-svn: 357768
      fdd98782
    • Yitzhak Mandelbaum's avatar
      [LibTooling] Add "SourceCode" library for functions relating to source-code manipulation. · 84f2271a
      Yitzhak Mandelbaum authored
      Summary:
      Introduces a utility library in Refactoring/ to collect routines related to
      source-code manipulation.  In this change, we move "extended-range" functions
      from the FixIt library (in clangTooling) to this new library.
      
      We need to use this functionality in Refactoring/ and cannot access it if it
      resides in Tooling/, because that would cause clangToolingRefactor to depend on
      clangTooling, which would be a circular dependency.
      
      Reviewers: ilya-biryukov, ioeric
      
      Reviewed By: ilya-biryukov
      
      Subscribers: mgorny, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D60269
      
      llvm-svn: 357764
      84f2271a
    • Alex Lorenz's avatar
      [test] Specify an explicit darwin version in a triple in · 5d289ed3
      Alex Lorenz authored
      `test/Driver/debug-options.c` to ensure that the driver
      selects the DWARF 2 version as intended by the test.
      
      Fixes the `test/Driver/debug-options.c` test regression on GreenDragon
      on macOS that started failing after r357713.
      
      llvm-svn: 357740
      5d289ed3
    • Evandro Menezes's avatar
      [IR] Refactor attribute methods in Function class (NFC) · 85bd3978
      Evandro Menezes authored
      Rename the functions that query the optimization kind attributes.
      
      Differential revision: https://reviews.llvm.org/D60287
      
      llvm-svn: 357731
      85bd3978
  2. Apr 04, 2019
  3. Apr 03, 2019
Loading