Never mind, I've figured out the problem.<br><br><br>On 09/12/2010 07:41 PM, Neal N. Wang wrote:
<blockquote cite="mid:AANLkTimFF+ZkA4PKcZ7WkVfDK0XVL9tYVL1cjX-Ma4_i@mail.gmail.com" type="cite">
<h1 class="vi-is1-titleH1">Hi folk, <br></h1>
I have a Module pass. I tested the pass against the following code. <br>
<br>
./gcc.dg/20030721-1.c<br>
extern void abort(void);<br>
<br>
void foo(int) __attribute__((__noinline__));<br>
<br>
void foo(int i)<br>
{<br>
abort();<br>
}<br>
<br>
int main()<br>
{<br>
int i;<br>
int first= 0;<br>
int last= 0;<br>
<br>
while (last<3) {<br>
last = first;<br>
<br>
while (first<=last) {<br>
first++;<br>
<br>
for (i=0;i<3;i++)<br>
last++;<br>
<br>
if (last>10)<br>
return 0;<br>
}<br>
<br>
foo(first);<br>
}<br>
<br>
return 0;<br>
}<br>
~ <br>
<br>
<br>
If I test my pass with "gcc -fmypass ./gcc.dg/20030721-1.c -fno-show-column -S -o 20030721-1.s", it works. <br>
But when I add -O2 to the above command line, I get the following error message:<br>
<br>
LCSSA.cpp:167: virtual
bool<unnamed>::LCSSA::runOnLoop(llvm::Loop*,
llvm::LPPassManager&): Assertion `L->isLCSSAForm()' failed.<br>
./gcc.dg/20030721-1.c:41: internal compiler error: Aborted<br>
<br>
Any thought what "isLCSSAForm" fails mean?<br>
<br>
Thanks, <br>
Neal. <br>
<pre><br><fieldset class="mimeAttachmentHeader"></fieldset><br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></pre>
</blockquote>