Page MenuHomePhabricator

[clang][OpenMP] Augment ForStmt/CXXForRangeStmt for OpenMP canonical loops.
Needs ReviewPublic

Authored by Meinersbur on Jan 26 2021, 7:26 PM.

Details

Summary

Alternative version of D94973. Instead of a new AST node of kind OMPCanonicalLoop that acts as parent of a ForStmt or CXXForRangeStmt, introduce a new superclass for both classes for storying the properties for an OpenMP canonical loop.

This was suggested by @ABataev following the same approach taken in D83261 for directives. In this patch, the equivalent of OMPChildren is LoopChildren and the class corresponding to OMPExecutableDirective is MaybeCanonicalLoopStmt.

Diff Detail

Unit TestsFailed

TimeTest
430 msx64 windows > Clang.OpenMP::cancel_codegen.cpp
Script: -- : 'RUN: at line 1'; c:\ws\w1\llvm-project\premerge-checks\build\bin\clang.exe -cc1 -internal-isystem c:\ws\w1\llvm-project\premerge-checks\build\lib\clang\12.0.0\include -nostdsysteminc -verify -fopenmp -fopenmp-version=45 -triple x86_64-apple-darwin13.4.0 -emit-llvm -o - C:\ws\w1\llvm-project\premerge-checks\clang\test\OpenMP\cancel_codegen.cpp | c:\ws\w1\llvm-project\premerge-checks\build\bin\filecheck.exe C:\ws\w1\llvm-project\premerge-checks\clang\test\OpenMP\cancel_codegen.cpp --check-prefixes=ALL,CHECK
200 msx64 windows > Clang.OpenMP::irbuilder_nested_parallel_for.c
Script: -- : 'RUN: at line 2'; c:\ws\w1\llvm-project\premerge-checks\build\bin\clang.exe -cc1 -internal-isystem c:\ws\w1\llvm-project\premerge-checks\build\lib\clang\12.0.0\include -nostdsysteminc -verify -fopenmp -fopenmp-enable-irbuilder -x c++ -emit-llvm C:\ws\w1\llvm-project\premerge-checks\clang\test\OpenMP\irbuilder_nested_parallel_for.c -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -o - | c:\ws\w1\llvm-project\premerge-checks\build\bin\filecheck.exe --check-prefixes=CHECK C:\ws\w1\llvm-project\premerge-checks\clang\test\OpenMP\irbuilder_nested_parallel_for.c

Event Timeline

Meinersbur created this revision.Jan 26 2021, 7:26 PM
Meinersbur requested review of this revision.Jan 26 2021, 7:26 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 26 2021, 7:26 PM
martong removed a subscriber: martong.Jan 27 2021, 12:58 AM
Meinersbur retitled this revision from [clang][OpenMP] Augment ForStmt/CXXForRangeStmt for OpenMP canonicial loop. to [clang][OpenMP] Augment ForStmt/CXXForRangeStmt for OpenMP canonical loops..Feb 1 2021, 6:35 PM
craig.topper resigned from this revision.Feb 26 2021, 1:30 PM