mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-20 11:29:24 +00:00
even if the loop is using expressions that we can't compute as a closed-form. This allows us to calculate that this function always returns 55: int test() { double X; int Count = 0; for (X = 100; X > 1; X = sqrt(X), ++Count) /*empty*/; return Count; } And allows us to compute trip counts for loops like: int h = 1; do h = 3 * h + 1; while (h <= 256); (which occurs in bzip2), and for this function, which occurs after inlining and other optimizations: int popcount() { int x = 666; int result = 0; while (x != 0) { result = result + (x & 0x1); x = x >> 1; } return result; } We still cannot compute the exit values of result or h in the two loops above, which means we cannot delete the loop, but we are getting closer. Being able to compute a constant trip count for these two loops will allow us to unroll them completely though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13017 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
DataStructure | ||
IPA | ||
AliasAnalysis.cpp | ||
AliasAnalysisCounter.cpp | ||
AliasAnalysisEvaluator.cpp | ||
AliasSetTracker.cpp | ||
BasicAliasAnalysis.cpp | ||
CFGPrinter.cpp | ||
ConstantRange.cpp | ||
Expressions.cpp | ||
InstCount.cpp | ||
Interval.cpp | ||
IntervalPartition.cpp | ||
LoadValueNumbering.cpp | ||
LoopInfo.cpp | ||
Makefile | ||
PostDominators.cpp | ||
PrintSCC.cpp | ||
ProfileInfo.cpp | ||
ProfileInfoLoader.cpp | ||
ProfileInfoLoaderPass.cpp | ||
ScalarEvolution.cpp | ||
Trace.cpp | ||
ValueNumbering.cpp |