1. Jul 26, 2017
  2. Jul 25, 2017
    • Alexey Bataev's avatar
      [OPENMP] Codegen for 'task_reduction' clause. · 3b1b8951
      Alexey Bataev authored
      Added codegen for taskgroup directive with task_reduction clause.
      ```
      <body>
      ```
      The next code is emitted:
      ```
      %struct.kmp_task_red_input_t red_init[n];
      void *td;
      call void @__kmpc_taskgroup(%ident_t id, i32 gtid)
      ...
      red_init[i].shar = &<item>;
      red_init[i].size = sizeof(<item>);
      red_init[i].init = (void*)initializer_function;
      red_init[i].fini = (void*)destructor_function;
      red_init[i].comb = (void*)combiner_function;
      red_init[i].flags = flags;
      ...
      td = call i8* @__kmpc_task_reduction_init(i32 gtid, i32 n, i8*
      (void*)red_init);
      call void @__kmpc_end_taskgroup(%ident_t id, i32 gtid)
      
      void initializer_function(i8* priv) {
        *(<type>*)priv = <red_init>;
        ret void;
      }
      
      void destructor_function(i8* priv) {
        (<type>*)priv->~();
        ret void;
      }
      
      void combiner_function(i8* inout, i8* in) {
        *(<type>*)inout = *(<type>*)inout <red_id> *(<type>*)in;
        ret void;
      }
      ```
      
      llvm-svn: 308979
      3b1b8951
    • Fedor Sergeev's avatar
      [Sparc] invalid adjustments in TLS_LE/TLS_LDO relocations removed · 7856a320
      Fedor Sergeev authored
      Summary:
      Some SPARC TLS relocations were applying nontrivial adjustments
      to zero value, leading to unexpected non-zero values in ELF and then
      Solaris linker failures.
      
      Getting rid of these adjustments.
      
      Fixes PR33825.
      
      Reviewers: rafael, asb, jyknight
      
      Subscribers: joerg, jyknight, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D35567
      
      llvm-svn: 308978
      7856a320
    • Francis Ricci's avatar
      Add address ranges for individual macho sections on darwin · ec4ac0f0
      Francis Ricci authored
      Summary:
      This is a re-upload of the reverted commit r308644. It has changed quite
      a bit to reflect post-commit comments by kcc, so I'm re-uploading as
      a new review.
      
      Reviewers: kubamracek, alekseyshl, kcc
      
      Subscribers: llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D35799
      
      llvm-svn: 308977
      ec4ac0f0
    • Philip Pfaffe's avatar
      [IslAst] Untangle IslAst lit-testcases from specifics of the legacy-PM · 85cc5687
      Philip Pfaffe authored
      Summary:
      This consists instances of two changes:
      
      - Accept any order of checks for a specific loop form, that appear in different order in the new vs legacy-PM.
      - Remove checks for specific regions.
      
      Reviewers: grosser
      
      Reviewed By: grosser
      
      Subscribers: pollydev, llvm-commits
      
      Tags: #polly
      
      Differential Revision: https://reviews.llvm.org/D35837
      
      llvm-svn: 308976
      85cc5687
    • Kevin Funk's avatar
      [clang-tidy] Fixup clang-apply-replacements/invalid-files test · fe284e46
      Kevin Funk authored
      llvm-svn: 308975
      fe284e46
    • Kevin Funk's avatar
      [clang-tidy] clang-apply-replacements: Don't insert null entry · bb5cfb5d
      Kevin Funk authored
      Summary:
      [clang-tidy] clang-apply-replacements: Don't insert null entry
      
      Fix crash when running clang-apply-replacements on YML files which
      contain an invalid file path. Make sure we never add a nullptr into the
      map. The previous code started adding nullptr to the map after the first
      warnings via errs() has been emitted.
      
      Backtrace:
      ```
      Starting program:
      /home/kfunk/devel/build/llvm/bin/clang-apply-replacements /tmp/tmpIqtp7m
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library
      "/lib/x86_64-linux-gnu/libthread_db.so.1".
      Described file '.moc/../../../../../../src/qt5.8/qtremoteobjects/src/remoteobjects/qremoteobjectregistrysource_p.h' doesn't exist. Ignoring...
      ...
      
      Program received signal SIGSEGV, Segmentation fault.
      main (argc=<optimized out>, argv=<optimized out>) at /home/kfunk/devel/src/llvm/tools/clang/tools/extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp:262
      (gdb) p FileAndReplacements.first
      $1 = (const clang::FileEntry *) 0x0
      (gdb)
      ```
      
      Added tests.
      
      Before patch:
      
      ```
      ******************** TEST 'Clang Tools :: clang-apply-replacements/invalid-files.cpp' FAILED ********************
      Script:
      --
      mkdir -p /home/kfunk/devel/build/llvm/tools/clang/tools/extra/test/clang-apply-replacements/Output/Inputs/invalid-files
      clang-apply-replacements /home/kfunk/devel/build/llvm/tools/clang/tools/extra/test/clang-apply-replacements/Output/Inputs/invalid-files
      ls -1 /home/kfunk/devel/build/llvm/tools/clang/tools/extra/test/clang-apply-replacements/Output/Inputs/invalid-files | FileCheck /home/kfunk/devel/src/llvm/tools/clang/tools/extra/test/clang-apply-replacements/invalid-files.cpp --check-prefix=YAML
      --
      Exit Code: 139
      
      Command Output (stderr):
      --
      Described file 'idonotexist.h' doesn't exist. Ignoring...
      /home/kfunk/devel/build/llvm/tools/clang/tools/extra/test/clang-apply-replacements/Output/invalid-files.cpp.script: line 4:  9919 Segmentation fault      clang-apply-replacements /home/kfunk/devel/build/llvm/tools/clang/tools/extra/test/clang-apply-   replacements/Output/Inputs/invalid-files
      
      --
      ```
      
      After Patch:
      
      ```
      PASS: Clang Tools :: clang-apply-replacements/invalid-files.cpp (5 of 6)
      ```
      
      Reviewers: alexfh, yawanng
      
      Reviewed By: alexfh
      
      Subscribers: cfe-commits, klimek, JDevlieghere, xazax.hun
      
      Tags: #clang-tools-extra
      
      Differential Revision: https://reviews.llvm.org/D35194
      
      llvm-svn: 308974
      bb5cfb5d
    • Michael Kruse's avatar
      [ScopInfo] Fix assertion for PHIs not in a region stmts entry. · b6317007
      Michael Kruse authored
      A PHI node within a region statement is legal, but does not have
      a MemoryKind::PHI access.
      
      llvm-svn: 308973
      b6317007
    • Andrew V. Tischenko's avatar
      32e9b1ad
    • Siddharth Bhat's avatar
      [PPCGCodeGeneration] Skip arrays with empty extent. · 43f178bb
      Siddharth Bhat authored
      Invariant load hoisted scalars, and arrays whose size we can statically compute
      to be 0 do not need to be allocated as arrays.
      
      Invariant load hoisted scalars are sent to the kernel directly as parameters.
      
      Earlier, we used to allocate `0` bytes of memory for these because our
      computation of size from `PPCGCodeGeneration::getArraySize` would result in `0`.
      
      Now, since we don't invariant loads as arrays in PPCGCodeGeneration, this
      problem does not occur anymore.
      
      Differential Revision: https://reviews.llvm.org/D35795
      
      llvm-svn: 308971
      43f178bb
    • Krasimir Georgiev's avatar
      [clangd] Reuse compile commands during reparse · e4130d52
      Krasimir Georgiev authored
      Summary:
      Previously we always queried the compilation database and discarded the results
      if the file was already opened.
      
      Reviewers: ilya-biryukov
      
      Reviewed By: ilya-biryukov
      
      Subscribers: cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D35825
      
      llvm-svn: 308970
      e4130d52