Rail Shafigulin via llvm-dev
2016-Mar-21 23:30 UTC
[llvm-dev] clang/llc is just hanging during instruction selection
I've been told that clang/llc is handing because I'm creating a cycle in my instruction selection. I'm trying to figure out where exactly but unfortunately my knowledge is quite limited. I'd appreciate if someone could point me in the right direction. Here is the test file I'm using: #define N 32 int foo () { int a[N], b[N], c[N]; for (int i = 0; i < N; ++i) c[i] = a[i] + b[i]; int sum = 0; for (int i =0; i < N; i++) sum += c[i]; return sum; } I generate a .ll file using clang --target=esencia z.c -S -emit-llvm -o z.esencia.ll -O3 And then I run llc using llc -mcpu=esencia -march=esencia z.esencia.ll -o z.esencia.s -O3 -debug-only=isel setOperationAction(ISD::BUILD_VECTOR, MVT::v4i32, Expand); setOperationAction(ISD::EXTRACT_VECTOR_ELT, MVT::v4i32, Expand); setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v4i32, Expand); At this point llc just hangs. I was explained that I create a cycle I know that these three lines cause a problem (since none existed before I added them), but unfortunately my knowledge is limited and I have hard time understanding how I created it. Would someone be able to help me out? The contents of the .ll file is located here: http://pastebin.com/daHnJWwB The output of the llc -mcpu=esencia -march=esencia z.esencia.ll -o z.esencia.s -O3 -debug-only=isel command is provided here: http://pastebin.com/ErDaxJ4J I realize that the output is quite big and would love find a way to reduce, but quite frankly I'm not sure how to do it. I tried using bugpoint but it hung as well. I would really appreciate any help on this, i.e. how am i creating cycles and how to eliminate them? -- Rail Shafigulin Software Engineer Esencia Technologies -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160321/8c7e9d0d/attachment.html>