[cfe-dev] No loop optimisation?

mats petersson via cfe-dev cfe-dev at lists.llvm.org
Fri Nov 6 08:10:27 PST 2015


Just to be clear: I was using -O2, and the "first loop" which has strlen in
it was optimised to a constant value and no loop, the second loop, with
sizeof, was not "removed".

--
Mats

On 6 November 2015 at 14:30, Renato Golin via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> On 6 November 2015 at 14:25, Joerg Sonnenberger via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
> > Also, if you look at IR make sure to run the appropiate passes first.
> > Clang output by default has very few optimisations in the -emit-llvm
> > output.
>
> That's intentional. Try -O2 and your IR will look much nicer. :)
>
> --renato
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151106/e514b079/attachment.html>


More information about the cfe-dev mailing list