llvm/llvm-project

[OpenMP][Opt] Track internal control variables (ICVs) and optimize accordingly

Open

#174 geöffnet am 13. März 2020

Auf GitHub ansehen
 (1 Kommentar) (1 Reaktion) (2 zugewiesene Personen)C++ (10.782 Forks)batch import
gsochelp wantedmetaissue

Repository-Metriken

Stars
 (26.378 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 2h) (1.000 gemergte PRs in 30 T)

Beschreibung

OpenMP defines ICVs that hold the internal state. While some are hard to statically predict, at least without user assumptions, we can us program analysis to determine the values of quite a few.

Code reached only via a __kmpc_fork_call has for example the parallel region nesting of at least 1 (not the active parallel region nesting though).

This metabug is to allow us to track the overall task as we split it up in smaller chunks. Thus, we expect this bug to be edited as we go.

  • List all ICVs as defined by the OpenMP standard with their default values in lllvm/lib/frontend/OMPKinds.def
  • Design a way to associate events, e.g., "setters" or entering a code region via a callback (see LangRef), impacts ICV values.
  • Collect situations where ICV value information can directly be used, e.g., to replace runtime calls.
  • Implement a data-flow analysis to determine ICV values "properly".
  • Determine where ICV could help the runtime and design new APIs for this use case.

Contributor Guide