forked from OSchip/llvm-project
7860c5fe4e
IslAst could mark two nested outer loops as "OutermostParallel". It caused that the code generator tried to OpenMP-parallelize both loops, which it is not prepared loop. It was because the recursive AST build algorithm managed a flag "InParallelFor" to ensure that no nested loop is also marked as "OutermostParallel". Unfortunatetly the same flag was used by nodes marked as SIMD, and reset to false after the SIMD node. Since loops can be marked as SIMD inside "OutermostParallel" loops, the recursive algorithm again tried to mark loops as "OutermostParellel" although still nested inside another "OutermostParallel" loop. The fix exposed another bug: The function "astScheduleDimIsParallel" was only called when a loop was potentially "OutermostParallel" or "InnermostParallel", but as a side-effect also determines the minimum dependence distance. Hence, changing when we need to know whether a loop is "OutermostParallel" also changed which loop was annotated with "#pragma minimal dependence distance". Moreover, some complex condition linked with "InParallelFor" determined whether a loop should be an "InnermostParallel" loop. It missed some situations where it would not use mark as such although being inside an SIMD mark node, and therefore not be annotated using "#pragma simd". The changes in particular: 1. Split the "InParallelFor" flag into an "InParallelFor" and an "InSIMD" flag. 2. Unconditionally call "astScheduleDimIsParallel" for its side-effects and store the result in "InParallel" for later use. 3. Simplify the condition when a loop is "InnermostParallel". Fixes llvm.org/PR33153 and llvm.org/PR38073. llvm-svn: 343212 |
||
---|---|---|
.. | ||
CodeGen | ||
Config | ||
Support | ||
Canonicalization.h | ||
CodePreparation.h | ||
DeLICM.h | ||
DependenceInfo.h | ||
FlattenAlgo.h | ||
FlattenSchedule.h | ||
ForwardOpTree.h | ||
JSONExporter.h | ||
LinkAllPasses.h | ||
Options.h | ||
PolyhedralInfo.h | ||
PruneUnprofitable.h | ||
RegisterPasses.h | ||
ScheduleOptimizer.h | ||
ScopBuilder.h | ||
ScopDetection.h | ||
ScopDetectionDiagnostic.h | ||
ScopInfo.h | ||
ScopPass.h | ||
Simplify.h | ||
ZoneAlgo.h |