Andrew Clinton
2012-Jun-20 22:47 UTC
[LLVMdev] Strong PHI elimination asserts in RegisterCoalescer.C:1388
I've started using the strong PHI elimination pass, and it seems to work beautifully (producing much better placement of copy instructions) - though I'm seeing that it triggers an assert in debug+assert builds. The assertion is on line 1388 of RegisterCoalescer.C. Attached is the -debug output from the machine optimization part of the optimizer, for the simplest test case I could create that triggers this behavior. Any idea what might be going wrong? Are there known issues with strong PHI elimination? Andrew -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: log_debug_coalescing URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120620/b1fc4878/attachment.ksh>
Cameron Zwarich
2012-Jun-20 22:54 UTC
[LLVMdev] Strong PHI elimination asserts in RegisterCoalescer.C:1388
I'm the person who wrote it, and it's not really maintained, as we decided we wanted to go in a different direction long-term by having fewer passes making independent coalescing decisions rather than more. At the time I stopped working on it, it worked fine on x86 but caused problems with armv7 NEON code. If you file a PR with a test case, I am happy to take a quick look and try to fix it. There have been some changes to the backend that might not have been updated correctly in StrongPHIElimination. Cameron On Jun 20, 2012, at 3:47 PM, Andrew Clinton wrote:> I've started using the strong PHI elimination pass, and it seems to work beautifully (producing much better placement of copy instructions) - though I'm seeing that it triggers an assert in debug+assert builds. The assertion is on line 1388 of RegisterCoalescer.C. Attached is the -debug output from the machine optimization part of the optimizer, for the simplest test case I could create that triggers this behavior. > > Any idea what might be going wrong? Are there known issues with strong PHI elimination? > > Andrew > <log_debug_coalescing.txt>_______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Andrew Clinton
2012-Jun-20 23:13 UTC
[LLVMdev] Strong PHI elimination asserts in RegisterCoalescer.C:1388
I will try to make a standalone test case but the one that is failing uses a custom back end, so it's not really portable. So is the plan to have the strong PHI elimination behavior rolled into other passes? Andrew On 06/20/2012 06:54 PM, Cameron Zwarich wrote:> I'm the person who wrote it, and it's not really maintained, as we decided we wanted to go in a different direction long-term by having fewer passes making independent coalescing decisions rather than more. At the time I stopped working on it, it worked fine on x86 but caused problems with armv7 NEON code. > > If you file a PR with a test case, I am happy to take a quick look and try to fix it. There have been some changes to the backend that might not have been updated correctly in StrongPHIElimination. > > Cameron > > On Jun 20, 2012, at 3:47 PM, Andrew Clinton wrote: > >> I've started using the strong PHI elimination pass, and it seems to work beautifully (producing much better placement of copy instructions) - though I'm seeing that it triggers an assert in debug+assert builds. The assertion is on line 1388 of RegisterCoalescer.C. Attached is the -debug output from the machine optimization part of the optimizer, for the simplest test case I could create that triggers this behavior. >> >> Any idea what might be going wrong? Are there known issues with strong PHI elimination? >> >> Andrew >> <log_debug_coalescing.txt>_______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev