dmd simple loop disassembly - redundant instruction?
Ivan Kazmenko
gassa at mail.ru
Thu Dec 26 02:17:47 PST 2013
On Thursday, 26 December 2013 at 08:08:09 UTC, Lionello Lunesu
wrote:
> You should have said that all instructions are redundant :)
> Looks like the array got optimized out, but then the optimizer
> stopped. The ECX likely refers to the 'i' loop variable. When
> the array write code got optimized out, the compile could have
> figured out that 'i' was in turn unused as well and remove it
> too. And then, the foreach, etc...
I added the "return a[7];" part from bearophile's suggestion, but
that did not change anything in the loop code. So, my guess is
that the array does not get optimized out at all.
> You can file backend bugs on the same site.
Thanks, issue created!
https://d.puremagic.com/issues/show_bug.cgi?id=11821
Ivan Kazmenko.
More information about the Digitalmars-d-learn
mailing list