[LoopInterchange] Loops with empty dependency matrix are safe.
authorFlorian Hahn <florian.hahn@arm.com>
Mon, 26 Feb 2018 10:45:25 +0000 (10:45 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Mon, 26 Feb 2018 10:45:25 +0000 (10:45 +0000)
commita1822cbabca337bb2c1fc04710c2ea811e427afd
treef861e23c9f8c0f19e0feb32de7e3a39d1d8b6b4b
parent083891925bb634b1b0227d6668e388ea0267b942
[LoopInterchange] Loops with empty dependency matrix are safe.

The dependency matrix is only empty if no conflicting load/store
instructions have been found. In that case, it is safe to interchange.

For the LLVM test-suite, after this change around 1900 loops are
interchanged, whereas it is 15 before this change. On cortex-a57,
this gives an improvement of -0.57% on the geomean execution
time of SPEC2006, SPEC2000 and the test-suite. There are a
few small perf regressions, but I think we can improve on those
by making the cost model better.

Reviewers: karthikthecool, mcrosier

Reviewed by: karthikthecool

Differential Revision: https://reviews.llvm.org/D43236

llvm-svn: 326077
llvm/lib/Transforms/Scalar/LoopInterchange.cpp