# Hello!

**URL:** <https://discourse.llvm.org/t/hello/14379>\
**Category:** LLVM Dev List Archives\
**Created:** [November 10, 2009, 4:24pm UTC](https://discourse.llvm.org/t/hello/14379 "2009-11-10T16:24:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrick\_Kelly](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@Patrick\_Kelly](https://discourse.llvm.org/u/Patrick_Kelly)\
**Post date:** [November 10, 2009, 4:24pm UTC](https://discourse.llvm.org/t/hello/14379/1 "2009-11-10T16:24:35Z")

</div>

I'm interested in contributing to LLVM, but I'm a rather bad C/C++ developer. I do most of my work in Ada and was wondering if there was a way to still contribute to something other than the Ada frontend.

---

<div class="post-metadata">

**Author:** ![\_utf-8\_Q\_C3\_93scar\_F](https://avatars.discourse-cdn.com/v4/letter/_/e274bd/32.png) [@\_utf-8\_Q\_C3\_93scar\_F](https://discourse.llvm.org/u/_utf-8_Q_C3_93scar_F)\
**Post date:** [November 10, 2009, 4:34pm UTC](https://discourse.llvm.org/t/hello/14379/2 "2009-11-10T16:34:50Z")

</div>

Patrick Kelly \<kameo76890@gmail.com\> writes:

> I'm interested in contributing to LLVM, but I'm a rather bad C/C++  
> developer. I do most of my work in Ada and was wondering if there was  
> a way to still contribute to something other than the Ada frontend.

See [The LLVM Compiler Infrastructure Project](http://www.llvm.org/OpenProjects.html)

There are quite a few tasks with no C++ required.

---

<div class="post-metadata">

**Author:** ![Patrick\_Kelly](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@Patrick\_Kelly](https://discourse.llvm.org/u/Patrick_Kelly)\
**Post date:** [November 11, 2009, 12:37am UTC](https://discourse.llvm.org/t/hello/14379/3 "2009-11-11T00:37:23Z")

</div>

Since I didn’t elaborate, specifically I want to work on an Ada back-end. As I understand it, there are already C and C++ backends so it technically is possible.

I just want to make sure that theres no complaints to me writing this in Ada.

---

<div class="post-metadata">

**Author:** ![Edward\_O\_Callaghan](https://avatars.discourse-cdn.com/v4/letter/e/67e7ee/32.png) [@Edward\_O\_Callaghan](https://discourse.llvm.org/u/Edward_O_Callaghan)\
**Post date:** [November 11, 2009, 1:11am UTC](https://discourse.llvm.org/t/hello/14379/4 "2009-11-11T01:11:59Z")

</div>

Hello Patrick,

Great to have a fellow Ada programmer around, yes there are some tasks  
that really need doing !

We^[1] contributed a Ada binding to the LLVM project some months ago.  
However, The binding needs to be correctly tighten into the rest of  
the LLVM build system properly and it needs possibly some test cases  
also.

This would be a really fantastic contribution if you could take care  
of this particular project on the Ada front?  
We have the intent on some day soon porting the Ada frontend to  
LLVM^[2] however the above work needs to be done so the LLVM side is  
'ready' for that to happen.

There is of course other projects if your not interested, but I guess  
these are a things would like to be done.

Cheers,  
Edward.

[1] - [http://www.auroraux.org/](http://www.auroraux.org/)  
[2] - [auroraux.org](http://forums.auroraux.org/viewtopic.php?f=12&t=6&sid=1f7338c7bb4f5c32d69d6392b454ee3f)

---

<div class="post-metadata">

**Author:** ![Patrick\_Kelly](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@Patrick\_Kelly](https://discourse.llvm.org/u/Patrick_Kelly)\
**Post date:** [November 11, 2009, 11:46pm UTC](https://discourse.llvm.org/t/hello/14379/5 "2009-11-11T23:46:49Z")

</div>

I meant target -.-, that was a dumb mistake.  
I got an okay for both the target and frontend so, pleasure to work with you all.

---

<div class="post-metadata">

**Author:** ![Jon\_McLachlan](https://avatars.discourse-cdn.com/v4/letter/j/d9b06d/32.png) [@Jon\_McLachlan](https://discourse.llvm.org/u/Jon_McLachlan)\
**Post date:** [November 12, 2009, 5:53pm UTC](https://discourse.llvm.org/t/hello/14379/6 "2009-11-12T17:53:13Z")

</div>

Any plans to make LLVM work with Google's new language, Go?

> **[Go Go Google Programming Language](https://www.technewsworld.com/story/Go-Go-Google-Programming-Language-68622.html?wlc=1257974768&wlc=1258041607&wlc=1258047741)**
>
> Google on Tuesday announced an experimental new computer programming language called "Go." This combines the development speed of dynamic languages such as Python with the performance and safety of compiled languages like C or C++, the Internet...

---

<div class="post-metadata">

**Author:** ![Jeffrey\_Yasskin1](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@Jeffrey\_Yasskin1](https://discourse.llvm.org/u/Jeffrey_Yasskin1)\
**Post date:** [November 12, 2009, 6:25pm UTC](https://discourse.llvm.org/t/hello/14379/7 "2009-11-12T18:25:03Z")

</div>

That's a better question for the Go developers. AFAIK, the only thing  
they rely on that isn't already in LLVM is segmented stacks, and Ian  
had to add that to gcc too.

---

<div class="post-metadata">

**Author:** ![Edward\_O\_Callaghan](https://avatars.discourse-cdn.com/v4/letter/e/67e7ee/32.png) [@Edward\_O\_Callaghan](https://discourse.llvm.org/u/Edward_O_Callaghan)\
**Post date:** [November 12, 2009, 6:25pm UTC](https://discourse.llvm.org/t/hello/14379/8 "2009-11-12T18:25:48Z")

</div>

No, its up to them which backend they want to use.  
Sounds like they think that GCC is super quick compared to LLVM. Looks  
like another fud fart out of google to me.

---

<div class="post-metadata">

**Author:** ![Evan\_Cheng1](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@Evan\_Cheng1](https://discourse.llvm.org/u/Evan_Cheng1)\
**Post date:** [November 12, 2009, 6:39pm UTC](https://discourse.llvm.org/t/hello/14379/9 "2009-11-12T18:39:31Z")

</div>

> No, its up to them which backend they want to use.  
> Sounds like they think that GCC is super quick compared to LLVM. Looks  
> like another fud fart out of google to me.

Edward, this is no place for comments like this.

Evan

---

<div class="post-metadata">

**Author:** ![resistor](https://sea1.discourse-cdn.com/flex021/user_avatar/discourse.llvm.org/resistor/32/26345_2.png) [@resistor](https://discourse.llvm.org/u/resistor)\
**Post date:** [November 12, 2009, 6:59pm UTC](https://discourse.llvm.org/t/hello/14379/10 "2009-11-12T18:59:51Z")

</div>

Actually, after chatting with Ian about it, it’s more of a case of the FAQ being poorly worded than them being anti-LLVM.

If you read it closely, it says that LLVM was too slow for 6g, which is their ultra-fast, non-optimizing implementation based on the Plan9 compilers. In this case, the assertion that LLVM is slow is correct: it’s definitely slower than a non-optimizing compiler. They then _later_ implemented an optimizing implementation, which they based on GCC because they had a team member (Ian) who is a GCC expert.

On the positive side, Ian seemed very positive and even encouraging that his GCCGo frontend might be retargettable from GCC to LLVM, so I wouldn’t rule it out as a possibility if some interested community members stepped up to do it.

–Owen

---

<div class="post-metadata">

**Author:** ![Edward\_O\_Callaghan](https://avatars.discourse-cdn.com/v4/letter/e/67e7ee/32.png) [@Edward\_O\_Callaghan](https://discourse.llvm.org/u/Edward_O_Callaghan)\
**Post date:** [November 12, 2009, 7:03pm UTC](https://discourse.llvm.org/t/hello/14379/11 "2009-11-12T19:03:58Z")

</div>

Sorry 😑 no bad intentions..

---

<div class="post-metadata">

**Author:** ![Jon\_Harrop](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@Jon\_Harrop](https://discourse.llvm.org/u/Jon_Harrop)\
**Post date:** [November 19, 2009, 6:25pm UTC](https://discourse.llvm.org/t/hello/14379/12 "2009-11-19T18:25:47Z")

</div>

> \> No, its up to them which backend they want to use.  
> \> Sounds like they think that GCC is super quick compared to LLVM. Looks  
> \> like another fud fart out of google to me.
> 
> Actually, after chatting with Ian about it, it's more of a case of the FAQ  
> being poorly worded than them being anti-LLVM.
> 
> If you read it closely, it says that LLVM was too slow for 6g, which is  
> their ultra-fast, non-optimizing implementation based on the Plan9  
> compilers.

Indeed:

&nbsp;&nbsp;"We also considered using LLVM for 6g but we felt it was too large and slow  
to meet our performance goals." -

> **[Frequently Asked Questions (FAQ) - The Go Programming Language](https://go.dev/doc/faq)**

> In this case, the assertion that LLVM is slow is correct: it's  
> definitely slower than a non-optimizing compiler.

I'm \*very\* surprised by this and will test it myself...

---

<div class="post-metadata">

**Author:** ![resistor](https://sea1.discourse-cdn.com/flex021/user_avatar/discourse.llvm.org/resistor/32/26345_2.png) [@resistor](https://discourse.llvm.org/u/resistor)\
**Post date:** [November 19, 2009, 7:48pm UTC](https://discourse.llvm.org/t/hello/14379/13 "2009-11-19T19:48:18Z")

</div>

Compared to a compiler in the same category as PCC, whose pinnacle of optimization is doing register allocation? I’m not surprised at all.

–Owen

---

<div class="post-metadata">

**Author:** ![Ken\_Ferry](https://avatars.discourse-cdn.com/v4/letter/k/77aa72/32.png) [@Ken\_Ferry](https://discourse.llvm.org/u/Ken_Ferry)\
**Post date:** [November 19, 2009, 8:12pm UTC](https://discourse.llvm.org/t/hello/14379/14 "2009-11-19T20:12:42Z")

</div>

> > > In this case, the assertion that LLVM is slow is correct: it’s
> > 
> > > definitely slower than a non-optimizing compiler.
> > 
> > I’m _very_ surprised by this and will test it myself…
> 
> Compared to a compiler in the same category as PCC, whose pinnacle of optimization is doing register allocation? I’m not surprised at all.

Though, at -O0 llvm’s goal is not to optimize but to be fast, no?

I was certainly wondering what would prevent LLVM from being as fast as the go compiler. Do they need to be able to stream code from the front to middle to back ends or something? (Can llvm do that?)

---

<div class="post-metadata">

**Author:** ![Renato\_Golin3](https://avatars.discourse-cdn.com/v4/letter/r/5f9b8f/32.png) [@Renato\_Golin3](https://discourse.llvm.org/u/Renato_Golin3)\
**Post date:** [November 19, 2009, 8:31pm UTC](https://discourse.llvm.org/t/hello/14379/15 "2009-11-19T20:31:11Z")

</div>

I thought -O0's only use was to be ipsis literis with the code so you  
can debug the application... I can't see any other use for that...

cheers,  
--renato

Reclaim your digital rights, eliminate DRM, learn more at  
[http://www.defectivebydesign.org/what\_is\_drm](http://www.defectivebydesign.org/what_is_drm)

---

<div class="post-metadata">

**Author:** ![Jon\_Harrop](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@Jon\_Harrop](https://discourse.llvm.org/u/Jon_Harrop)\
**Post date:** [November 19, 2009, 10:10pm UTC](https://discourse.llvm.org/t/hello/14379/16 "2009-11-19T22:10:22Z")

</div>

> \>\> In this case, the assertion that LLVM is slow is correct: it's  
> \>\> definitely slower than a non-optimizing compiler.  
> \>  
> \> I'm \*very\* surprised by this and will test it myself...

I've tested it and LLVM is indeed 2x slower to compile, although it generates  
code that is 2x faster to run...

> Compared to a compiler in the same category as PCC, whose pinnacle of  
> optimization is doing register allocation? I'm not surprised at all.

What else does LLVM do with optimizations turned off that makes it slower?

---

<div class="post-metadata">

**Author:** ![Bob\_Wilson](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@Bob\_Wilson](https://discourse.llvm.org/u/Bob_Wilson)\
**Post date:** [November 19, 2009, 9:04pm UTC](https://discourse.llvm.org/t/hello/14379/17 "2009-11-19T21:04:13Z")

</div>

I haven't looked at Go at all, but in general, there is a significant overhead to creating a compiler intermediate representation. If you produce assembly code straight out of the parser, you can compile faster.

Even though LLVM does little optimization at -O0, there is still a fair amount of work involved in translating to LLVM IR.

---

<div class="post-metadata">

**Author:** ![John\_McCall1](https://avatars.discourse-cdn.com/v4/letter/j/35a633/32.png) [@John\_McCall1](https://discourse.llvm.org/u/John_McCall1)\
**Post date:** [November 19, 2009, 9:06pm UTC](https://discourse.llvm.org/t/hello/14379/18 "2009-11-19T21:06:23Z")

</div>

Jon Harrop wrote:

> ```auto
>   
> 
> ```
> 
> > ```auto
> >     
> > 
> > ```
> > 
> > > > ```auto
> > > > In this case, the assertion that LLVM is slow is correct: it's
> > > > definitely slower than a non-optimizing compiler.
> > > >         
> > > > 
> > > > ```
> > > 
> > > ```auto
> > > I'm *very* surprised by this and will test it myself...
> > >       
> > > 
> > > ```
> 
> ```auto
> 
> I've tested it and LLVM is indeed 2x slower to compile, although it generates 
> code that is 2x faster to run...
> 
>   
> 
> ```
> 
> > ```auto
> > Compared to a compiler in the same category as PCC, whose pinnacle of
> > optimization is doing register allocation? I'm not surprised at all.
> >     
> > 
> > ```
> 
> ```auto
> 
> What else does LLVM do with optimizations turned off that makes it slower?
>   
> 
> ```

My guess would be primarily (1) respectable instruction selection, followed by (2) good register allocation. But at some point, the overhead of going through an abstract IR will slow you down. You’re never going to beat a splat compiler except with another splat compiler.

John.

---

<div class="post-metadata">

**Author:** ![\_utf-8\_Q\_C3\_93scar\_F](https://avatars.discourse-cdn.com/v4/letter/_/e274bd/32.png) [@\_utf-8\_Q\_C3\_93scar\_F](https://discourse.llvm.org/u/_utf-8_Q_C3_93scar_F)\
**Post date:** [November 19, 2009, 9:08pm UTC](https://discourse.llvm.org/t/hello/14379/19 "2009-11-19T21:08:37Z")

</div>

Jon Harrop \<jon@ffconsultancy.com\> writes:

[snip]

> > Compared to a compiler in the same category as PCC, whose pinnacle of  
> > optimization is doing register allocation? I'm not surprised at all.
> 
> What else does LLVM do with optimizations turned off that makes it slower?

On my experience, optimization is not the slowest part, native codegen  
is. (But it could be argued that native codegen is slow because it tries  
to produce the most efficient native code out of the llvm bitecode.)

---

<div class="post-metadata">

**Author:** ![\_utf-8\_Q\_C3\_93scar\_F](https://avatars.discourse-cdn.com/v4/letter/_/e274bd/32.png) [@\_utf-8\_Q\_C3\_93scar\_F](https://discourse.llvm.org/u/_utf-8_Q_C3_93scar_F)\
**Post date:** [November 19, 2009, 9:12pm UTC](https://discourse.llvm.org/t/hello/14379/20 "2009-11-19T21:12:37Z")

</div>

Bob Wilson \<bob.wilson@apple.com\> writes:

> > What else does LLVM do with optimizations turned off that makes it  
> > slower?
> 
> I haven't looked at Go at all, but in general, there is a significant  
> overhead to creating a compiler intermediate representation. If you  
> produce assembly code straight out of the parser, you can compile  
> faster.

Not for me. Producing LLVM IR is \*very\* fast, faster than producing  
poorly optimized assembler code (I know, I do both things).

> Even though LLVM does little optimization at -O0, there is still a  
> fair amount of work involved in translating to LLVM IR.

As said on my previous message, the most significant part of the work is  
in generating native code from the LLVM IR.

[Next page](https://discourse.llvm.org/t/hello/14379.md?page=2)
