Skip to content
  1. Jul 09, 2019
    • Marco Antognini's avatar
      [OpenCL][Sema] Fix builtin rewriting · b00d5f73
      Marco Antognini authored
      This patch ensures built-in functions are rewritten using the proper
      parent declaration.
      
      Existing tests are modified to run in C++ mode to ensure the
      functionality works also with C++ for OpenCL while not increasing the
      testing runtime.
      
      llvm-svn: 365499
      b00d5f73
  2. Jul 08, 2019
  3. Jun 25, 2019
  4. Jun 24, 2019
  5. Jun 22, 2019
  6. Jun 20, 2019
  7. Jun 19, 2019
  8. Jun 18, 2019
  9. Jun 14, 2019
  10. Jun 05, 2019
    • Tim Northover's avatar
      LLVM IR: Generate new-style byval-with-Type from Clang · c46827c7
      Tim Northover authored
      LLVM IR recently added a Type parameter to the byval Attribute, so that
      when pointers become opaque and no longer have an element type the
      information will still be present in IR.
      
      For now the Type parameter is optional (which is why Clang didn't need
      this change at the time), but it will become mandatory soon.
      
      llvm-svn: 362652
      c46827c7
  11. May 30, 2019
  12. May 29, 2019
  13. May 27, 2019
    • Yaxun Liu's avatar
      [OpenCL] Fix file-scope const sampler variable for 2.0 · a53d48b7
      Yaxun Liu authored
      OpenCL spec v2.0 s6.13.14:
      
      Samplers can also be declared as global constants in the program
      source using the following syntax.
      
         const sampler_t <sampler name> = <value>
      This works fine for OpenCL 1.2 but fails for 2.0, because clang duduces
      address space of file-scope const sampler variable to be in global address
      space whereas spec v2.0 s6.9.b forbids file-scope sampler variable to be
      in global address space.
      
      The fix is not to deduce address space for file-scope sampler variables.
      
      Differential Revision: https://reviews.llvm.org/D62197
      
      llvm-svn: 361757
      a53d48b7
  14. May 24, 2019
  15. May 17, 2019
  16. May 14, 2019
  17. May 08, 2019
    • Anastasia Stulova's avatar
      [Sema][OpenCL] Make address space conversions a bit stricter. · 5b6dda33
      Anastasia Stulova authored
      The semantics for converting nested pointers between address
      spaces are not very well defined. Some conversions which do not
      really carry any meaning only produce warnings, and in some cases
      warnings hide invalid conversions, such as 'global int*' to
      'local float*'!
      
      This patch changes the logic in checkPointerTypesForAssignment
      and checkAddressSpaceCast to fail properly on implicit conversions
      that should definitely not be permitted. We also dig deeper into the
      pointer types and warn on explicit conversions where the address
      space in a nested pointer changes, regardless of whether the address
      space is compatible with the corresponding pointer nesting level
      on the destination type.
      
      Fixes PR39674!
      
      Patch by ebevhan (Bevin Hansson)!
      
      Differential Revision: https://reviews.llvm.org/D58236
      
      llvm-svn: 360258
      5b6dda33
  18. Apr 23, 2019
  19. Apr 11, 2019
  20. Apr 05, 2019
  21. Mar 25, 2019
  22. Mar 20, 2019
    • Andrew Savonichev's avatar
      [OpenCL] Generate 'unroll.enable' metadata for __attribute__((opencl_unroll_hint)) · 76b178d9
      Andrew Savonichev authored
      Summary:
      [OpenCL] Generate 'unroll.enable' metadata for  __attribute__((opencl_unroll_hint))
          
      For both !{!"llvm.loop.unroll.enable"} and !{!"llvm.loop.unroll.full"} the unroller
      will try to fully unroll a loop unless the trip count is not known at compile time.
      In that case for '.full' metadata no unrolling will be processed, while for '.enable'
      the loop will be partially unrolled with a heuristically chosen unroll factor.
          
      See: docs/LanguageExtensions.rst
          
      From https://www.khronos.org/registry/OpenCL/sdk/2.0/docs/man/xhtml/attributes-loopUnroll.html
      
          __attribute__((opencl_unroll_hint))
          for (int i=0; i<2; i++)
          {
              ...
          }
          
      In the example above, the compiler will determine how much to unroll the loop.
      
          
      Before the patch for  __attribute__((opencl_unroll_hint)) was generated metadata
      !{!"llvm.loop.unroll.full"}, which limits ability of loop unroller to decide, how
      much to unroll the loop.
      
      Reviewers: Anastasia, yaxunl
      
      Reviewed By: Anastasia
      
      Subscribers: zzheng, dmgreen, jdoerfert, cfe-commits, asavonic, AlexeySotkin
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D59493
      
      llvm-svn: 356571
      76b178d9
  23. Mar 18, 2019
  24. Mar 06, 2019
  25. Feb 26, 2019
    • Yaxun Liu's avatar
      [OpenCL] Fix assertion due to blocks · d83c7402
      Yaxun Liu authored
      A recent change caused assertion in CodeGenFunction::EmitBlockCallExpr when a block is called.
      
      There is code
      
        Func = CGM.getOpenCLRuntime().getInvokeFunction(E->getCallee());
      getCalleeDecl calls Expr::getReferencedDeclOfCallee, which does not handle
      BlockExpr and returns nullptr, which causes isa to assert.
      
      This patch fixes that.
      
      Differential Revision: https://reviews.llvm.org/D58658
      
      llvm-svn: 354893
      d83c7402
  26. Feb 21, 2019
  27. Feb 19, 2019
    • Alexey Bader's avatar
      [OpenCL] Change type of block pointer for OpenCL · 24fa0c18
      Alexey Bader authored
      Summary:
      
      For some reason OpenCL blocks in LLVM IR are represented as function pointers.
      These pointers do not point to any real function and never get called. Actually
      they point to some structure, which in turn contains pointer to the real block
      invoke function.
      This patch changes represntation of OpenCL blocks in LLVM IR from function
      pointers to pointers to `%struct.__block_literal_generic`.
      Such representation allows to avoid unnecessary bitcasts and simplifies
      further processing (e.g. translation to SPIR-V ) of the module for targets
      which do not support function pointers.
      
      Patch by: Alexey Sotkin.
      
      Reviewers: Anastasia, yaxunl, svenvh
      
      Reviewed By: Anastasia
      
      Subscribers: alexbatashev, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58277
      
      llvm-svn: 354337
      24fa0c18
  28. Feb 15, 2019
  29. Feb 12, 2019
  30. Feb 09, 2019
  31. Feb 08, 2019
    • James Y Knight's avatar
      [opaque pointer types] Cleanup CGBuilder's Create*GEP. · f5f1b0e5
      James Y Knight authored
      Some of these functions take some extraneous arguments, e.g. EltSize,
      Offset, which are computable from the Type and DataLayout.
      
      Add some asserts to ensure that the computed values are consistent
      with the passed-in values, in preparation for eliminating the
      extraneous arguments. This also asserts that the Type is an Array for
      the calls named "Array" and a Struct for the calls named "Struct".
      
      Then, correct a couple of errors:
      
      1. Using CreateStructGEP on an array type. (this causes the majority
         of the test differences, as struct GEPs are created with i32
         indices, while array GEPs are created with i64 indices)
      
      2. Passing the wrong Offset to CreateStructGEP in TargetInfo.cpp on
         x86-64 NACL (which uses 32-bit pointers).
      
      Differential Revision: https://reviews.llvm.org/D57766
      
      llvm-svn: 353529
      f5f1b0e5
  32. Jan 31, 2019
  33. Jan 29, 2019
  34. Jan 28, 2019
Loading