1. Jun 19, 2020
  2. Jun 18, 2020
    • Alexey Bataev's avatar
      [OPENMP50]Codegen for scan directives in parallel for regions. · 1ec469cf
      Alexey Bataev authored
      Summary:
      Added codegen for scan directives in parallel for regions.
      
      Emits the code for the directive with inscan reductions.
      Original code:
      ```
       #pragma omp parallel for reduction(inscan, op : ...)
       for() {
         <input phase>;
         #pragma omp scan (in)exclusive(...)
         <scan phase>
       }
      ```
      is transformed to something:
      
      ```
       #pragma omp parallel
      {
      size num_iters = <num_iters>;
      <type> buffer[num_iters];
       #pragma omp for
      for (i: 0..<num_iters>) {
        <input phase>;
        buffer[i] = red;
      }
       #pragma omp barrier
      for (int k = 0; k != ceil(log2(num_iters)); ++k)
      for (size cnt = last_iter; cnt >= pow(2, k); --k)
        buffer[i] op= buffer[i-pow(2,k)];
       #pragma omp for
      for (0..<num_iters>) {
        red = InclusiveScan ? buffer[i] : buffer[i-1];
        <scan phase>;
      }
      }
      ```
      
      Reviewers: jdoerfert
      
      Subscribers: yaxunl, guansong, sstefan1, cfe-commits, caomhin
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D81478
      1ec469cf
    • Pete Steinfeld's avatar
      [flang] Fix crash with alternate returns in modules · 3ed2909f
      Pete Steinfeld authored
      Summary:
      We weren't handling the case of subroutines with alternate returns that
      are contained in modules.  I changed the code to add an `*` as the name
      of the parameter when creating the `.mod` file.
      
      Reviewers: tskeith, klausler, DavidTruby
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D82096
      3ed2909f
    • Saleem Abdulrasool's avatar
      unwind: EHABISectionIterator `operator!=`, constify `operator-` · 2d865ccb
      Saleem Abdulrasool authored
      Add missing `operator!=` and make `operator-` const for
      `EHABISectionIterator`.  This repairs the build of libunwind when
      building with GCC.
      
      Patch by Chad Duffin!
      
      Reviewed By: compnerd, libunwind
      Differential Revision: https://reviews.llvm.org/D81597
      2d865ccb
    • Simon Pilgrim's avatar
      [TargetLowering] SimplifyMultipleUseDemandedBits - drop already extended... · 24744213
      Simon Pilgrim authored
      [TargetLowering] SimplifyMultipleUseDemandedBits - drop already extended ISD::SIGN_EXTEND_INREG nodes.
      
      If the source of the SIGN_EXTEND_INREG node is already sign extended, use the source directly.
      24744213
    • Nico Weber's avatar
      fix a typo to cycle bots · 9bcd59fd
      Nico Weber authored
      9bcd59fd
    • Hans Wennborg's avatar
      Don't require shell in clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_adda.c · b4c7a754
      Hans Wennborg authored
      rm works fine without it.
      b4c7a754
    • hyd-dev's avatar
      [clang-tidy] Add --use-color command line option and UseColor option to... · d9b8aada
      hyd-dev authored
      [clang-tidy] Add --use-color command line option and UseColor option to control colors in diagnostics
      
      This patch adds `--use-color` command line option and `UseColor` option to clang-tidy to control colors in diagnostics. With these options, users can force colorful output. This is useful when using clang-tidy with parallelization command line tools (like ninja and GNU parallel), as they often pipe clang-tidy's standard output and make the colors disappear.
      
      Reviewed By: njames93
      
      Differential Revision: https://reviews.llvm.org/D79477
      d9b8aada
    • Matt Arsenault's avatar
    • Ayke van Laethem's avatar
      [AVR] Fix miscompilation of zext + add · b4c91462
      Ayke van Laethem authored
      Code like the following:
      
          define i32 @foo(i32 %a, i1 zeroext %b) addrspace(1) {
          entry:
            %conv = zext i1 %b to i32
            %add = add nsw i32 %conv, %a
            ret i32 %add
          }
      
      Would compile to the following (incorrect) code:
      
          foo:
              mov     r18, r20
              clr     r19
              add     r22, r18
              adc     r23, r19
              sbci    r24, 0
              sbci    r25, 0
              ret
      
      Those sbci instructions are clearly wrong, they should have been adc
      instructions.
      
      This commit improves codegen to use adc instead:
      
          foo:
              mov     r18, r20
              clr     r19
              ldi     r20, 0
              ldi     r21, 0
              add     r22, r18
              adc     r23, r19
              adc     r24, r20
              adc     r25, r21
              ret
      
      This code is not optimal (it could be just 5 instructions instead of the
      current 9) but at least it doesn't miscompile.
      
      Differential Revision: https://reviews.llvm.org/D78439
      b4c91462
    • Nathan James's avatar
      [clang-tidy] RenamerClangTidy group redecls into 1 warning. · 850bb889
      Nathan James authored
      This changes the behavious of `RenamerClangTidyCheck` based checks by grouping declarations of the same thing into 1 warning where it is first declared.
      This cleans up clang-tidy output and prevents issues where 1 fix-it couldn't be applied, yet all other warnings(and fix-its) for the same declaration would be applied.
      The old behaviour of forward declaring a class without defining it isn't affected, i.e. no warnings will be emitted for that case.
      
      Reviewed By: aaron.ballman
      
      Differential Revision: https://reviews.llvm.org/D82059
      850bb889