aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/TestModuleFileExtension.cpp
diff options
context:
space:
mode:
authorMats Petersson <mats.petersson@arm.com>2023-05-22 15:48:01 +0100
committerMats Petersson <mats.petersson@arm.com>2023-05-30 18:54:40 +0100
commitb75f9ce3fe861473e36ea6715d82b6954ea2b815 (patch)
treee8b57c76a5bdc5600b159b2df9af040660efc80a /clang/lib/Frontend/TestModuleFileExtension.cpp
parentb07d08bb8590b2689f6dc5fbea1ab32b703fcff6 (diff)
downloadllvm-b75f9ce3fe861473e36ea6715d82b6954ea2b815.zip
llvm-b75f9ce3fe861473e36ea6715d82b6954ea2b815.tar.gz
llvm-b75f9ce3fe861473e36ea6715d82b6954ea2b815.tar.bz2
[FLANG] Support all arrays for LoopVersioning
This patch makes more than 2D arrays work, with a fix for the way that loop index is calculated. Removing the restriction of number of dimensions. This also changes the way that the actual index is calculated, such that the stride is used rather than the extent of the previous dimension. Some tests failed without fixing this - this was likely a latent bug in the 2D version too, but found in a test using 3D arrays, so wouldn't have been found with 2D only. This introduces a division on the index calculation - however it should be a nice and constant value allowing a shift to be used to actually divide - or otherwise removed by using other methods to calculate the result. In analysing code generated with optimisation at -O3, there are no divides produced. Some minor refactoring to avoid repeatedly asking for the "rank" of the array being worked on. This improves some of the SPEC-2017 ROMS code, in the same way as the limited 2D array improvements - less overhead spent calculating array indices in the inner-most loop and better use of vector-instructions. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D151140
Diffstat (limited to 'clang/lib/Frontend/TestModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions