Hi folk, I have a Module pass. I tested the pass against the following code. ./gcc.dg/20030721-1.c extern void abort(void); void foo(int) __attribute__((__noinline__)); void foo(int i) { abort(); } int main() { int i; int first= 0; int last= 0; while (last<3) { last = first; while (first<=last) { first++; for (i=0;i<3;i++) last++; if (last>10) return 0; } foo(first); } return 0; } ~ If I test my pass with "gcc -fmypass ./gcc.dg/20030721-1.c -fno-show-column -S -o 20030721-1.s", it works. But when I add -O2 to the above command line, I get the following error message: LCSSA.cpp:167: virtual bool<unnamed>::LCSSA::runOnLoop(llvm::Loop*, llvm::LPPassManager&): Assertion `L->isLCSSAForm()' failed. ./gcc.dg/20030721-1.c:41: internal compiler error: Aborted Any thought what "isLCSSAForm" fails mean? Thanks, Neal. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100912/602a3ab3/attachment.html>
On Sun, Sep 12, 2010 at 7:41 PM, Neal N. Wang <neal.wang at gmail.com> wrote:> Hi folk, > > I have a Module pass. I tested the pass against the following code. > > ./gcc.dg/20030721-1.c > extern void abort(void); > > void foo(int) __attribute__((__noinline__)); > > void foo(int i) > { > abort(); > } > > int main() > { > int i; > int first= 0; > int last= 0; > > while (last<3) { > last = first; > > while (first<=last) { > first++; > > for (i=0;i<3;i++) > last++; > > if (last>10) > return 0; > } > > foo(first); > } > > return 0; > } > ~ > > > If I test my pass with "gcc -fmypass ./gcc.dg/20030721-1.c -fno-show-column > -S -o 20030721-1.s", it works. > But when I add -O2 to the above command line, I get the following error > message: > > LCSSA.cpp:167: virtual bool<unnamed>::LCSSA::runOnLoop(llvm::Loop*, > llvm::LPPassManager&): Assertion `L->isLCSSAForm()' failed. > ./gcc.dg/20030721-1.c:41: internal compiler error: Aborted > > Any thought what "isLCSSAForm" fails mean?My first guess is that your pass is claiming to preserve dominance information when it doesn't... try passing -mllvm -verify-dom-info to llvm-gcc. -Eli
Apparently Analagous Threads
- [LLVMdev] isLCSSAForm failed
- [LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
- [LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
- [PATCH 09/28] MIPS/jazzdma: remove the unused vdma_remap function
- [LLVMdev] MachineLoopInfo question