[all-commits] [llvm/llvm-project] a3d1f8: [OpenMP][NFC] Consolidate `to` and `from` clause m...

Joel E. Denny via All-commits all-commits at lists.llvm.org
Tue Jul 28 16:16:06 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a3d1f88fa7da3dfc0b4319f2e4eb7374fa60b819
      https://github.com/llvm/llvm-project/commit/a3d1f88fa7da3dfc0b4319f2e4eb7374fa60b819
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2020-07-28 (Tue, 28 Jul 2020)

  Changed paths:
    M clang/include/clang/Basic/OpenMPKinds.def
    M clang/include/clang/Basic/OpenMPKinds.h
    M clang/lib/Basic/OpenMPKinds.cpp
    M clang/lib/Parse/ParseOpenMP.cpp

  Log Message:
  -----------
  [OpenMP][NFC] Consolidate `to` and `from` clause modifiers

`to` and `from` clauses take the same modifiers, which are called
"motion modifiers" in TR8, so implement handling of their modifiers
once not twice.  This will make it easier to implement additional
motion modifiers in the future.

Reviewed By: ABataev

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


  Commit: 3c3faae497046be706df29e16c9fbccb7e1fce09
      https://github.com/llvm/llvm-project/commit/3c3faae497046be706df29e16c9fbccb7e1fce09
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2020-07-28 (Tue, 28 Jul 2020)

  Changed paths:
    M clang/include/clang/AST/OpenMPClause.h
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Basic/OpenMPKinds.def
    M clang/include/clang/Basic/OpenMPKinds.h
    M clang/include/clang/Parse/Parser.h
    M clang/include/clang/Sema/Sema.h
    M clang/lib/AST/OpenMPClause.cpp
    M clang/lib/Basic/OpenMPKinds.cpp
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/lib/Parse/ParseOpenMP.cpp
    M clang/lib/Sema/SemaOpenMP.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/lib/Serialization/ASTReader.cpp
    M clang/lib/Serialization/ASTWriter.cpp
    M clang/test/OpenMP/declare_mapper_ast_print.c
    M clang/test/OpenMP/declare_mapper_codegen.cpp
    M clang/test/OpenMP/target_update_ast_print.cpp
    M clang/test/OpenMP/target_update_codegen.cpp
    M clang/test/OpenMP/target_update_messages.cpp

  Log Message:
  -----------
  [OpenMP] Implement TR8 `present` motion modifier in Clang (1/2)

This patch implements Clang front end support for the OpenMP TR8
`present` motion modifier for `omp target update` directives.  The
next patch in this series implements OpenMP runtime support.

Reviewed By: ABataev

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


  Commit: 2cb926a447d22166dac0d6e6dceaf5b3616ef6a1
      https://github.com/llvm/llvm-project/commit/2cb926a447d22166dac0d6e6dceaf5b3616ef6a1
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2020-07-28 (Tue, 28 Jul 2020)

  Changed paths:
    M openmp/libomptarget/src/omptarget.cpp
    A openmp/libomptarget/test/mapping/present/target_update.c

  Log Message:
  -----------
  [OpenMP] Implement TR8 `present` motion modifier in runtime (2/2)

This patch implements OpenMP runtime support for the OpenMP TR8
`present` motion modifier for `omp target update` directives.  The
previous patch in this series implements Clang front end support.

Reviewed By: grokos

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


  Commit: d680711b94e94e9387076a0daf2a329e304e6751
      https://github.com/llvm/llvm-project/commit/d680711b94e94e9387076a0daf2a329e304e6751
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2020-07-28 (Tue, 28 Jul 2020)

  Changed paths:
    M llvm/include/llvm/Support/FileCheck.h
    M llvm/lib/Support/FileCheck.cpp
    M llvm/lib/Support/FileCheckImpl.h
    M llvm/test/FileCheck/dump-input-annotations.txt
    M llvm/test/FileCheck/verbose.txt
    M llvm/utils/FileCheck/FileCheck.cpp

  Log Message:
  -----------
  [FileCheck] Extend -dump-input with substitutions

Substitutions are already reported in the diagnostics appearing before
the input dump in the case of failed directives, and they're reported
in traces (produced by `-vv -dump-input=never`) in the case of
successful directives.  However, those reports are not always
convenient to view while investigating the input dump, so this patch
adds the substitution report to the input dump too.  For example:

```
$ cat check
CHECK: hello [[WHAT:[a-z]+]]
CHECK: [[VERB]] [[WHAT]]

$ FileCheck -vv -DVERB=goodbye check < input |& tail -8
<<<<<<
           1: hello world
check:1       ^~~~~~~~~~~
           2: goodbye word
check:2'0     X~~~~~~~~~~~ error: no match found
check:2'1                  with "VERB" equal to "goodbye"
check:2'2                  with "WHAT" equal to "world"
>>>>>>
```

Without this patch, the location reported for a substitution for a
directive match is the directive's full match range.  This location is
misleading as it implies the substitution itself matches that range.
This patch changes the reported location to just the match range start
to suggest the substitution is known at the start of the match.  (As
in the above example, input dumps don't mark any range for
substitutions.  The location info in that case simply identifies the
right line for the annotation.)

Reviewed By: mehdi_amini, thopre

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


  Commit: 9f86b8ec41f04fa6f087264008317515a612a922
      https://github.com/llvm/llvm-project/commit/9f86b8ec41f04fa6f087264008317515a612a922
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2020-07-28 (Tue, 28 Jul 2020)

  Changed paths:
    M llvm/lib/Support/FileCheck.cpp
    M llvm/lib/Support/FileCheckImpl.h
    M llvm/test/FileCheck/dump-input-annotations.txt
    M llvm/test/FileCheck/verbose.txt
    M llvm/unittests/Support/FileCheckTest.cpp

  Log Message:
  -----------
  [FileCheck] Report captured variables

Report captured variables in input dumps and traces.  For example:

```
$ cat check
CHECK: hello [[WHAT:[a-z]+]]
CHECK: goodbye [[WHAT]]

$ FileCheck -dump-input=always -vv check < input |& tail -8
<<<<<<
           1: hello world
check:1'0     ^~~~~~~~~~~
check:1'1           ^~~~~ captured var "WHAT"
           2: goodbye world
check:2'0     ^~~~~~~~~~~~~
check:2'1                   with "WHAT" equal to "world"
>>>>>>

$ FileCheck -dump-input=never -vv check < input
check2:1:8: remark: CHECK: expected string found in input
CHECK: hello [[WHAT:[a-z]+]]
       ^
<stdin>:1:1: note: found here
hello world
^~~~~~~~~~~
<stdin>:1:7: note: captured var "WHAT"
hello world
      ^~~~~
check2:2:8: remark: CHECK: expected string found in input
CHECK: goodbye [[WHAT]]
       ^
<stdin>:2:1: note: found here
goodbye world
^~~~~~~~~~~~~
<stdin>:2:1: note: with "WHAT" equal to "world"
goodbye world
^
```

Reviewed By: thopre

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


Compare: https://github.com/llvm/llvm-project/compare/80bd6ae13ea2...9f86b8ec41f0


More information about the All-commits mailing list