Skip to content
  1. Jun 12, 2020
  2. Jun 02, 2020
  3. May 28, 2020
  4. May 20, 2020
  5. May 13, 2020
    • Joel E. Denny's avatar
      [FileCheck] Support comment directives · a1fd1882
      Joel E. Denny authored
      Sometimes you want to disable a FileCheck directive without removing
      it entirely, or you want to write comments that mention a directive by
      name.  The `COM:` directive makes it easy to do this.  For example,
      you might have:
      
      ```
      ; X32: pinsrd_1:
      ; X32:    pinsrd $1, 4(%esp), %xmm0
      
      ; COM: FIXME: X64 isn't working correctly yet for this part of codegen, but
      ; COM: X64 will have something similar to X32:
      ; COM:
      ; COM:   X64: pinsrd_1:
      ; COM:   X64:    pinsrd $1, %edi, %xmm0
      ```
      
      Without this patch, you need to use some combination of rewording and
      directive syntax mangling to prevent FileCheck from recognizing the
      commented occurrences of `X32:` and `X64:` above as directives.
      Moreover, FileCheck diagnostics have been proposed that might complain
      about the occurrences of `X64` that don't have the trailing `:`
      because they look like directive typos:
      
        <http://lists.llvm.org/pipermail/llvm-dev/2020-April/140610.html>
      
      I think dodging all these problems can prove tedious for test authors,
      and directive syntax mangling already makes the purpose of existing
      test code unclear.  `COM:` can avoid all these problems.
      
      This patch also updates the small set of existing tests that define
      `COM` as a check prefix:
      
      - clang/test/CodeGen/default-address-space.c
      - clang/test/CodeGenOpenCL/addr-space-struct-arg.cl
      - clang/test/Driver/hip-device-libs.hip
      - llvm/test/Assembler/drop-debug-info-nonzero-alloca.ll
      
      I think lit should support `COM:` as well.  Perhaps `clang -verify`
      should too.
      
      Reviewed By: jhenderson, thopre
      
      Differential Revision: https://reviews.llvm.org/D79276
      a1fd1882
  6. May 12, 2020
  7. May 11, 2020
    • Joel E. Denny's avatar
      [FileCheck] Support comment directives · 9a9a5f98
      Joel E. Denny authored
      Sometimes you want to disable a FileCheck directive without removing
      it entirely, or you want to write comments that mention a directive by
      name.  The `COM:` directive makes it easy to do this.  For example,
      you might have:
      
      ```
      ; X32: pinsrd_1:
      ; X32:    pinsrd $1, 4(%esp), %xmm0
      
      ; COM: FIXME: X64 isn't working correctly yet for this part of codegen, but
      ; COM: X64 will have something similar to X32:
      ; COM:
      ; COM:   X64: pinsrd_1:
      ; COM:   X64:    pinsrd $1, %edi, %xmm0
      ```
      
      Without this patch, you need to use some combination of rewording and
      directive syntax mangling to prevent FileCheck from recognizing the
      commented occurrences of `X32:` and `X64:` above as directives.
      Moreover, FileCheck diagnostics have been proposed that might complain
      about the occurrences of `X64` that don't have the trailing `:`
      because they look like directive typos:
      
        <http://lists.llvm.org/pipermail/llvm-dev/2020-April/140610.html>
      
      I think dodging all these problems can prove tedious for test authors,
      and directive syntax mangling already makes the purpose of existing
      test code unclear.  `COM:` can avoid all these problems.
      
      This patch also updates the small set of existing tests that define
      `COM` as a check prefix:
      
      - clang/test/CodeGen/default-address-space.c
      - clang/test/CodeGenOpenCL/addr-space-struct-arg.cl
      - clang/test/Driver/hip-device-libs.hip
      - llvm/test/Assembler/drop-debug-info-nonzero-alloca.ll
      
      I think lit should support `COM:` as well.  Perhaps `clang -verify`
      should too.
      
      Reviewed By: jhenderson, thopre
      
      Differential Revision: https://reviews.llvm.org/D79276
      9a9a5f98
  8. May 04, 2020
  9. May 01, 2020
  10. Apr 27, 2020
  11. Apr 17, 2020
    • Erich Keane's avatar
      Reland Implement _ExtInt as an extended int type specifier. · 5f0903e9
      Erich Keane authored
      I fixed the LLDB issue, so re-applying the patch.
      
      This reverts commit a4b88c04.
      5f0903e9
    • Sterling Augustine's avatar
      Revert "Implement _ExtInt as an extended int type specifier." · a4b88c04
      Sterling Augustine authored
      This reverts commit 61ba1481.
      
      I'm reverting this because it breaks the lldb build with
      incomplete switch coverage warnings. I would fix it forward,
      but am not familiar enough with lldb to determine the correct
      fix.
      
      lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:3958:11: error: enumeration values 'DependentExtInt' and 'ExtInt' not handled in switch [-Werror,-Wswitch]
        switch (qual_type->getTypeClass()) {
                ^
      lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4633:11: error: enumeration values 'DependentExtInt' and 'ExtInt' not handled in switch [-Werror,-Wswitch]
        switch (qual_type->getTypeClass()) {
                ^
      lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp:4889:11: error: enumeration values 'DependentExtInt' and 'ExtInt' not handled in switch [-Werror,-Wswitch]
        switch (qual_type->getTypeClass()) {
      a4b88c04
    • Erich Keane's avatar
      Implement _ExtInt as an extended int type specifier. · 61ba1481
      Erich Keane authored
      Introduction/Motivation:
      LLVM-IR supports integers of non-power-of-2 bitwidth, in the iN syntax.
      Integers of non-power-of-two aren't particularly interesting or useful
      on most hardware, so much so that no language in Clang has been
      motivated to expose it before.
      
      However, in the case of FPGA hardware normal integer types where the
      full bitwidth isn't used, is extremely wasteful and has severe
      performance/space concerns.  Because of this, Intel has introduced this
      functionality in the High Level Synthesis compiler[0]
      under the name "Arbitrary Precision Integer" (ap_int for short). This
      has been extremely useful and effective for our users, permitting them
      to optimize their storage and operation space on an architecture where
      both can be extremely expensive.
      
      We are proposing upstreaming a more palatable version of this to the
      community, in the form of this proposal and accompanying patch.  We are
      proposing the syntax _ExtInt(N).  We intend to propose this to the WG14
      committee[1], and the underscore-capital seems like the active direction
      for a WG14 paper's acceptance.  An alternative that Richard Smith
      suggested on the initial review was __int(N), however we believe that
      is much less acceptable by WG14.  We considered _Int, however _Int is
      used as an identifier in libstdc++ and there is no good way to fall
      back to an identifier (since _Int(5) is indistinguishable from an
      unnamed initializer of a template type named _Int).
      
      [0]https://www.intel.com/content/www/us/en/software/programmable/quartus-prime/hls-compiler.html)
      [1]http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2472.pdf
      
      Differential Revision: https://reviews.llvm.org/D73967
      61ba1481
  12. Apr 10, 2020
    • Matt Arsenault's avatar
      AMDGPU: Teach toolchain to link rocm device libs · 4593e413
      Matt Arsenault authored
      Currently the library is separately linked, but this isn't correct to
      implement fast math flags correctly. Each module should get the
      version of the library appropriate for its combination of fast math
      and related flags, with the attributes propagated into its functions
      and internalized.
      
      HIP already maintains the list of libraries, but this is not used for
      OpenCL. Unfortunately, HIP uses a separate --hip-device-lib argument,
      despite both languages using the same bitcode library. Eventually
      these two searches need to be merged.
      
      An additional problem is there are 3 different locations the libraries
      are installed, depending on which build is used. This also needs to be
      consolidated (or at least the search logic needs to deal with this
      unnecessary complexity).
      4593e413
  13. Apr 03, 2020
  14. Apr 02, 2020
  15. Mar 28, 2020
  16. Mar 25, 2020
    • Erich Keane's avatar
      Implement post-commit comments for D75685/rG86e0a6c60627 · fe5c719e
      Erich Keane authored
      @Anastasia made a pair of comments on D75685 after it was committed
      requesting changes to the test.  This patch updates the test based on
      her comments.
      fe5c719e
    • Erich Keane's avatar
      Add MS Mangling for OpenCL Pipe types, add mangling test. · 86e0a6c6
      Erich Keane authored
      SPIRV2.0 Spec only specifies Linux mangling, however our downstream has
      use for a Windows mangling for these types.
      
      Unfortunately, the SPIRV
      spec specifies a single mangling for all pipe types, despite clang
      allowing overloading on these types.  Because of this, this patch
      chooses to mangle the read/writability and element type for the windows
      mangling.
      
      The windows manglings in the test all demangle according to demangler:
      "void __cdecl test1(struct __clang::ocl_pipe<int,1>)
      "void __cdecl test2(struct __clang::ocl_pipe<float,0>)
      "void __cdecl test2(struct __clang::ocl_pipe<int,1>)
      "void __cdecl test3(struct __clang::ocl_pipe<int const,1>)
      "void __cdecl test4(struct __clang::ocl_pipe<union
      __clang::__vector<unsigned char,3>,1>)
      "void __cdecl test5(struct __clang::ocl_pipe<union
      __clang::__vector<int,4>,1>)
      "void __cdecl test_reserved_read_pipe(struct __clang::_ASCLglobal<struct
      Person > * __ptr64,struct __clang::ocl_pipe<struct Person,1>)
      
      Differential Revision: https://reviews.llvm.org/D75685
      86e0a6c6
  17. Mar 24, 2020
  18. Mar 23, 2020
  19. Mar 09, 2020
  20. Mar 06, 2020
  21. Mar 05, 2020
  22. Mar 03, 2020
    • Sjoerd Meijer's avatar
      Revert "[Driver] Default to -fno-common for all targets" · 4e363563
      Sjoerd Meijer authored
      This reverts commit 0a9fc923.
      
      Going to look at the asan failures.
      
      I find the failures in the test suite weird, because they look
      like compile time test and I don't understand how that can be
      failing, but will have a brief look at that too.
      4e363563
    • Sjoerd Meijer's avatar
      [Driver] Default to -fno-common for all targets · 0a9fc923
      Sjoerd Meijer authored
      This makes -fno-common the default for all targets because this has performance
      and code-size benefits and is more language conforming for C code.
      Additionally, GCC10 also defaults to -fno-common and so we get consistent
      behaviour with GCC.
      
      With this change, C code that uses tentative definitions as definitions of a
      variable in multiple translation units will trigger multiple-definition linker
      errors. Generally, this occurs when the use of the extern keyword is neglected
      in the declaration of a variable in a header file. In some cases, no specific
      translation unit provides a definition of the variable. The previous behavior
      can be restored by specifying -fcommon.
      
      As GCC has switched already, we benefit from applications already being ported
      and existing documentation how to do this. For example:
      - https://gcc.gnu.org/gcc-10/porting_to.html
      - https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common
      
      Differential revision: https://reviews.llvm.org/D75056
      0a9fc923
  23. Feb 25, 2020
  24. Feb 17, 2020
    • Yaxun (Sam) Liu's avatar
      [OpenCL][CUDA][HIP][SYCL] Add norecurse · fb44b9db
      Yaxun (Sam) Liu authored
      norecurse function attr indicates the function is not called recursively
      directly or indirectly.
      
      Add norecurse to OpenCL functions, SYCL functions in device compilation
      and CUDA/HIP kernels.
      
      Although there is LLVM pass adding norecurse to functions, it only works
      for whole-program compilation. Also FE adding norecurse can make that
      pass run faster since functions with norecurse do not need to be checked
      again.
      
      Differential Revision: https://reviews.llvm.org/D73651
      fb44b9db
  25. Jan 28, 2020
Loading