<div dir="ltr"><div>I'm a bit confused by this subthread -- doesn't BOLT have the exact same CFI bloat issue? From my cursory reading of the propellor doc, the CFI duplication is _necessary_ to represent discontiguous functions, not anything particular to the way Propellor happens to generate those discontiguous functions.</div><div><br></div><div>And emitting discontiguous functions is a fundamental goal of this, right?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 2, 2019 at 4:25 PM Maksim Panchenko via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div class="gmail-m_-2269653497310862311WordSection1">
<p class="MsoNormal">Thanks for clarifying. This means once you move to the next basic block (or any other basic<u></u><u></u></p>
<p class="MsoNormal">block in the function) you have to execute an entirely new set of CFI instructions<u></u><u></u></p>
<p class="MsoNormal">except for the common CIE part. While indeed this is not as bad, on average, the overall<u></u><u></u></p>
<p class="MsoNormal">active memory footprint will increase.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Creating one FDE per basic block means that .eh_frame_hdr, an allocatable section,<u></u><u></u></p>
<p class="MsoNormal">will be bloated too. This will increase the FDE lookup time. I don’t see .eh_frame_hdr<u></u><u></u></p>
<p class="MsoNormal">being mentioned in the proposal.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Maksim<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On 10/2/19, 12:20 PM, "Krzysztof Pszeniczny" <<a href="mailto:kpszeniczny@google.com" target="_blank">kpszeniczny@google.com</a>> wrote:<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Wed, Oct 2, 2019 at 8:41 PM Maksim Panchenko via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">*Pessimization/overhead for stack unwinding used by system-wide profilers and<br>
for exception handling*<br>
<br>
Larger CFI programs put an extra burden on unwinding at runtime as more CFI<br>
(and thus native) instructions have to be executed. This will cause more<br>
overhead for any profiler that records stack traces, and, as you correctly note<br>
in the proposal, for any program that heavily uses exceptions.<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">The number of CFI instructions that have to be executed when unwinding any given stack stays the same. The CFI instructions for a function have to be duplicated in every basic block section, but when performing unwinding only one such a
set is executed -- the copy for the current basic block. However, this copy contains precisely the same CFI instructions as the ones that would have to be executed if there were no basic block sections.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">--<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Krzysztof Pszeniczny<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>