<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">Just a quick heads up. Recently a few changes landed that updated code in LLVM that implicitly assumed some functions will return. Now, the code explicitly checks for the `willreturn` attribute. Please see the patches below</div><div class=""><a href="https://reviews.llvm.org/rG292077072ec1" class="">https://reviews.llvm.org/rG292077072ec1</a></div><div class=""></div><div class=""><a href="https://reviews.llvm.org/rG5d12b976b004" class="">https://reviews.llvm.org/rG5d12b976b004</a></div><div class=""><br class=""></div><div class="">Among other things, this means LLVM now won’t remove function calls to readonly functions, unless they are willreturn. This fixes some longstanding issues for languages without C++-like forward-progress guarantees (see <a href="https://bugs.llvm.org/show_bug.cgi?id=965" class="">https://bugs.llvm.org/show_bug.cgi?id=965</a> )</div><div class=""><br class=""></div><div class=""> For the simple example below, LLVM now won’t remove the call to loop(), if it is compiled as a C program.</div><div class=""><br class=""></div><div class=""><div class="">void loop() {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>while(1);</div><div class="">}</div><div class="">int main() {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>loop();</div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>return 1;</div><div class="">}</div></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">If your frontend provides C++-like forward progress guarantees, please make sure functions/loops are marked as `mustprogress` accordingly. Mustprogress helps with inferring `willlreturn`.</div><div class=""><br class=""></div><div class="">If your frontend can guarantee a function will always return, consider adding the `willreturn` attribute to the generated functions.</div><div class=""><br class=""></div><div class="">Please audit the intrinsics definitions for your target. They also need to be marked as willreturn, if possible.As an example, see the patch that updated AArch64 <a href="https://reviews.llvm.org/rG50ae6a3ac9bd" class="">https://reviews.llvm.org/rG50ae6a3ac9bd</a> . At the moment, the code still (wrongly) assumes that all intrinsics will return. Once people had time to update their backends, the plan is to remove this assumption.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Florian</div></body></html>