Page MenuHomePhabricator

[OpenMPOpt][WIP][NOT-FOR-REVIEW] Track an ICV that determines if we are in a SPMD GPU region
Needs ReviewPublic

Authored by jdoerfert on Aug 10 2020, 7:24 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary
NOTE: This is a draft.

We can use the new ICV tacking to do fancy optimiztions w/o much effort.
This adds all the machinery to track if we are in an "SPMD region" or
not. The corresponding getter is replaced accordingly, which can easily
result in significant performance boosts. As the ICV tacking is still a
bit in flux, we'll wait till there are a few more pieces in place. Then
we'll add tests to this and review it properly.

Diff Detail

Unit TestsFailed

TimeTest
20 mslinux > Flang.Preprocessing::compiler_defined_macros.F90
Script: -- : 'RUN: at line 6'; /mnt/disks/ssd0/agent/llvm-project/build/bin/f18 -intrinsic-module-directory /mnt/disks/ssd0/agent/llvm-project/build/tools/flang/include/flang -E /mnt/disks/ssd0/agent/llvm-project/flang/test/Preprocessing/compiler_defined_macros.F90 | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck --ignore-case /mnt/disks/ssd0/agent/llvm-project/flang/test/Preprocessing/compiler_defined_macros.F90
350 mslinux > LLVM.Transforms/OpenMP::add_attributes.ll
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/bin/opt < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Transforms/OpenMP/add_attributes.ll -S -openmpopt | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/Transforms/OpenMP/add_attributes.ll
570 mslinux > LLVM.Transforms/OpenMP::icv_remarks.ll
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/build/bin/opt -passes=openmpopt -pass-remarks=openmp-opt -openmp-print-icv-values -disable-output < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Transforms/OpenMP/icv_remarks.ll 2>&1 | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/Transforms/OpenMP/icv_remarks.ll
340 mslinux > LLVM.Transforms/OpenMP::icv_tracking.ll
Script: -- : 'RUN: at line 2'; /mnt/disks/ssd0/agent/llvm-project/build/bin/opt -S -openmpopt < /mnt/disks/ssd0/agent/llvm-project/llvm/test/Transforms/OpenMP/icv_tracking.ll | /mnt/disks/ssd0/agent/llvm-project/build/bin/FileCheck /mnt/disks/ssd0/agent/llvm-project/llvm/test/Transforms/OpenMP/icv_tracking.ll
200 mswindows > LLVM.Transforms/OpenMP::add_attributes.ll
Script: -- : 'RUN: at line 1'; c:\ws\w16-1\llvm-project\premerge-checks\build\bin\opt.exe < C:\ws\w16-1\llvm-project\premerge-checks\llvm\test\Transforms\OpenMP\add_attributes.ll -S -openmpopt | c:\ws\w16-1\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w16-1\llvm-project\premerge-checks\llvm\test\Transforms\OpenMP\add_attributes.ll
View Full Test Results (7 Failed)