2012-03-26 13 views
1

kompiliert Bei dem Versuch, eine LLVM IR zu kompilieren, wie dieseLLVM kann nicht von IR

llc main.ll -o main.s && g++ main.s -O3 -o main -pthread 

ich folgende Fehlermeldung erhalten. Das gleiche Ding kompiliert auf meinem Ubuntu 10 System, aber in CentOS erhalte ich den folgenden Fehler. Irgendeine Idee, was hier vor sich geht und warum LLVM verrückt wird? Und zuletzt, wie löst man das?

llc: /home/schism/llvm/include/llvm/ADT/IntervalMap.h:606: unsigned int llvm::IntervalMapImpl::LeafNode< <template-parameter-1-1>, <template-parameter-1-2>, <anonymous>, <template-parameter-1-4> >::insertFrom(unsigned int&, unsigned int, KeyT, KeyT, ValT) [with KeyT = llvm::SlotIndex, ValT = unsigned int, unsigned int N = 9u, Traits = llvm::IntervalMapInfo<llvm::SlotIndex>]: Assertion `!Traits::stopLess(b, a) && "Invalid interval"' failed. 
0 llc    0x0000000000d5009f 
1 llc    0x0000000000d50db7 
2 libpthread.so.0 0x0000003cfde0ebe0 
3 libc.so.6  0x0000003cfce30285 gsignal + 53 
4 libc.so.6  0x0000003cfce31d30 abort + 272 
5 libc.so.6  0x0000003cfce29706 __assert_fail + 246 
6 llc    0x000000000093624c llvm::IntervalMapImpl::LeafNode<llvm::SlotIndex, unsigned int, 9u, llvm::IntervalMapInfo<llvm::SlotIndex> >::insertFrom(unsigned int&, unsigned int, llvm::SlotIndex, llvm::SlotIndex, unsigned int) + 716 
7 llc    0x0000000000936a00 
8 llc    0x0000000000929898 llvm::SplitEditor::useIntv(llvm::SlotIndex, llvm::SlotIndex) + 88 
9 llc    0x000000000092f369 llvm::SplitEditor::splitRegInBlock(llvm::SplitAnalysis::BlockInfo const&, unsigned int, llvm::SlotIndex) + 1513 
10 llc    0x00000000008c20ea 
11 llc    0x00000000008c3c78 
12 llc    0x00000000008c90d1 
13 llc    0x00000000008c95ab 
14 llc    0x0000000000a06c84 llvm::RegAllocBase::allocatePhysRegs() + 324 
15 llc    0x00000000008c4edc 
16 llc    0x0000000000880005 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 53 
17 llc    0x0000000000ce4c66 llvm::FPPassManager::runOnFunction(llvm::Function&) + 646 
18 llc    0x0000000000ce4cfd llvm::FPPassManager::runOnModule(llvm::Module&) + 45 
19 llc    0x0000000000ce641c llvm::MPPassManager::runOnModule(llvm::Module&) + 556 
20 llc    0x0000000000ce657e llvm::PassManagerImpl::run(llvm::Module&) + 174 
21 llc    0x0000000000ce66dd llvm::PassManager::run(llvm::Module&) + 13 
22 llc    0x00000000004d0f1b main + 5451 
23 libc.so.6  0x0000003cfce1d994 __libc_start_main + 244 
24 llc    0x00000000004ce8e9 
Stack dump: 
0.  Program arguments: llc main.ll -o main.s 
1.  Running pass 'Function Pass Manager' on module 'main.ll'. 
2.  Running pass 'Greedy Register Allocator' on function '@_Z7InitSimPKcj' 
Aborted 
+1

Ich denke, dass Sie besser die LLVM-Dev-Liste für Abstürze von LLVM kontaktieren würden, als dies auf SO zu fragen. –

+0

@ user1018562 - Ich bin neugierig zu wissen, ob und wie Sie das lösen. Bitte post ein Follow-up. War Anton's Vorschlag richtig? – phonetagger

Antwort

4

Sieht aus wie LLVM von Ihrem Systemcompiler falsch kompiliert wird. Eine Liste der bekannten fehlerhaften Compiler finden Sie unter http://llvm.org/docs/GettingStarted.html#brokengcc.

Die Lösung ist einfach - verwenden Sie eine andere Version des Compilers (gcc in Ihrem Fall), um LLVM zu kompilieren.

0

Es gibt ein ähnliches Problem, das irgendwo hier herum schwimmt. Die Antwort war, die Versionen von gcc und llvm zu überprüfen. Es stellte sich heraus, dass das eine 32 Bit und das andere 64 Bit war. Ymmv.

Verwandte Themen