[LLVMdev] LLVM binaries for Windows and more

Andreas Rumpf Rumpf_A at web.de
Tue Jun 12 01:07:27 PDT 2007


Hi!

I want to use LLVM for my own "pet" programming language compiler as a backend. 
Currently it generates C code, but I am not satisfied with this approach as generating
high-level C (with proper type declarations!) is horrible.
So here are my questions/problems with LLVM: 

1.) Are there operations that add, sub, mul integers with overflow checking? How much work would it be to add those? They are needed for my programming language, but I think Pascal and Ada need those too. 

2.) The version 2.0 of your source code does not compile with Microsoft Visual C++ 2005 Express Edition. (By the way, is it documented that I need Bison? I figured that out myself...):

------ Build started: Project: x86, Configuration: Release Win32 ------
Compiling...
X86RegisterInfo.cpp
..\..\lib\Target\X86\X86RegisterInfo.cpp(1107) : warning C4244: 'argument' : conversion from 'uint64_t' to 'int', possible loss of data
..\..\lib\Target\X86\X86RegisterInfo.cpp(1127) : warning C4244: 'argument' : conversion from 'uint64_t' to 'int', possible loss of data
..\..\lib\Target\X86\X86RegisterInfo.cpp(1132) : warning C4244: 'argument' : conversion from 'uint64_t' to 'int', possible loss of data
..\..\lib\Target\X86\X86RegisterInfo.cpp(1141) : warning C4244: 'argument' : conversion from 'uint64_t' to 'int', possible loss of data
..\..\lib\Target\X86\X86RegisterInfo.cpp(1170) : warning C4244: 'argument' : conversion from 'uint64_t' to 'int', possible loss of data
..\..\lib\Target\X86\X86RegisterInfo.cpp(1185) : warning C4244: 'argument' : conversion from 'int64_t' to 'int', possible loss of data
c:\Eigenes\compiler\llvm-2.0\win32\x86\X86GenRegisterInfo.inc(805) : warning C4065: switch statement contains 'default' but no 'case' labels
C:\eigenes\compiler\vcc2005\VC\include\xutility(2282) : warning C4996: 'std::_Copy_opt' was declared deprecated
        C:\eigenes\compiler\vcc2005\VC\include\xutility(2270) : see declaration of 'std::_Copy_opt'
        Message: 'You have used a std:: construct that is not safe. See documentation on how to use the Safe Standard C++ Library'
        c:\Eigenes\compiler\llvm-2.0\include\llvm/ADT/BitVector.h(90) : see reference to function template instantiation '_OutIt std::copy<llvm::BitVector::BitWord*,llvm::BitVector::BitWord*>(_InIt,_InIt,_OutIt)' being compiled
        with
        [
            _OutIt=llvm::BitVector::BitWord *,
            _InIt=llvm::BitVector::BitWord *
        ]
C:\eigenes\compiler\vcc2005\VC\include\xutility(2282) : warning C4996: 'std::_Copy_opt' was declared deprecated
        C:\eigenes\compiler\vcc2005\VC\include\xutility(2270) : see declaration of 'std::_Copy_opt'
        Message: 'You have used a std:: construct that is not safe. See documentation on how to use the Safe Standard C++ Library'
        c:\Eigenes\compiler\llvm-2.0\include\llvm/ADT/SmallVector.h(383) : see reference to function template instantiation '_OutIt std::copy<T*,T*>(_InIt,_InIt,_OutIt)' being compiled
        with
        [
            _OutIt=llvm::TargetAlignElem *,
            T=llvm::TargetAlignElem,
            _InIt=llvm::TargetAlignElem *
        ]
        c:\Eigenes\compiler\llvm-2.0\include\llvm/ADT/SmallVector.h(373) : while compiling class template member function 'const llvm::SmallVectorImpl<T> &llvm::SmallVectorImpl<T>::operator =(const llvm::SmallVectorImpl<T> &)'
        with
        [
            T=llvm::TargetAlignElem
        ]
        c:\Eigenes\compiler\llvm-2.0\include\llvm/ADT/SmallVector.h(423) : see reference to class template instantiation 'llvm::SmallVectorImpl<T>' being compiled
        with
        [
            T=llvm::TargetAlignElem
        ]
        c:\Eigenes\compiler\llvm-2.0\include\llvm/Target/TargetData.h(78) : see reference to class template instantiation 'llvm::SmallVector<T,N>' being compiled
        with
        [
            T=llvm::TargetAlignElem,
            N=16
        ]
