<div dir="ltr">To bring some statistics:<div><br></div><div><br><div>Number of functions marked as norecurse:</div><div><font face="monospace, monospace">name before after delta%</font></div><div><font face="monospace, monospace">LLVM normal 1252902 1400128 10.52%</font></div><div><font face="monospace, monospace">LLVM devirtualization 1231893 1400129 12.02%</font></div><div><font face="monospace, monospace">ChakraCore normal 181366 257878 29.67%</font></div><div><font face="monospace, monospace">ChakraCore with devirtualization 164891 257893 36.06%</font></div><div><br></div></div><div>where:</div><div>normal is Release build, </div><div>devirtualization is Relase + -fstrict-vtable-pointers</div><div>before is what it is right now</div><div>after is how it is after marking every intrinsic with norecurse</div><div><br></div><div>As you can see we could mark from 10-40% more functions as norecurse if all of the intrinsics would be marked norecurse.</div><div>Let's look at other numbers to see if it actually helps in optimizations:</div><div><br></div><div>Number of global variables removed<br></div><div><font face="monospace, monospace">name before after delta%</font></div><div><font face="monospace, monospace">LLVM normal 932 1344 30.65%</font></div><div><font face="monospace, monospace">LLVM devirtualization 1206 1621 25.6%</font></div><div><font face="monospace, monospace">ChakraCore normal 1060 1060 0%</font></div><div><font face="monospace, monospace">ChakraCore devirtualization 1072 1072 0%</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">For ChakraCore it didn't all statistics besides # of functions marked as norecurse didn't change.</font></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-06-05 0:29 GMT+02:00 Piotr Padlewski <span dir="ltr"><<a href="mailto:piotr.padlewski@gmail.com" target="_blank">piotr.padlewski@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi folks,<div>I've been measuring some devirtualization statistics and I found that when barriers are introduced, the number of functions marked as norecurse is lower.</div><div>The llvm.group.barrier is obviously norecursive and I've been thinking: is every intrinsic norecurse?</div><div><br></div><div>I think it make sense to mark all of the intrinsics that can be considered as norecursive this way, so it won't gonna stop the optimizer marking functions as norecurse.</div><div><br></div><div>Best</div><span class="HOEnZb"><font color="#888888"><div>Piotr</div></font></span></div>
</blockquote></div><br></div>