1. Aug 13, 2020
  2. Aug 12, 2020
    • Valentin Clement's avatar
      [mlir][linalg][NFC] Remove extra semi-colon causing warnings · 0e70a127
      Valentin Clement authored
      Extra semi-colon causes bunch of warnings with GCC 9.2.0
      
      ```
      [1354/1516] Building CXX object tools/mlir/lib/Dialect/Linalg/IR/CMakeFiles/obj.MLIRLinalgOps.dir/LinalgOps.cpp.o
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1306:35: warning: extra ';' [-Wpedantic]
       1306 | CANONICALIZERS_AND_FOLDERS(ConvOp);
            |                                   ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1307:41: warning: extra ';' [-Wpedantic]
       1307 | CANONICALIZERS_AND_FOLDERS(PoolingMaxOp);
            |                                         ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1308:41: warning: extra ';' [-Wpedantic]
       1308 | CANONICALIZERS_AND_FOLDERS(PoolingMinOp);
            |                                         ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1309:41: warning: extra ';' [-Wpedantic]
       1309 | CANONICALIZERS_AND_FOLDERS(PoolingSumOp);
            |                                         ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1310:35: warning: extra ';' [-Wpedantic]
       1310 | CANONICALIZERS_AND_FOLDERS(CopyOp);
            |                                   ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1311:35: warning: extra ';' [-Wpedantic]
       1311 | CANONICALIZERS_AND_FOLDERS(FillOp);
            |                                   ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1312:38: warning: extra ';' [-Wpedantic]
       1312 | CANONICALIZERS_AND_FOLDERS(GenericOp);
            |                                      ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1313:45: warning: extra ';' [-Wpedantic]
       1313 | CANONICALIZERS_AND_FOLDERS(IndexedGenericOp);
            |                                             ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1318:42: warning: extra ';' [-Wpedantic]
       1318 | CANONICALIZERS_AND_FOLDERS(BatchMatmulOp);
            |                                          ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1319:34: warning: extra ';' [-Wpedantic]
       1319 | CANONICALIZERS_AND_FOLDERS(DotOp);
            |                                  ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1320:37: warning: extra ';' [-Wpedantic]
       1320 | CANONICALIZERS_AND_FOLDERS(MatmulOp);
            |                                     ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1321:37: warning: extra ';' [-Wpedantic]
       1321 | CANONICALIZERS_AND_FOLDERS(MatvecOp);
            |                                     ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1322:36: warning: extra ';' [-Wpedantic]
       1322 | CANONICALIZERS_AND_FOLDERS(ConvWOp);
            |                                    ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1323:38: warning: extra ';' [-Wpedantic]
       1323 | CANONICALIZERS_AND_FOLDERS(ConvNWCOp);
            |                                      ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1324:38: warning: extra ';' [-Wpedantic]
       1324 | CANONICALIZERS_AND_FOLDERS(ConvNCWOp);
            |                                      ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1325:37: warning: extra ';' [-Wpedantic]
       1325 | CANONICALIZERS_AND_FOLDERS(ConvHWOp);
            |                                     ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1326:39: warning: extra ';' [-Wpedantic]
       1326 | CANONICALIZERS_AND_FOLDERS(ConvNHWCOp);
            |                                       ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1327:39: warning: extra ';' [-Wpedantic]
       1327 | CANONICALIZERS_AND_FOLDERS(ConvNCHWOp);
            |                                       ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1328:38: warning: extra ';' [-Wpedantic]
       1328 | CANONICALIZERS_AND_FOLDERS(ConvDHWOp);
            |                                      ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1329:40: warning: extra ';' [-Wpedantic]
       1329 | CANONICALIZERS_AND_FOLDERS(ConvNDHWCOp);
            |                                        ^
      /home/4vn/versioning/llvm-project/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1330:40: warning: extra ';' [-Wpedantic]
       1330 | CANONICALIZERS_AND_FOLDERS(ConvNCDHWOp);
            |                                        ^
      ```
      
      Reviewed By: mehdi_amini, rriddle
      
      Differential Revision: https://reviews.llvm.org/D85766
      0e70a127
    • Alexey Bataev's avatar
      [OPENMP]Fix PR37671: Privatize local(private) variables in untied tasks. · f4f3f678
      Alexey Bataev authored
      In untied tasks, need to allocate the space for local variales, declared
      in task region, when the memory for task data is allocated. THe function
      can be interrupted and we can exit from the function in untied task
      switch. Need to keep the state of the local variables in this case.
      Also, the compiler should not call cleanup when exiting in untied task
      switch until the real exit out of the declaration scope is met during
       execution.
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D84457
      f4f3f678
    • Anastasia Stulova's avatar
      [OpenCL] Remove warning for variadic macros in C++ for OpenCL. · 3c8a4ee0
      Anastasia Stulova authored
      Patch by Ole Strohm (olestrohm)!
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D85429
      3c8a4ee0
    • Krzysztof Parzyszek's avatar
    • Anna Welker's avatar
      [ARM][MVE] Enable tail predication for loops containing MVE gather/scatters · 4fe5615e
      Anna Welker authored
      Widen the scope of memory operations that are allowed to be tail predicated
      to include gathers and scatters, such that loops that are auto-vectorized
      with the option -enable-arm-maskedgatscat (and actually end up containing
      an MVE gather or scatter) can be tail predicated.
      
      Differential Revision: https://reviews.llvm.org/D85138
      4fe5615e
    • Zurab Tsinadze's avatar
      [analyzer] StdLibraryFunctionsChecker: Add support for new functions · 25bbe234
      Zurab Tsinadze authored
      `toupper`, `tolower`, `toascii` functions were added to
      StdLibraryFunctionsChecker to fully cover CERT STR37-C rule:
      https://wiki.sei.cmu.edu/confluence/x/BNcxBQ
      
      Differential Revision: https://reviews.llvm.org/D85093
      25bbe234
    • Alexey Bataev's avatar
      [OPENMP]Do not add TGT_OMP_TARGET_PARAM flag to non-captured mapped arguments. · ddbd21d2
      Alexey Bataev authored
      If the arguments are mapped, but are actually not used in the target
      region, the compiler still adds attribute TGT_OMP_TARGET_PARAM for such
      arguments. It makes the libomptarget to add such parameters to the list
      of arguments, passed to the kernel at the runtime, and may lead to
      incorrect results/crashes during execution.
      
      Differential Revision: https://reviews.llvm.org/D85755
      ddbd21d2
    • Matt Arsenault's avatar
      AMDGPU/GlobalISel: Select llvm.amdgcn.global.atomic.fadd · e14474a3
      Matt Arsenault authored
      Remove the intermediate transform in the DAG path. I believe this is
      the last non-deprecated intrinsic that needs handling.
      e14474a3
    • Matt Arsenault's avatar
      AMDGPU: Handle intrinsics in performMemSDNodeCombine · 701228c4
      Matt Arsenault authored
      This avoids a possible regression in a future patch
      701228c4
    • Alexey Bataev's avatar
      Revert "[OPENMP]Fix PR37671: Privatize local(private) variables in untied tasks." · 3651658b
      Alexey Bataev authored
      This reverts commit ec9563c5 to
      investigate compiler crash revelaed by the buildbots.
      3651658b
    • Xing GUO's avatar
      [DWARFYAML] Make the address size of compilation units optional. · e891b6a7
      Xing GUO authored
      This patch makes the 'AddrSize' field optional. If the address size is
      missing, yaml2obj will infer it from the object file.
      
      Reviewed By: jhenderson
      
      Differential Revision: https://reviews.llvm.org/D85805
      e891b6a7
    • Xing GUO's avatar
      [MachOYAML] Simplify the section data emitting function. NFC. · 386d5af0
      Xing GUO authored
      This patch helps simplify some codes in writeSectionData() function.
      
      Reviewed By: jhenderson, grimar
      
      Differential Revision: https://reviews.llvm.org/D85821
      386d5af0
    • Alexey Bataev's avatar
      [OPENMP]Fix PR37671: Privatize local(private) variables in untied tasks. · ec9563c5
      Alexey Bataev authored
      Summary:
      In untied tasks, need to allocate the space for local variales, declared
      in task region, when the memory for task data is allocated. THe function
      can be interrupted and we can exit from the function in untied task
      switch. Need to keep the state of the local variables in this case.
      Also, the compiler should not call cleanup when exiting in untied task
      switch until the real exit out of the declaration scope is met during
       execution.
      
      Reviewers: jdoerfert
      
      Subscribers: yaxunl, guansong, cfe-commits, sstefan1, caomhin
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D84457
      ec9563c5
    • Erich Keane's avatar
      Limit Max Vector alignment on COFF targets to 8192. · aa4bc1cb
      Erich Keane authored
      COFF targets have a max object alignment of 8192, so trying to create
      one with a larger size results in an unreachable in WinCOFFObjectWriter.
      
      For the reproducer I have uses thread local storage, however other
      alignments are likely affected as well.
      
      This patch sets the MaxVectorAlign for COFF to 8192.  Additionally,
      though there is no longer a way to reproduce that I could find, it
      correctly sets the MaxTLSAlign for COFF to that value as well, so that
      if anyone comes up with a situation where this is true, it will cause an
      error.
      
      Differential Revision: https://reviews.llvm.org/D85543
      aa4bc1cb
    • Sanjay Patel's avatar
      [VectorCombine] early exit if target has no vector registers · cc892fd9
      Sanjay Patel authored
      Based on post-commit discussion in:
      D81766
      
      Other vectorization passes (SLP and Loop) use this TTI API similarly.
      cc892fd9
    • Sanjay Patel's avatar
    • David Green's avatar
      e859868e
    • Sanjay Patel's avatar
      [InstCombine] eliminate a pointer cast around insertelement · 912c09e8
      Sanjay Patel authored
      I'm not sure if this solves PR46839 completely, but reducing the casting should help:
      https://bugs.llvm.org/show_bug.cgi?id=46839
      
      Differential Revision: https://reviews.llvm.org/D85647
      912c09e8
    • Sanjay Patel's avatar
      [VectorCombine] add test for Hexagon that would crash; NFC · b97e402c
      Sanjay Patel authored
      This test verifies the code change from:
      rGb0b95dab
      (although that would not be true if PR47128 is fixed)
      b97e402c
    • Kai Nacke's avatar
      [SystemZ/ZOS] Implement computeHostNumPhysicalCores · bca1b8ed
      Kai Nacke authored
      On z/OS, the information is stored in the Common System Data Area
      (CSD). It is the number of CPs allocated to the current LPAR.
      
      Reviewers: aganea, hubert.reinterpertcast, MaskRay
      
      Reviewed By: hubert.reinterpertcast
      
      Differential Revision: https://reviews.llvm.org/D85531
      bca1b8ed
    • Sam Parker's avatar
      [LoopUnroll] Adjust CostKind query · ea8448e3
      Sam Parker authored
      When TTI was updated to use an explicit cost, TCK_CodeSize was used
      although the default implicit cost would have been the hand-wavey
      cost of size and latency. So, revert back to this behaviour. This is
      not expected to have (much) impact on targets since most (all?) of
      them return the same value for SizeAndLatency and CodeSize.
      
      When optimising for size, the logic has been changed to query
      CodeSize costs instead of SizeAndLatency.
      
      This patch also adds a testing option in the unroller so that
      OptSize thresholds can be specified.
      
      Differential Revision: https://reviews.llvm.org/D85723
      ea8448e3
    • Raphael Isemann's avatar
      Revert "[lldb] Display autosuggestion part in gray if there is one possible suggestion" · cff880b0
      Raphael Isemann authored
      This reverts commit 246afe0c. This broke
      the following tests on Linux it seems:
        lldb-api :: commands/expression/multiline-completion/TestMultilineCompletion.py
        lldb-api :: iohandler/completion/TestIOHandlerCompletion.py
      cff880b0