News for hackers. Stuff that matters.
Re:Zeroing Memory is Hard: VC++ 2015 arrays by cleeus on Monday July 18, 2016 @01:33AM (#12113376)
At this point we must ask which Update of VS 2015 as MS just replaced the Optimizer with an SSA based one. https://blogs.msdn.microsoft.com/vcblog/2016/05/04/new-code-...
Re:Zeroing Memory is Hard: VC++ 2015 arrays by gratilup on Monday July 18, 2016 @03:00AM (#12113571)
I'm the main developer of the new optimizer. It's a bit too much to say it replaces the old one, it's more of an addition. I was aware of this issue with initializing local arrays, it was on the TODO list - hopefully for the next VS.
Re:Zeroing Memory is Hard: VC++ 2015 arrays by brucedawson on Monday July 18, 2016 @01:59PM (#12116879)
I look forward to a fix, especially if the (I think) larger issue of large aggregates not being initialized efficiently is addressed. It feels like it is another instance of the same issue.

I hope the Python script is helpful for finding some of the odd variants that currently exist.

Re:Zeroing Memory is Hard: VC++ 2015 arrays by ryuuchin on Monday July 18, 2016 @05:30AM (#12114019)
Why isn't the ssa optimizer mentioned in the Update 3 release notes? Is it enabled by default in Update 3?
Re:Zeroing Memory is Hard: VC++ 2015 arrays by voltagex_ on Monday July 18, 2016 @03:47AM (#12113704)
Are you allowed to respond directly to the author in this case?
Re:Zeroing Memory is Hard: VC++ 2015 arrays by apardoe-MSFT on Wednesday July 20, 2016 @02:46PM (#12131447)
There's not much preventing any engineer at Microsoft from talking to developers. No lawyers need to be involved :-)
Re:Zeroing Memory is Hard: VC++ 2015 arrays by brucedawson on Monday July 18, 2016 @02:11AM (#12113461)
A good point, but already answered in the article:

> I recently noticed that it’s still an issue in VC++ 2015 Update 3

Re:Zeroing Memory is Hard: VC++ 2015 arrays by mappu on Monday July 18, 2016 @03:09AM (#12113599)
There's also the Clang/C2 toolchain, an option in the installer.
Re:Zeroing Memory is Hard: VC++ 2015 arrays by cokernel_hacker on Monday July 18, 2016 @01:14PM (#12116466)
Clang/C2 doesn't use LLVM, it will use Microsoft's C2 backend.
Re:Zeroing Memory is Hard: VC++ 2015 arrays by pbsd on Monday July 18, 2016 @01:48PM (#12116774)
That may be the case, but whatever the Clang frontend sends to C2 does produce better code than the Microsoft frontend. It probably already folds the stores at the frontend level, instead of leaving it to the backend to figure out.