[OpenMP] Use AAHeapToStack/AAHeapToShared analysis in SPMDization
authorGiorgis Georgakoudis <georgakoudis1@llnl.gov>
Thu, 22 Jul 2021 01:36:17 +0000 (18:36 -0700)
committerGiorgis Georgakoudis <georgakoudis1@llnl.gov>
Fri, 23 Jul 2021 01:08:37 +0000 (18:08 -0700)
commitf8c40ed8f8e760cfc672dbd1b8d8b4d9357e4a16
treea2d875417e1daa205a17203a1d29e12d6f920e9d
parent921c548f11ea0c21be3da87ba728ce23c11bf1a8
[OpenMP] Use AAHeapToStack/AAHeapToShared analysis in SPMDization

SPMDization D102307 detects incompatible OpenMP runtime calls to abort converting a target region to SPMD mode. Calls to memory allocation/de-allocation routines kmpc_alloc_shared, kmpc_free_shared are incompatible unless they are removed by AAHeapToStack/AAHeapToShared analysis. This patch extends SPMDization detection to include AAHeapToStack/AAHeapToShared analysis results for enlarging the scope of possible SPMDized regions detected.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D105634
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/lib/Transforms/IPO/OpenMPOpt.cpp
llvm/test/Transforms/OpenMP/spmdization.ll