Related articles |
---|
[27 earlier articles] |
Re: What's lacking: a good intermediate form cr88192@hotmail.com (cr88192) (2009-03-07) |
Re: What's lacking: a good intermediate form tony@my.net (Tony) (2009-03-06) |
Re: What's lacking: a good intermediate form max@gustavus.edu (Max Hailperin) (2009-03-07) |
Re: What's lacking: a good intermediate form pertti.kellomaki@tut.fi (Pertti Kellomaki) (2009-03-09) |
Re: What's lacking: a good intermediate form pertti.kellomaki@tut.fi (Pertti Kellomaki) (2009-03-09) |
Re: What's lacking: a good intermediate form bobduff@shell01.TheWorld.com (Robert A Duff) (2009-03-10) |
Re: What's lacking: a good intermediate form bartc@freeuk.com (Bartc) (2009-03-11) |
Re: What's lacking: a good intermediate form tony@my.net (Tony) (2009-03-10) |
Re: What's lacking: a good intermediate form pertti.kellomaki@tut.fi (Pertti Kellomaki) (2009-03-12) |
Re: What's lacking: a good intermediate form pertti.kellomaki@tut.fi (Pertti Kellomaki) (2009-03-12) |
Re: What's lacking: a good intermediate form tony@my.net (Tony) (2009-03-14) |
Re: What's lacking: a good intermediate form jon@ffconsultancy.com (Jon Harrop) (2009-03-15) |
Re: What's lacking: a good intermediate form jon@ffconsultancy.com (Jon Harrop) (2009-03-15) |
From: | "Bartc" <bartc@freeuk.com> |
Newsgroups: | comp.compilers |
Date: | Wed, 11 Mar 2009 00:31:01 GMT |
Organization: | Compilers Central |
References: | 09-02-132 09-02-136 09-02-144 09-03-003 09-03-010 09-03-019 09-03-023 09-03-031 09-03-038 |
Keywords: | LLVM |
Posted-Date: | 11 Mar 2009 19:05:18 EDT |
"Max Hailperin" <max@gustavus.edu> wrote in message
> "Bartc" <bartc@freeuk.com> writes:
> ....
>> Great. An executable that will compile source like:
>>
>> define i32 @mul_add(i32 %x, i32 %y, i32 %z) {
>> entry:
>> %tmp = mul i32 %x, %y
>> %tmp2 = add i32 %tmp, %z
>> ret i32 %tmp2
>> }
>>
>> (from the llvm.org tutorial), into, presumably, some sort of assembler.
>>
>> It doesn't work like that unfortunately. ...
> If you ware willing to settle for *two* executables rather than one,
> your wish can be granted.
>
> I put the above procedure into a file called mul_add.ll and then gave
> the following two commands at a command prompt:
>
> llvm-as mul_add.ll
> llc mul_add.bc
I've just tried this and it did exactly as you said. I'm impressed!
Perhaps there might be something to this llvm after all. The programs don't
do themselves any favours however; typing llc by itself does nothing except
wait for further input. No message saying what it does and what input it
expects. But then, this is probably standard for linux.
(And there's the minor problem of translating that horrible x86 syntax.)
I will look around for more of a beginner's guide..
--
Bartc
Return to the
comp.compilers page.
Search the
comp.compilers archives again.