Skip to content
Snippets Groups Projects
  1. Jun 14, 2016
    • Adam Nemet's avatar
      Add loop pragma for Loop Distribution · e280490a
      Adam Nemet authored
      Summary:
      This is similar to other loop pragmas like 'vectorize'.  Currently it
      only has state values: distribute(enable) and distribute(disable).  When
      one of these is specified the corresponding loop metadata is generated:
      
        !{!"llvm.loop.distribute.enable", i1 true/false}
      
      As a result, loop distribution will be attempted on the loop even if
      Loop Distribution in not enabled globally.  Analogously, with 'disable'
      distribution can be turned off for an individual loop even when the pass
      is otherwise enabled.
      
      There are some slight differences compared to the existing loop pragmas.
      
      1. There is no 'assume_safety' variant which makes its handling slightly
      different from 'vectorize'/'interleave'.
      
      2. Unlike the existing loop pragmas, it does not have a corresponding
      numeric pragma like 'vectorize' -> 'vectorize_width'.  So for the
      consistency checks in CheckForIncompatibleAttributes we don't need to
      check it against other pragmas.  We just need to check for duplicates of
      the same pragma.
      
      Reviewers: rsmith, dexonsmith, aaron.ballman
      
      Subscribers: bob.wilson, cfe-commits, hfinkel
      
      Differential Revision: http://reviews.llvm.org/D19403
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272656 91177308-0d34-0410-b5e6-96231b3b80d8
      e280490a
  2. May 23, 2016
    • David Majnemer's avatar
      Clang support for __is_assignable intrinsic · d1cedd4e
      David Majnemer authored
      MSVC now supports the __is_assignable type trait intrinsic,
      to enable easier and more efficient implementation of the
      Standard Library's is_assignable trait.
      As of Visual Studio 2015 Update 3, the VC Standard Library
      implementation uses the new intrinsic unconditionally.
      
      The implementation is pretty straightforward due to the previously
      existing is_nothrow_assignable and is_trivially_assignable.
      We handle __is_assignable via the same code as the other two except
      that we skip the extra checks for nothrow or triviality.
      
      Patch by Dave Bartolomeo!
      
      Differential Revision: http://reviews.llvm.org/D20492
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270458 91177308-0d34-0410-b5e6-96231b3b80d8
      d1cedd4e
  3. May 03, 2016
  4. Mar 24, 2016
  5. Mar 23, 2016
  6. Feb 27, 2016
  7. Feb 14, 2016
  8. Nov 14, 2015
  9. Oct 29, 2015
  10. Sep 11, 2015
  11. Sep 02, 2015
  12. Aug 10, 2015
    • Nick Lewycky's avatar
      Fix typo. · 1525c826
      Nick Lewycky authored
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244490 91177308-0d34-0410-b5e6-96231b3b80d8
      1525c826
    • Mark Heffernan's avatar
      Add new llvm.loop.unroll.enable metadata for use with "#pragma unroll". · 1476822d
      Mark Heffernan authored
      This change adds the new unroll metadata "llvm.loop.unroll.enable" which directs
      the optimizer to unroll a loop fully if the trip count is known at compile time, and
      unroll partially if the trip count is not known at compile time. This differs from
      "llvm.loop.unroll.full" which explicitly does not unroll a loop if the trip count is not
      known at compile time
      
      With this change "#pragma unroll" generates "llvm.loop.unroll.enable" rather than
      "llvm.loop.unroll.full" metadata. This changes the semantics of "#pragma unroll" slightly
      to mean "unroll aggressively (fully or partially)" rather than "unroll fully or not at all".
      
      The motivating example for this change was some internal code with a loop marked
      with "#pragma unroll" which only sometimes had a compile-time trip count depending
      on template magic. When the trip count was a compile-time constant, everything works
      as expected and the loop is fully unrolled. However, when the trip count was not a
      compile-time constant the "#pragma unroll" explicitly disabled unrolling of the loop(!).
      Removing "#pragma unroll" caused the loop to be unrolled partially which was desirable
      from a performance perspective.
      
      
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244467 91177308-0d34-0410-b5e6-96231b3b80d8
      1476822d
  13. Aug 05, 2015
  14. Jul 13, 2015
  15. Jun 15, 2015
    • Peter Collingbourne's avatar
      Protection against stack-based memory corruption errors using SafeStack: Clang... · 4d2986d8
      Peter Collingbourne authored
      Protection against stack-based memory corruption errors using SafeStack: Clang command line option and function attribute
      
      This patch adds the -fsanitize=safe-stack command line argument for clang,
      which enables the Safe Stack protection (see http://reviews.llvm.org/D6094
      for the detailed description of the Safe Stack).
      
      This patch is our implementation of the safe stack on top of Clang. The
      patches make the following changes:
      
      - Add -fsanitize=safe-stack and -fno-sanitize=safe-stack options to clang
        to control safe stack usage (the safe stack is disabled by default).
      
      - Add __attribute__((no_sanitize("safe-stack"))) attribute to clang that can be
        used to disable the safe stack for individual functions even when enabled
        globally.
      
      Original patch by Volodymyr Kuznetsov and others at the Dependable Systems
      Lab at EPFL; updates and upstreaming by myself.
      
      Differential Revision: http://reviews.llvm.org/D6095
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239762 91177308-0d34-0410-b5e6-96231b3b80d8
      4d2986d8
  16. Mar 10, 2015
  17. Dec 05, 2014
  18. Dec 03, 2014
  19. Nov 14, 2014
  20. Nov 12, 2014
  21. Oct 10, 2014
  22. Oct 03, 2014
    • Dan Liew's avatar
      [sphinx clean up] Fix warning introduced by r218957 · 0999b0d8
      Dan Liew authored
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218983 91177308-0d34-0410-b5e6-96231b3b80d8
      0999b0d8
    • Hal Finkel's avatar
      Add an implementation of C11's stdatomic.h · 39f1f1f1
      Hal Finkel authored
      Adds a Clang-specific implementation of C11's stdatomic.h header. On systems,
      such as FreeBSD, where a stdatomic.h header is already provided, we defer to
      that header instead (using our __has_include_next technology). Otherwise, we
      provide an implementation in terms of our __c11_atomic_* intrinsics (that were
      created for this purpose).
      
      C11 7.1.4p1 requires function declarations for atomic_thread_fence,
      atomic_signal_fence, atomic_flag_test_and_set,
      atomic_flag_test_and_set_explicit, and atomic_flag_clear, and requires that
      they have external linkage. Accordingly, we provide these declarations, but if
      a user elides the shadowing macros and uses them, then they must have a libc
      (or similar) that actually provides definitions.
      
      atomic_flag is implemented using _Bool as the underlying type. This is
      consistent with the implementation provided by FreeBSD and also GCC 4.9 (at
      least when __GCC_ATOMIC_TEST_AND_SET_TRUEVAL == 1).
      
      Patch by Richard Smith (rebased and slightly edited by me -- Richard said I
      should drive at this point).
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218957 91177308-0d34-0410-b5e6-96231b3b80d8
      39f1f1f1
  23. Sep 08, 2014
    • Hal Finkel's avatar
      Add __builtin_assume and __builtin_assume_aligned using @llvm.assume. · 687b32ee
      Hal Finkel authored
      This makes use of the recently-added @llvm.assume intrinsic to implement a
      __builtin_assume(bool) intrinsic (to provide additional information to the
      optimizer). This hooks up __assume in MS-compatibility mode to mirror
      __builtin_assume (the semantics have been intentionally kept compatible), and
      implements GCC's __builtin_assume_aligned as assume((p - o) & mask == 0). LLVM
      now contains special logic to deal with assumptions of this form.
      
      git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217349 91177308-0d34-0410-b5e6-96231b3b80d8
      687b32ee
  24. Sep 03, 2014
  25. Sep 02, 2014
  26. Jul 23, 2014
  27. Jul 14, 2014
  28. Jul 02, 2014
  29. Jun 19, 2014
  30. Jun 18, 2014
  31. Jun 04, 2014
  32. May 28, 2014
  33. May 24, 2014
  34. May 09, 2014
Loading