Skip to content
  1. Jan 10, 2019
  2. Jan 09, 2019
    • Alex Lorenz's avatar
      [ObjC] Allow the use of implemented unavailable methods from within · 4e3c0bdf
      Alex Lorenz authored
      the @implementation context
      
      In Objective-C, it's common for some frameworks to mark some methods like init
      as unavailable in the @interface to prohibit their usage. However, these
      frameworks then often implemented said method and refer to it in another method
      that acts as a factory for that object. The recent change to how messages to
      self are type checked in clang (r349841) introduced a regression which started
      to prohibit this pattern with an X is unavailable error. This commit addresses
      the aforementioned regression.
      
      rdar://47134898
      
      Differential Revision: https://reviews.llvm.org/D56469
      
      llvm-svn: 350768
      4e3c0bdf
    • Gheorghe-Teodor Bercea's avatar
      [OpenMP] Avoid remainder operations for loop index values on a collapsed loop nest. · 67796064
      Gheorghe-Teodor Bercea authored
      Summary: Change the strategy for computing loop index variables after collapsing a loop nest via the collapse clause by replacing the expensive remainder operation with multiplications and additions.
      
      Reviewers: ABataev, caomhin
      
      Reviewed By: ABataev
      
      Subscribers: guansong, arphaman, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D56413
      
      llvm-svn: 350759
      67796064
    • Gheorghe-Teodor Bercea's avatar
      [OpenMP] Add flag for preventing the extension to 64 bits for the collapse loop counter · a3afcf24
      Gheorghe-Teodor Bercea authored
      Summary: Introduce a compiler flag for cases when the user knows that the collapsed loop counter can be safely represented using at most 32 bits. This will prevent the emission of expensive mathematical operations (such as the div operation) on the iteration variable using 64 bits where 32 bit operations are sufficient.
      
      Reviewers: ABataev, caomhin
      
      Reviewed By: ABataev
      
      Subscribers: hfinkel, kkwli0, guansong, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D55928
      
      llvm-svn: 350758
      a3afcf24
    • Alexey Bataev's avatar
      Incorrect implicit data-sharing for nested tasks · 7e6803e0
      Alexey Bataev authored
      Summary:
      There is a minor issue in how the implicit data-sharings for nested tasks are computed.
      
      For the following example:
      ```
      int x;
      #pragma omp task shared(x)
      #pragma omp task
      x++;
      ```
      We compute an implicit data-sharing of shared for `x` in the second task although I think that it should be firstprivate. Below you can find the part of the OpenMP spec that covers this example:
      - // In a task generating construct, if no default clause is present, a variable for which the data-sharing attribute is not determined by the rules above and that in the enclosing context is determined to be shared by all implicit tasks bound to the current team is shared.//
      - //In a task generating construct, if no default clause is present, a variable for which the data-sharing attribute is not determined by the rules above is firstprivate.//
      
      Since each implicit-task has its own copy of `x`, we shouldn't apply the first rule.
      
      Reviewers: ABataev
      
      Reviewed By: ABataev
      
      Subscribers: cfe-commits, rogfer01
      
      Tags: #openmp
      
      Differential Revision: https://reviews.llvm.org/D56430
      
      llvm-svn: 350734
      7e6803e0
    • Ilya Biryukov's avatar
      [Driver] Fix libcxx detection on Darwin with clang run as ./clang · 87aaa56b
      Ilya Biryukov authored
      Summary:
      By using '..' instead of fs::parent_path.
      
      The intention of the code was to go from 'path/to/clang/bin' to
      'path/to/clang/include'. In most cases parent_path works, however it
      would fail when clang is run as './clang'.
      
      This was noticed in Chromium's bug tracker, see
      https://bugs.chromium.org/p/chromium/issues/detail?id=919761
      
      Reviewers: arphaman, thakis, EricWF
      
      Reviewed By: arphaman, thakis
      
      Subscribers: christof, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D56446
      
      llvm-svn: 350714
      87aaa56b
  3. Jan 08, 2019
  4. Jan 07, 2019
  5. Jan 06, 2019
  6. Jan 05, 2019
    • Saleem Abdulrasool's avatar
      CodeGen: fix autolink emission on ELF · 175890e1
      Saleem Abdulrasool authored
      The autolinking extension for ELF uses a slightly different format for
      encoding the autolink information compared to COFF and MachO.  Account
      for this in the CGM to ensure that we do not assert when emitting
      assembly or an object file.
      
      llvm-svn: 350476
      175890e1
  7. Jan 04, 2019
    • Joel E. Denny's avatar
      [OpenMP] Refactor const restriction for linear · bae586fb
      Joel E. Denny authored
      As discussed in D56113, this patch refactors the implementation of the
      const restriction for linear to reuse a function introduced by D56113.
      A side effect is that, if a variable has mutable members, this
      diagnostic is now skipped, and the diagnostic for the variable not
      being an integer or pointer is reported instead.
      
      Reviewed By: ABataev
      
      Differential Revision: https://reviews.llvm.org/D56299
      
      llvm-svn: 350441
      bae586fb
    • Joel E. Denny's avatar
      [OpenMP] Refactor const restriction for reductions · d2649292
      Joel E. Denny authored
      As discussed in D56113, this patch refactors the implementation of the
      const restriction for reductions to reuse a function introduced by
      D56113.  A side effect is that diagnostics sometimes now say
      "variable" instead of "list item" when a list item is a variable.
      
      Reviewed By: ABataev
      
      Differential Revision: https://reviews.llvm.org/D56298
      
      llvm-svn: 350440
      d2649292
    • Joel E. Denny's avatar
      [OpenMP] Replace predetermined shared for const variable · e6234d14
      Joel E. Denny authored
      The following appears in OpenMP 3.1 sec. 2.9.1.1 as a predetermined
      data-sharing attribute:
      
      > Variables with const-qualified type having no mutable member are
      > shared.
      
      It does not appear in OpenmP 4.0, 4.5, or 5.0.  This patch removes the
      implementation of that attribute when the requested OpenMP version is
      greater than 3.1.
      
      One effect of that removal is that `default(none)` affects const
      variables without mutable members.
      
      Also, without this patch, if a const variable without mutable members
      was explicitly lastprivate or private, it was an error because it was
      predetermined shared.  Now, clang instead complains that it's const
      without mutable fields, which is a more intelligible diagnostic.  That
      should be fine for all of the above versions because they all have
      something like the following, which is quoted from OpenMP 5.0
      sec. 2.19.3:
      
      > A variable that is privatized must not have a const-qualified type
      > unless it is of class type with a mutable member. This restriction does
      > not apply to the firstprivate clause.
      
      reduction and linear clauses already have separate checks for const
      variables.  Future patches will merge the implementations.
      
      Reviewed By: ABataev
      
      Differential Revision: https://reviews.llvm.org/D56113
      
      llvm-svn: 350439
      e6234d14
    • Peter Collingbourne's avatar
      Fix default-function-attr.c so that it works on Windows. · f90e1507
      Peter Collingbourne authored
      llvm-svn: 350433
      f90e1507
    • Peter Collingbourne's avatar
      hwasan: Implement lazy thread initialization for the interceptor ABI. · 87f477b5
      Peter Collingbourne authored
      The problem is similar to D55986 but for threads: a process with the
      interceptor hwasan library loaded might have some threads started by
      instrumented libraries and some by uninstrumented libraries, and we
      need to be able to run instrumented code on the latter.
      
      The solution is to perform per-thread initialization lazily. If a
      function needs to access shadow memory or add itself to the per-thread
      ring buffer its prologue checks to see whether the value in the
      sanitizer TLS slot is null, and if so it calls __hwasan_thread_enter
      and reloads from the TLS slot. The runtime does the same thing if it
      needs to access this data structure.
      
      This change means that the code generator needs to know whether we
      are targeting the interceptor runtime, since we don't want to pay
      the cost of lazy initialization when targeting a platform with native
      hwasan support. A flag -fsanitize-hwaddress-abi={interceptor,platform}
      has been introduced for selecting the runtime ABI to target. The
      default ABI is set to interceptor since it's assumed that it will
      be more common that users will be compiling application code than
      platform code.
      
      Because we can no longer assume that the TLS slot is initialized,
      the pthread_create interceptor is no longer necessary, so it has
      been removed.
      
      Ideally, lazy initialization should only cost one instruction in the
      hot path, but at present the call may cause us to spill arguments
      to the stack, which means more instructions in the hot path (or
      theoretically in the cold path if the spills are moved with shrink
      wrapping). With an appropriately chosen calling convention for
      the per-thread initialization function (TODO) the hot path should
      always need just one instruction and the cold path should need two
      instructions with no spilling required.
      
      Differential Revision: https://reviews.llvm.org/D56038
      
      llvm-svn: 350429
      87f477b5
    • Aaron Enye Shi's avatar
      [HIP][DRIVER][OFFLOAD] Do not unbundle unsupported file types · 0743cda6
      Aaron Enye Shi authored
      The offload bundler action should not unbundle the input file types that does not match the action type. This fixes an issue where .so files are unbundled when the action type is object files.
      
      Reviewers: yaxunl
      
      Differential Revision: https://reviews.llvm.org/D56321
      
      llvm-svn: 350426
      0743cda6
    • Aaron Enye Shi's avatar
      [HIP][DRIVER][OFFLOAD] Do not unbundle unsupported file types · bea57bb5
      Aaron Enye Shi authored
      The offload bundler action should not unbundle the input file types that does not match the action type. This fixes an issue where .so files are unbundled when the action type is object files.
      
      llvm-svn: 350425
      bea57bb5
Loading