C:\eigenes\compiler\vcc2005\VC\include\memory(93) : warning C4996: 'std::_Uninit_copy' was declared deprecated
        C:\eigenes\compiler\vcc2005\VC\include\memory(82) : see declaration of 'std::_Uninit_copy'
        Message: 'You have used a std:: construct that is not safe. See documentation on how to use the Safe Standard C++ Library'
        c:\Eigenes\compiler\llvm-2.0\include\llvm/ADT/SmallVector.h(407) : see reference to function template instantiation '_FwdIt std::uninitialized_copy<T*,T*>(_InIt,_InIt,_FwdIt)' being compiled
        with
        [
            _FwdIt=llvm::TargetAlignElem *,
            T=llvm::TargetAlignElem,
            _InIt=llvm::TargetAlignElem *
        ]
C:\eigenes\compiler\vcc2005\VC\include\memory(93) : warning C4996: 'std::_Uninit_copy' was declared deprecated
        C:\eigenes\compiler\vcc2005\VC\include\memory(82) : see declaration of 'std::_Uninit_copy'
        Message: 'You have used a std:: construct that is not safe. See documentation on how to use the Safe Standard C++ Library'
        c:\Eigenes\compiler\llvm-2.0\include\llvm/ADT/SmallVector.h(319) : see reference to function template instantiation '_FwdIt std::uninitialized_copy<T*,T*>(_InIt,_InIt,_FwdIt)' being compiled
        with
        [
            _FwdIt=llvm::SDNode **,
            T=llvm::SDNode *,
            _InIt=llvm::SDNode **
        ]
        c:\Eigenes\compiler\llvm-2.0\include\llvm/ADT/SmallVector.h(310) : while compiling class template member function 'void llvm::SmallVectorImpl<T>::grow(unsigned int)'
        with
        [
            T=llvm::SDNode *
        ]
        c:\Eigenes\compiler\llvm-2.0\include\llvm/ADT/SmallVector.h(423) : see reference to class template instantiation 'llvm::SmallVectorImpl<T>' being compiled
        with
        [
            T=llvm::SDNode *
        ]
        c:\Eigenes\compiler\llvm-2.0\include\llvm/CodeGen/SelectionDAGNodes.h(825) : see reference to class template instantiation 'llvm::SmallVector<T,N>' being compiled
        with
        [
            T=llvm::SDNode *,
            N=3
        ]
c:\eigenes\compiler\llvm-2.0\win32\x86\x86genregisterinfo.inc(806) : error C4716: 'llvm::X86GenRegisterInfo::getSubReg' : must return a value
Build log was saved at "file://c:\Eigenes\compiler\llvm-2.0\win32\x86\Release\BuildLog.htm"
x86 - 1 error(s), 11 warning(s)
------ Build started: Project: llc, Configuration: Release Win32 ------
Linking...
LINK : fatal error LNK1181: cannot open input file '..\release\x86.lib'
Build log was saved at "file://c:\Eigenes\compiler\llvm-2.0\win32\llc\Release\BuildLog.htm"
llc - 1 error(s), 0 warning(s)
------ Build started: Project: lli, Configuration: Release Win32 ------
Linking...
LINK : fatal error LNK1181: cannot open input file '..\release\x86.lib'
Build log was saved at "file://c:\Eigenes\compiler\llvm-2.0\win32\lli\Release\BuildLog.htm"
lli - 1 error(s), 0 warning(s)
------ Build started: Project: Fibonacci, Configuration: Release Win32 ------
Linking...
LINK : fatal error LNK1181: cannot open input file '..\release\x86.lib'
Build log was saved at "file://c:\Eigenes\compiler\llvm-2.0\win32\Fibonacci\Release\BuildLog.htm"
Fibonacci - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 4 failed, 26 up-to-date, 0 skipped ==========


I fixed this by adding a ``return 0;`` at the end of the method. But why don't you just provide binaries for windows? I could send you the binaries that I built - I have not yet tested them though. 

Greetings
Andreas Rumpf



_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192




More information about the llvm-dev mailing list