<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;" dir="ltr">
<p>Hi Quentin,</p>
<p><br>
</p>
<p>Thanks for the reply! However, we are not using any profiling-based compilation in our current work. We are assuming that, if PGO is disabled, the register allocator (and any other pass that needs basic block frequency info) will be basing its decisions
 on some kind of *static" basic block frequency info that are based on some compile-time heuristics and at least capture loop nesting levels. With such static info, we don't expect see blocks with zero frequency; we expect a block outside all loops to have
 a frequency of 1 or some small non-zero number. Does LLVM compute such static info? If yes, how do we enable that?</p>
<p><br>
</p>
<p>Thanks</p>
<p><br>
</p>
<p>Ghassan Shobaki</p>
<p>Assistant Professor of Computer Science <br>
</p>
<p>California State University, Sacramento   <br>
</p>
<div style="color: rgb(0, 0, 0);">
<div>
<div><br>
<hr style="display:inline-block; width:98%" tabindex="-1">
<div id="x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> qcolombet@apple.com <qcolombet@apple.com> on behalf of Quentin Colombet <qcolombet@apple.com><br>
<b>Sent:</b> Wednesday, September 20, 2017 9:44:35 AM<br>
<b>To:</b> Kerbow, Austin Michael<br>
<b>Cc:</b> via llvm-dev<br>
<b>Subject:</b> Re: [llvm-dev] Spill Weight In InlineSpiller</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt">
<div class="PlainText">Hi Austin,<br>
<br>
> On Sep 19, 2017, at 11:29 PM, Kerbow, Austin Michael via llvm-dev <llvm-dev@lists.llvm.org> wrote:<br>
> <br>
> I'm trying to compute and print a weighted spill cost based upon the execution frequency of the basic block where the spill is inserted. My goal is to analyse what effect scheduling changes have on the sum of this weighted spill cost in some benchmarks. I've
 experimented doing this directly before a spill is inserted in InlineSpiller.cpp using MBFI.getBlockFreq() and LiveIntervals::getSpillWeight. My question is why are these functions sometimes indicating that the frequency of a block, or the weight of a spill
 is 0? A frequency of 0 doesn't make sense to me.<br>
<br>
I don’t know how PGO is implemented in that respect so take it with a grain of salt, but if you’re using PGO, I am guessing that if something is not executed in your training run, you may end up with a 0 frequency.<br>
<br>
That being said, I thought we had mechanism to prevent that for happening. Therefore, that sounds like a bug (or you’re looking at an unreachable block?)<br>
<br>
Cheers,<br>
-Quentin<br>
<br>
> <br>
> Thanks,<br>
> <br>
> Austin Kerbow<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> llvm-dev@lists.llvm.org<br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" id="LPlnk3869" previewremoved="true">
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>