summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Hahn <florian.hahn@arm.com>2018-02-26 10:45:25 +0000
committerFlorian Hahn <florian.hahn@arm.com>2018-02-26 10:45:25 +0000
commita1822cbabca337bb2c1fc04710c2ea811e427afd (patch)
treef861e23c9f8c0f19e0feb32de7e3a39d1d8b6b4b
parent083891925bb634b1b0227d6668e388ea0267b942 (diff)
downloadbcm5719-llvm-a1822cbabca337bb2c1fc04710c2ea811e427afd.tar.gz
bcm5719-llvm-a1822cbabca337bb2c1fc04710c2ea811e427afd.zip
[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
-rw-r--r--llvm/lib/Transforms/Scalar/LoopInterchange.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
index 93ff71fd024..c8678ddb266 100644
--- a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
@@ -173,9 +173,6 @@ static bool populateDependencyMatrix(CharMatrix &DepMatrix, unsigned Level,
}
}
- // We don't have a DepMatrix to check legality return false.
- if (DepMatrix.empty())
- return false;
return true;
}
OpenPOWER on IntegriCloud