1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-12-23 23:30:22 +00:00

Less useless logging

This commit is contained in:
Karol Stasiak 2021-01-13 14:18:41 +01:00
parent 2a5933e115
commit 91699b64c6

View File

@ -21,6 +21,10 @@ case class RepeatedIndexCalculationOptimization(forX: Boolean) extends AssemblyO
override def optimize(f: NormalFunction, code: List[AssemblyLine], context: OptimizationContext): List[AssemblyLine] = {
val log = context.log
val allRuns = findAllRuns(code, 0, None).result
if (allRuns.size <= 1) {
log.trace("No index calculations found")
return code
}
if (log.traceEnabled) {
log.trace("All index calculations found: " + allRuns)
for ((line, ix) <- code.zipWithIndex) {
@ -32,7 +36,6 @@ case class RepeatedIndexCalculationOptimization(forX: Boolean) extends AssemblyO
}
}
}
if (allRuns.size <= 1) return code
lazy val reverseFlow = ReverseFlowAnalyzer.analyze(code, context.niceFunctionProperties)
val flow = CoarseFlowAnalyzer.analyze(f, code, context)
var replacements: Map[Int, Int] = Map()