Page MenuHomePhabricator

[OpenMP] Add Module metadata for OpenMP compilation
Needs ReviewPublic

Authored by jhuber6 on May 12 2021, 1:12 PM.

Details

Reviewers
jdoerfert
Summary

This patch adds a module level metadata flag indicating that the module
was compiled with the -fopenmp flag. This will make it easier for
passes like OpenMPOpt to determine if it should be run.

Diff Detail

Unit TestsFailed

TimeTest
110 msx64 debian > Clang.OpenMP::cancel_codegen.cpp
Script: -- : 'RUN: at line 2'; /mnt/disks/ssd0/agent/llvm-project/build/bin/clang -cc1 -internal-isystem /mnt/disks/ssd0/agent/llvm-project/build/lib/clang/13.0.0/include -nostdsysteminc -verify -fopenmp -fopenmp-version=45 -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - /mnt/disks/ssd0/agent/llvm-project/clang/test/OpenMP/cancel_codegen.cpp | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck --allow-unused-prefixes /mnt/disks/ssd0/agent/llvm-project/clang/test/OpenMP/cancel_codegen.cpp --check-prefix=OMP
180 msx64 windows > Clang.OpenMP::cancel_codegen.cpp
Script: -- : 'RUN: at line 2'; c:\ws\w16n2-1\llvm-project\premerge-checks\build\bin\clang.exe -cc1 -internal-isystem c:\ws\w16n2-1\llvm-project\premerge-checks\build\lib\clang\13.0.0\include -nostdsysteminc -verify -fopenmp -fopenmp-version=45 -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - C:\ws\w16n2-1\llvm-project\premerge-checks\clang\test\OpenMP\cancel_codegen.cpp | c:\ws\w16n2-1\llvm-project\premerge-checks\build\bin\filecheck.exe --allow-unused-prefixes C:\ws\w16n2-1\llvm-project\premerge-checks\clang\test\OpenMP\cancel_codegen.cpp --check-prefix=OMP