[LLVMdev] GSoC:Loop Reversal Transformation

Matt Godbolt matt at godbolt.org
Tue Mar 17 12:50:06 PDT 2015


On Tue, Mar 17, 2015 at 2:00 PM, vishal sarda <vishalksarda at gmail.com>

> [snip]
> Loop counting up 0.15 ms
> Loop counting down 0.08 ms
I'm no llvm expert, but as an interest bystander: I suspect you compiled
the source without any optimizations applied - I tried to replicate this
behaviour and found the optimzer happily replaces both the inner loops you
had with a constant, and thus I got the same time on both loops. (e.g. see
http://goo.gl/aXFkVb )

Benchmarks of this nature where the run time is so small are notoriously
prone to measurement errors, so I'd be a little careful drawing conclusions
from the sample you listed. Also; what architecture did you measure on, and
what spec machine?

Not at all to dissuade you from investigating this optimization! I'm just a
little sceptical of the benchmark you posted!

Best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150317/d511fb80/attachment.html>

More information about the llvm-dev mailing list