[pypy-dev] Translating code to LLVM

Baptiste Lepilleur gaiacrtn at free.fr
Sun Sep 11 10:05:45 CEST 2005


Chris Lattner wrote:
> On Sun, 11 Sep 2005, Baptiste Lepilleur wrote:
> 
>> Following the getting started instruction, I'm trying to get the LLVM
>> translation pgcd example below.
>> 
>> I'm on Windows XP using LLVM cvs build with VC++ 7.1.
> ...
> 
>> ...
>> opt: Invalid Top Level Block Length! Type:1, Size:49557 (Vers=0,
>> Pos=8) 
> 
> This sounds like an LLVM problem: the assembler is producing an
> invalid bytecode file.  Either the .ll file is broken (in which case
> the assembler should have rejected it) or the bytecode writer is doing
> something wrong.  In any case, if you gzip up the source and email it
> to me, I'd be happy to look at it.

I would be happy to do so, but what is the location of the generated .ll ?

> -Chris
> 
>> With PyPy SVN head, I get a more direct error:
>>>>> print t.llvm()
>> [...] truncated
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>> File "E:\prg\py\App\pypy\pypy\translator\translator.py", line 201,
>>   in llvm filename = gen.gen_llvm_source()
>> File "E:\prg\py\App\pypy\pypy\translator\llvm\genllvm.py", line 179,
>> in gen_llvm_source
>>   codewriter.append(self.gcpolicy.declarations())
>> AttributeError: 'NoneType' object has no attribute 'declarations'
>> 
>> Does anyone know what I'm doing wrong ?
>> 
>> On another topic, where do the generated files go ? I tried to find
>> the files generated by the c and llvm translation but couldn't find
>> them... 
>> 
>> Baptiste.
>> _______________________________________________
>> pypy-dev at codespeak.net
>> http://codespeak.net/mailman/listinfo/pypy-dev
>> 
> 
> -Chris



More information about the Pypy-dev mailing list