Bug#601074: llvm: version 2.8 available, please package

Witold Baryluk baryluk at smp.if.uj.edu.pl
Wed Mar 30 21:09:28 UTC 2011


Any progress on packaging llvm 2.8?

Or maybe now, given release of llvm 2.9 in April, we should
target a 2.9.

I'm asking because ldc is built using llvm 2.6, and
acording to my analysis of buildd logs, it cannot compile for examplpe
libtango on few architectures including alpha.
So it could be fixed in newer version of llvm
(as error looks to be in llvm backend or middleend).

Build errors when incoking ldc on various architectures:


Error: target 'i486-pc-gnu' is not yet supported


Error: failed to auto-select target: Unable to find target for this triple (no targets are registered), please use the -march option


Error: failed to auto-select target: Unable to find target for this triple (no targets are registered), please use the -march option


Error: invalid cpu architecture specified: sparc


Call result #1 has unhandled type i64UNREACHABLE executed at /build/buildd-llvm_2.6-5-alpha-Nsbqnj/llvm-2.6/lib/CodeGen/SelectionDAG/CallingConvLower.cpp:148!
0   ldc             0x0000000120a11524
1   ldc             0x0000000120a12000
2   libpthread.so.0 0x0000020000047880
3   libc.so.6.1     0x0000020000359d68 gsignal + 88
4   libc.so.6.1     0x000002000035e3ec abort + 348
5   ldc             0x00000001209eddc4 llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 836
6   ldc             0x000000012032c6b0 llvm::CCState::AnalyzeCallResult(llvm::SmallVectorImpl<llvm::ISD::InputArg> const&, bool (*)(unsigned int, llvm::EVT, llvm::EVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)) + 528
7   ldc             0x0000000120319d64 llvm::AlphaTargetLowering::LowerCallResult(llvm::SDValue, llvm::SDValue, unsigned int, bool, llvm::SmallVectorImpl<llvm::ISD::InputArg> const&, llvm::DebugLoc, llvm::SelectionDAG&, llvm::SmallVectorImpl<llvm::SDValue>&) + 180
8   ldc             0x000000012031bb14 llvm::AlphaTargetLowering::LowerCall(llvm::SDValue, llvm::SDValue, unsigned int, bool, bool, llvm::SmallVectorImpl<llvm::ISD::OutputArg> const&, llvm::SmallVectorImpl<llvm::ISD::InputArg> const&, llvm::DebugLoc, llvm::SelectionDAG&, llvm::SmallVectorImpl<llvm::SDValue>&) + 4852
9   ldc             0x000000012036f498 llvm::TargetLowering::LowerCallTo(llvm::SDValue, llvm::Type const*, bool, bool, bool, bool, unsigned int, unsigned int, bool, bool, llvm::SDValue, std::vector<llvm::TargetLowering::ArgListEntry, std::allocator<llvm::TargetLowering::ArgListEntry> >&, llvm::SelectionDAG&, llvm::DebugLoc) + 3752
10  ldc             0x00000001203794d8 llvm::SelectionDAGLowering::LowerCallTo(llvm::CallSite, llvm::SDValue, bool, llvm::MachineBasicBlock*) + 1368
11  ldc             0x0000000120383a28 llvm::SelectionDAGLowering::visitCall(llvm::CallInst&) + 1096
12  ldc             0x0000000120393400 llvm::SelectionDAGLowering::visit(unsigned int, llvm::User&) + 336
13  ldc             0x0000000120393888 llvm::SelectionDAGLowering::visit(llvm::Instruction&) + 40
14  ldc             0x00000001203a697c llvm::SelectionDAGISel::SelectBasicBlock(llvm::BasicBlock*, llvm::ilist_iterator<llvm::Instruction>, llvm::ilist_iterator<llvm::Instruction>) + 396
15  ldc             0x00000001203a7284 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function&, llvm::MachineFunction&, llvm::MachineModuleInfo*, llvm::DwarfWriter*, llvm::TargetInstrInfo const&) + 1988
16  ldc             0x00000001203a8b98 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1992
17  ldc             0x00000001204d92e4 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 116
18  ldc             0x0000000120984b44 llvm::FPPassManager::runOnFunction(llvm::Function&) + 724
19  ldc             0x0000000120985080 llvm::FunctionPassManagerImpl::run(llvm::Function&) + 192
20  ldc             0x000000012098538c llvm::FunctionPassManager::run(llvm::Function&) + 108
21  ldc             0x00000001202d31bc write_asm_to_file(llvm::TargetMachine&, llvm::Module&, llvm::raw_fd_ostream&) + 844
22  ldc             0x00000001202d64a8 writeModule(llvm::Module*, std::string) + 552
23  ldc             0x00000001202ba03c main + 8348
24  libc.so.6.1     0x000002000034052c __libc_start_main + 236
25  ldc             0x00000001201436b8 _start + 56
Stack dump:
0.	Running pass 'Alpha DAG->DAG Pattern Instruction Selection' on function '@_D6object8TypeInfo6toHashMFZm'

So at least alpha could be fixed in newer llvm
(there were not so much traffix in lib/Target/Alpha in llvm,
but maybe this is actually bug in other part of llvm,
and is fixed).

Actually similar problem was reported on other 64-bit platform in llvm 2.6
here http://comments.gmane.org/gmane.comp.compilers.llvm.devel/31969 (for amd64),
and llvm developers on llvmdev mailing list, thinks this is fixed in
llvm 2.7. I'm not sure it is the same problem, but it looks it can be.

And if problem is still present in newer,
then I will investigate more manually.

Failures on other architectures looks to be general problem
of ldc, which somehow inproperly infers architecture.

How about at least trying building it for experimental?
Some Debian patches will need to be droped, as it was merged upstream,
or will need updating.

I'm now manually compiling llvm/clang/test-suite from trunk on alpha,
to see what I will get. (I'm compiling using gcc 4.2.4 from lenny,
but will see what happen. It will take few hours)

Also LLVM 2.8 and 2.9 looks to support MIPS, at least 32-bit MIPS.
It is experimental, but maybe mips should be removed from P-s-a,
just to try building?


Witold Baryluk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-llvm-team/attachments/20110330/cc487ee1/attachment.pgp>

More information about the Pkg-llvm-team mailing list