[flang] Support for dump OpenMP/OpenACC declarative directives PFT in module
OpenMP/OpenACC declarative directives can also be used in module unit. Add support for dump them in module. Reviewed By: kiranchandramohan, V Donaldson Differential Revision: https://reviews.llvm.org/D120459
This commit is contained in:
parent
337d49da84
commit
b905864845
|
@ -1163,8 +1163,9 @@ public:
|
|||
void dumpModuleLikeUnit(llvm::raw_ostream &outputStream,
|
||||
const lower::pft::ModuleLikeUnit &moduleLikeUnit) {
|
||||
outputStream << getNodeIndex(moduleLikeUnit) << " ";
|
||||
outputStream << "ModuleLike: ";
|
||||
outputStream << "\nContains\n";
|
||||
outputStream << "ModuleLike:\n";
|
||||
dumpEvaluationList(outputStream, moduleLikeUnit.evaluationList);
|
||||
outputStream << "Contains\n";
|
||||
for (const lower::pft::FunctionLikeUnit &func :
|
||||
moduleLikeUnit.nestedFunctions)
|
||||
dumpFunctionLikeUnit(outputStream, func);
|
||||
|
|
12
flang/test/Lower/pre-fir-tree06.f90
Normal file
12
flang/test/Lower/pre-fir-tree06.f90
Normal file
|
@ -0,0 +1,12 @@
|
|||
! RUN: %flang_fc1 -fdebug-pre-fir-tree -fopenmp %s | FileCheck %s
|
||||
|
||||
! Test structure of the Pre-FIR tree with OpenMP declarative construct
|
||||
|
||||
! CHECK: ModuleLike
|
||||
module m
|
||||
real, dimension(10) :: x
|
||||
! CHECK-NEXT: OpenMPDeclarativeConstruct
|
||||
!$omp threadprivate(x)
|
||||
end
|
||||
! CHECK: End ModuleLike
|
||||
|
12
flang/test/Lower/pre-fir-tree07.f90
Normal file
12
flang/test/Lower/pre-fir-tree07.f90
Normal file
|
@ -0,0 +1,12 @@
|
|||
! RUN: %flang_fc1 -fdebug-pre-fir-tree -fopenacc %s | FileCheck %s
|
||||
|
||||
! Test structure of the Pre-FIR tree with OpenACC declarative construct
|
||||
|
||||
! CHECK: ModuleLike
|
||||
module m
|
||||
real, dimension(10) :: x
|
||||
! CHECK-NEXT: OpenACCDeclarativeConstruct
|
||||
!$acc declare create(x)
|
||||
end
|
||||
! CHECK: End ModuleLike
|
||||
|
Loading…
Reference in a new issue