MMichael Kruse[OpenMP] Clean-up Fortran tests
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[Clang][OpenMP] Enable tile/unroll on iterator- and foreach-loops (#91459) OpenMP loop transformation did not work on a for-loop using an iterator or range-based for-loops. The first reason is that it combined the iterator's type for generated loops with the type of NumIterations as generated for any OMPLoopBasedDirective which is an integer. Fixed by basing all generated loop variables on NumIterations. Second, C++11 range-based for-loops include syntactic sugar that needs to be executed before the loop. This additional code is now added to the construct's Pre-Init lists. Third, C++20 added an initializer statement to range-based for-loops which is also added to the pre-init statement. PreInits used to be a DeclStmt which made it difficult to add arbitrary statements from CXXRangeForStmt's syntactic sugar, especially the for-loops init statement which does not need to be a declaration. Change it to be a general Stmt that can be a CompoundStmt to hold arbitrary Stmts, including DeclStmts. This also avoids the PointerUnion workaround used by checkTransformableLoopNest. End-to-end tests are added to verify the expected number and order of loop execution and evaluations of expressions (such as iterator dereference). The order and number of evaluations of expressions in canonical loops is explicitly undefined by OpenMP but checked here for clarification and for changes to be noticed. | 2 年前 | |
[Clang][OpenMP] Enable tile/unroll on iterator- and foreach-loops (#91459) OpenMP loop transformation did not work on a for-loop using an iterator or range-based for-loops. The first reason is that it combined the iterator's type for generated loops with the type of NumIterations as generated for any OMPLoopBasedDirective which is an integer. Fixed by basing all generated loop variables on NumIterations. Second, C++11 range-based for-loops include syntactic sugar that needs to be executed before the loop. This additional code is now added to the construct's Pre-Init lists. Third, C++20 added an initializer statement to range-based for-loops which is also added to the pre-init statement. PreInits used to be a DeclStmt which made it difficult to add arbitrary statements from CXXRangeForStmt's syntactic sugar, especially the for-loops init statement which does not need to be a declaration. Change it to be a general Stmt that can be a CompoundStmt to hold arbitrary Stmts, including DeclStmts. This also avoids the PointerUnion workaround used by checkTransformableLoopNest. End-to-end tests are added to verify the expected number and order of loop execution and evaluations of expressions (such as iterator dereference). The order and number of evaluations of expressions in canonical loops is explicitly undefined by OpenMP but checked here for clarification and for changes to be noticed. | 2 年前 | |
[Clang][OpenMP] Enable tile/unroll on iterator- and foreach-loops (#91459) OpenMP loop transformation did not work on a for-loop using an iterator or range-based for-loops. The first reason is that it combined the iterator's type for generated loops with the type of NumIterations as generated for any OMPLoopBasedDirective which is an integer. Fixed by basing all generated loop variables on NumIterations. Second, C++11 range-based for-loops include syntactic sugar that needs to be executed before the loop. This additional code is now added to the construct's Pre-Init lists. Third, C++20 added an initializer statement to range-based for-loops which is also added to the pre-init statement. PreInits used to be a DeclStmt which made it difficult to add arbitrary statements from CXXRangeForStmt's syntactic sugar, especially the for-loops init statement which does not need to be a declaration. Change it to be a general Stmt that can be a CompoundStmt to hold arbitrary Stmts, including DeclStmts. This also avoids the PointerUnion workaround used by checkTransformableLoopNest. End-to-end tests are added to verify the expected number and order of loop execution and evaluations of expressions (such as iterator dereference). The order and number of evaluations of expressions in canonical loops is explicitly undefined by OpenMP but checked here for clarification and for changes to be noticed. | 2 年前 | |
[Clang][OpenMP] Enable tile/unroll on iterator- and foreach-loops (#91459) OpenMP loop transformation did not work on a for-loop using an iterator or range-based for-loops. The first reason is that it combined the iterator's type for generated loops with the type of NumIterations as generated for any OMPLoopBasedDirective which is an integer. Fixed by basing all generated loop variables on NumIterations. Second, C++11 range-based for-loops include syntactic sugar that needs to be executed before the loop. This additional code is now added to the construct's Pre-Init lists. Third, C++20 added an initializer statement to range-based for-loops which is also added to the pre-init statement. PreInits used to be a DeclStmt which made it difficult to add arbitrary statements from CXXRangeForStmt's syntactic sugar, especially the for-loops init statement which does not need to be a declaration. Change it to be a general Stmt that can be a CompoundStmt to hold arbitrary Stmts, including DeclStmts. This also avoids the PointerUnion workaround used by checkTransformableLoopNest. End-to-end tests are added to verify the expected number and order of loop execution and evaluations of expressions (such as iterator dereference). The order and number of evaluations of expressions in canonical loops is explicitly undefined by OpenMP but checked here for clarification and for changes to be noticed. | 2 年前 | |
[Clang][OpenMP] Enable tile/unroll on iterator- and foreach-loops (#91459) OpenMP loop transformation did not work on a for-loop using an iterator or range-based for-loops. The first reason is that it combined the iterator's type for generated loops with the type of NumIterations as generated for any OMPLoopBasedDirective which is an integer. Fixed by basing all generated loop variables on NumIterations. Second, C++11 range-based for-loops include syntactic sugar that needs to be executed before the loop. This additional code is now added to the construct's Pre-Init lists. Third, C++20 added an initializer statement to range-based for-loops which is also added to the pre-init statement. PreInits used to be a DeclStmt which made it difficult to add arbitrary statements from CXXRangeForStmt's syntactic sugar, especially the for-loops init statement which does not need to be a declaration. Change it to be a general Stmt that can be a CompoundStmt to hold arbitrary Stmts, including DeclStmts. This also avoids the PointerUnion workaround used by checkTransformableLoopNest. End-to-end tests are added to verify the expected number and order of loop execution and evaluations of expressions (such as iterator dereference). The order and number of evaluations of expressions in canonical loops is explicitly undefined by OpenMP but checked here for clarification and for changes to be noticed. | 2 年前 | |
[Clang][OpenMP] Enable tile/unroll on iterator- and foreach-loops (#91459) OpenMP loop transformation did not work on a for-loop using an iterator or range-based for-loops. The first reason is that it combined the iterator's type for generated loops with the type of NumIterations as generated for any OMPLoopBasedDirective which is an integer. Fixed by basing all generated loop variables on NumIterations. Second, C++11 range-based for-loops include syntactic sugar that needs to be executed before the loop. This additional code is now added to the construct's Pre-Init lists. Third, C++20 added an initializer statement to range-based for-loops which is also added to the pre-init statement. PreInits used to be a DeclStmt which made it difficult to add arbitrary statements from CXXRangeForStmt's syntactic sugar, especially the for-loops init statement which does not need to be a declaration. Change it to be a general Stmt that can be a CompoundStmt to hold arbitrary Stmts, including DeclStmts. This also avoids the PointerUnion workaround used by checkTransformableLoopNest. End-to-end tests are added to verify the expected number and order of loop execution and evaluations of expressions (such as iterator dereference). The order and number of evaluations of expressions in canonical loops is explicitly undefined by OpenMP but checked here for clarification and for changes to be noticed. | 2 年前 | |
[OpenMP] Clean-up Fortran tests * Use "do" for DO loops, there is no "for" in Fortran and it is always integer * Add -cpp to not rely on file name case * Add "implicit none" safety | 10 个月前 | |
[Clang][OpenMP] Enable tile/unroll on iterator- and foreach-loops (#91459) OpenMP loop transformation did not work on a for-loop using an iterator or range-based for-loops. The first reason is that it combined the iterator's type for generated loops with the type of NumIterations as generated for any OMPLoopBasedDirective which is an integer. Fixed by basing all generated loop variables on NumIterations. Second, C++11 range-based for-loops include syntactic sugar that needs to be executed before the loop. This additional code is now added to the construct's Pre-Init lists. Third, C++20 added an initializer statement to range-based for-loops which is also added to the pre-init statement. PreInits used to be a DeclStmt which made it difficult to add arbitrary statements from CXXRangeForStmt's syntactic sugar, especially the for-loops init statement which does not need to be a declaration. Change it to be a general Stmt that can be a CompoundStmt to hold arbitrary Stmts, including DeclStmts. This also avoids the PointerUnion workaround used by checkTransformableLoopNest. End-to-end tests are added to verify the expected number and order of loop execution and evaluations of expressions (such as iterator dereference). The order and number of evaluations of expressions in canonical loops is explicitly undefined by OpenMP but checked here for clarification and for changes to be noticed. | 2 年前 | |
[Clang][OpenMP] Enable tile/unroll on iterator- and foreach-loops (#91459) OpenMP loop transformation did not work on a for-loop using an iterator or range-based for-loops. The first reason is that it combined the iterator's type for generated loops with the type of NumIterations as generated for any OMPLoopBasedDirective which is an integer. Fixed by basing all generated loop variables on NumIterations. Second, C++11 range-based for-loops include syntactic sugar that needs to be executed before the loop. This additional code is now added to the construct's Pre-Init lists. Third, C++20 added an initializer statement to range-based for-loops which is also added to the pre-init statement. PreInits used to be a DeclStmt which made it difficult to add arbitrary statements from CXXRangeForStmt's syntactic sugar, especially the for-loops init statement which does not need to be a declaration. Change it to be a general Stmt that can be a CompoundStmt to hold arbitrary Stmts, including DeclStmts. This also avoids the PointerUnion workaround used by checkTransformableLoopNest. End-to-end tests are added to verify the expected number and order of loop execution and evaluations of expressions (such as iterator dereference). The order and number of evaluations of expressions in canonical loops is explicitly undefined by OpenMP but checked here for clarification and for changes to be noticed. | 2 年前 |