[all-commits] [llvm/llvm-project] a22236: [OpenMP] Implement '#pragma omp unroll'.

Michael Kruse via All-commits all-commits at lists.llvm.org
Thu Jun 10 12:34:17 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a22236120f17074532bec70f5916a235beddd475
      https://github.com/llvm/llvm-project/commit/a22236120f17074532bec70f5916a235beddd475
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2021-06-10 (Thu, 10 Jun 2021)

  Changed paths:
    M clang/include/clang-c/Index.h
    M clang/include/clang/AST/OpenMPClause.h
    M clang/include/clang/AST/RecursiveASTVisitor.h
    M clang/include/clang/AST/StmtOpenMP.h
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Basic/StmtNodes.td
    M clang/include/clang/Sema/Sema.h
    M clang/include/clang/Serialization/ASTBitCodes.h
    M clang/lib/AST/OpenMPClause.cpp
    M clang/lib/AST/StmtOpenMP.cpp
    M clang/lib/AST/StmtPrinter.cpp
    M clang/lib/AST/StmtProfile.cpp
    M clang/lib/Basic/OpenMPKinds.cpp
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/lib/CodeGen/CGStmt.cpp
    M clang/lib/CodeGen/CGStmtOpenMP.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/lib/Parse/ParseOpenMP.cpp
    M clang/lib/Sema/SemaExceptionSpec.cpp
    M clang/lib/Sema/SemaOpenMP.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTReaderStmt.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/lib/Serialization/ASTWriterStmt.cpp
    M clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
    A clang/test/OpenMP/unroll_ast_print.cpp
    A clang/test/OpenMP/unroll_codegen_factor.cpp
    A clang/test/OpenMP/unroll_codegen_for_collapse_outer.cpp
    A clang/test/OpenMP/unroll_codegen_for_partial.cpp
    A clang/test/OpenMP/unroll_codegen_full.cpp
    A clang/test/OpenMP/unroll_codegen_heuristic.cpp
    A clang/test/OpenMP/unroll_codegen_parallel_for_factor.cpp
    A clang/test/OpenMP/unroll_codegen_partial.cpp
    A clang/test/OpenMP/unroll_codegen_tile_for.cpp
    A clang/test/OpenMP/unroll_codegen_unroll_for.cpp
    A clang/test/OpenMP/unroll_messages.cpp
    M clang/tools/libclang/CIndex.cpp
    M clang/tools/libclang/CXCursor.cpp
    M llvm/include/llvm/Frontend/OpenMP/OMP.td

  Log Message:
  -----------
  [OpenMP] Implement '#pragma omp unroll'.

Implementation of the unroll directive introduced in OpenMP 5.1. Follows the approach from D76342 for the tile directive (i.e. AST-based, not using the OpenMPIRBuilder). Tries to use `llvm.loop.unroll.*` metadata where possible, but has to fall back to an AST representation of the outer loop if the partially unrolled generated loop is associated with another directive (because it needs to compute the number of iterations).

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D99459




More information about the All-commits mailing list