<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div>
<div><font face="Calibri,sans-serif">… Also, it doesn’t appear that you are running on windows…</font></div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<div id="MAC_OUTLOOK_SIGNATURE"></div>
</div>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<br>
</div>
<span id="OLK_SRC_BODY_SECTION" style="color: rgb(0, 0, 0); font-family: Calibri, sans-serif; font-size: 14px;">
<div style="font-family:Calibri; font-size:12pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>David Majnemer<br>
<span style="font-weight:bold">Date: </span>Saturday 12 September 2015 18:31<br>
<span style="font-weight:bold">To: </span>Sebastian Blessing<br>
<span style="font-weight:bold">Cc: </span>Reid Kleckner, "<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>"<br>
<span style="font-weight:bold">Subject: </span>Re: [llvm-dev] Optimizer issues on Windows<br>
</div>
<div><br>
</div>
<div>
<div>
<div dir="ltr">$ ~/llvm/Debug+Asserts/bin/llc try.ll
<div>$ echo $?</div>
<div>0</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sat, Sep 12, 2015 at 6:39 AM, Sebastian Blessing via llvm-dev
<span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>
<div>
<div>This got me into thinking. Indeed the problem is related to Windows exceptions, so I am not sure whether the <a href="https://llvm.org/bugs/show_bug.cgi?id=24374" target="_blank">bug reported</a> is actually fixed.</div>
<div><br>
</div>
<div>Compiling Pony code (helloworld) that includes no exceptions does work fine (with optimizations). As soon as exceptions on windows come into play, writing the object file dies with the mentioned error in MCStreamer.cpp.</div>
<div><br>
</div>
<div><a href="http://releases.ponylang.org/winexcept/" target="_blank">Here</a> are two minimal IR examples (helloworld.ll works, try.ll doesn’t - both verify with llc). The relevant method is
<b>@Main_create</b>. Can anyone of you guys confirm the issue with llvm 3.7.0–final, or whether said bug has actually been fixed?</div>
</div>
<div><br>
</div>
</div>
<span><span class="">
<div style="font-family:Calibri;font-size:12pt;text-align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PADDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt">
<span style="font-weight:bold">From: </span>Reid Kleckner<br>
<span style="font-weight:bold">Date: </span>Friday 11 September 2015 17:07<br>
<span style="font-weight:bold">To: </span>Sebastian Blessing<br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>"<br>
<span style="font-weight:bold">Subject: </span>Re: [llvm-dev] Optimizer issues on Windows<br>
</div>
<div><br>
</div>
</span>
<div>
<div class="h5">
<div>
<div>
<div dir="ltr">The bug <a href="https://llvm.org/bugs/show_bug.cgi?id=24374" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=24374</a> has to do with exceptions on Windows, so it is unrelated unless you are using them.</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Sep 11, 2015 at 4:37 AM, Sebastian Blessing via llvm-dev
<span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>
<div>
<div>Dear Community,</div>
</div>
</div>
<span>
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div><br>
</div>
<div>The <a href="https://github.com/CausalityLtd/ponyc/tree/llvm37" target="_blank">
ponyc</a> (llvm37 branch) project is facing an issue on Windows:</div>
<div><br>
</div>
<div>When optimizations are turned on (llvm 3.7.0-final and <a href="https://github.com/CausalityLtd/ponyc/blob/llvm37/src/libponyc/codegen/genopt.cc" target="_blank">more specifically</a>, opt-level 3,  BBVectorize, LoopVectorize, SLPVectorize, RerollLoops,
 LoadCombine + a custom heap to stack pass) writing an object file aborts (on Windows only) with the following fatal error:</div>
<div><br>
</div>
<div>“Starting a function before ending the previous one!” at MCStreamer.cpp:407 during LLVMTargetMachineEmitToFile. Verifying the IR with llc raises no errors.</div>
<div><br>
</div>
<div>What exact problem is being detected here and how can we get more details on the location in the IR that is causing the problem?</div>
<div><br>
</div>
<div>Turning off optimizations successfully writes the object file. This only occurs on Windows, writing object files works fine on Linux and OS X.</div>
<div><br>
</div>
<div>Is this a know issue with LLVM 3.7.0-final and how can this be fixed? Is a patch required?</div>
<div><br>
</div>
<div>This might be related to <a href="https://llvm.org/bugs/show_bug.cgi?id=24374" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=24374</a>.</div>
<div><br>
</div>
<div>Kind regards</div>
<div>Sebastian</div>
<div>
<div>
<div>
<div>
<div style="max-width:600px;direction:ltr">
<div style="max-width:470px;margin:8px 8px 0 0"><br>
</div>
</div>
<img src="http://ws-stats.appspot.com/t/pixel.png?e=setup_page_outlook_compose" height="1" width="1"><img src="http://ws-stats.appspot.com/t/pixel.png?e=setup_page_outlook_active&uid=4e244105ed85beb698bdf15e022cc6fa" height="1" width="1"></div>
</div>
<br>
</div>
</div>
</div>
</span></div>
<br>
_______________________________________________<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="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</span></div>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</span>
</body>
</html>