aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ProfileData/CoverageMappingTest.cpp
diff options
context:
space:
mode:
authorCongzhe Cao <congzhe.cao@huawei.com>2022-06-28 00:06:16 -0400
committerCongzheUalberta <congzhecao@gmail.com>2022-06-28 00:08:37 -0400
commitb941857b40edd7f3f3a9ec2ec85a26db24739774 (patch)
treedda1d8671100817003112aba9ba444545c8b62c6 /llvm/unittests/ProfileData/CoverageMappingTest.cpp
parentf1dcc6af30d98cef6d0aa9579148fa223dbb5d7c (diff)
downloadllvm-b941857b40edd7f3f3a9ec2ec85a26db24739774.zip
llvm-b941857b40edd7f3f3a9ec2ec85a26db24739774.tar.gz
llvm-b941857b40edd7f3f3a9ec2ec85a26db24739774.tar.bz2
[LoopInterchange] New cost model for loop interchange
This is another attempt to land this patch. The patch proposed to use a new cost model for loop interchange, which is obtained from loop cache analysis. Given a loopnest, what loop cache analysis returns is a vector of loops [loop0, loop1, loop2, ...] where loop0 should be replaced as the outermost loop, loop1 should be placed one more level inside, and loop2 one more level inside, etc. What loop cache analysis does is not only more comprehensive than the current cost model, it is also a "one-shot" query which means that we only need to query it once during the entire loop interchange pass, which is better than the current cost model where we query it every time we check whether it is profitable to interchange two loops. Thus complexity is reduced, especially after D120386 where we do more interchanges to get the globally optimal loop access pattern. Updates made to test cases are mostly minor changes and some corrections. One change that applies to all tests is that we added an option `-cache-line-size=64` to the RUN lines. This is ensure that loop cache analysis receives a valid number of cache line size for correct analysis. Test coverage for loop interchange is not reduced. Currently we did not completely remove the legacy cost model, but keep it as fall-back in case the new cost model did not run successfully. This is because currently we have some limitations in delinearization, which sometimes makes loop cache analysis bail out. The longer term goal is to enhance delinearization and eventually remove the legacy cost model compeletely. Reviewed By: bmahjour, #loopoptwg Differential Revision: https://reviews.llvm.org/D124926
Diffstat (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp')
0 files changed, 0 insertions, 0 deletions