Am newbie in this compiler arena. I have little difficult in understanding various compiler and what does it actually means front-end and back-end in the context of compiler (e.g. I read LLVM compiler used as back-end for Clang.)

Is Clang/LLVM and Apple-LLVM (https://developer.apple.com/technologies/tools/) are all just same. Or is there any difference in that. Someone can please enlighten me on this. or even pointer to some good article to understand would be great.

Thanks / Anandh

02-07-2013, 04:11 PM

systemd rulez

Don't use Apple-LLVM and Clang-LLVM. They are all shit compilers and they often create broken binaries that segfault when executed no matter the code.

Use gcc, it's much better and more powerful. The binaries produced by gcc are much smaller and run much ftaer and smoother then app or clang llvm.

Also recently, apple has added a surveillance capability to all llvm and clang versions so you should not use them.

02-07-2013, 06:21 PM

archibald

Apple-LLVM is the 'regular' LLVM, there's only one.

The front-end is the part that reads the code you type. Clang reads your C code and converts it to an intermediate representation (i.e. it's not fully-compiled yet). LLVM then takes this intermediate representation, optimises it as required, and produces the final binary (the program that you actually run). This means that supporting a new language is simplified, as you only need to write the front-end (the code-to-IR part). This has been done in the AMD graphics drivers.

Ignore "systemd rulez", clang/LLVM are both very capable and widely used. Give them both a try and see which one you like the most. Or use both to make sure you don't accidentally use compiler-specific code in your programs.

02-07-2013, 08:49 PM

systemd rulez

Quote:

Originally Posted by archibald

Apple-LLVM is the 'regular' LLVM, there's only one.

The front-end is the part that reads the code you type. Clang reads your C code and converts it to an intermediate representation (i.e. it's not fully-compiled yet). LLVM then takes this intermediate representation, optimises it as required, and produces the final binary (the program that you actually run). This means that supporting a new language is simplified, as you only need to write the front-end (the code-to-IR part). This has been done in the AMD graphics drivers.

With gcc, it does both and therefore, you don't need two seperate programs. Also, gcc is smaller and the libraries required are much more compact and so are the binaries. You'll be much better of using gcc.

Quote:

Ignore "systemd rulez", clang/LLVM are both very capable and widely used. Give them both a try and see which one you like the most. Or use both to make sure you don't accidentally use compiler-specific code in your programs.

Acturally, it's archibald that you shoulkd ignore. pretty much everything he says in this quote is a lie.

-clang/LLVM are not capable compilers, they are very poor by modern standards.

-The obvious program that will repect your privacy and allow you to produce excellent binaries is gcc. clang/llvm is just horrible in every respect. (literally)

-gcc specific code has actually been known to produce much better binaries and it makes the code look alot cleaner.

02-07-2013, 08:56 PM

Vim_User

Quote:

Originally Posted by systemd rulez

With gcc, it does both and therefore, you don't need two seperate programs.

Please show us how to implement something like AMD's graphic driver frontend with gcc instead of a compiler with frontend/backend design. Oh, you can't?
Maybe because you have no clue what you are talking about?

Quote:

-clang/LLVM are not capable compilers, they are very poor by modern standards.

-The obvious program that will repect your privacy and allow you to produce excellent binaries is gcc. clang/llvm is just horrible in every respect. (literally)

-gcc specific code has actually been known to produce much better binaries and it makes the code look alot cleaner.

I bet you are not able to provide any sane proof for that.

Quote:

Also recently, apple has added a surveillance capability to all llvm and clang versions so you should not use them.

Link to that? I bet you don't have one, except may be some made up stuff, like your antiBSD blog full of lies.

Damn it, you are much worse at trolling than I previously thought.

02-07-2013, 09:11 PM

systemd rulez

Quote:

Originally Posted by Vim_User

Please show us how to implement something like AMD's graphic driver frontend with gcc instead of a compiler with frontend/backend design. Oh, you can't?

Go to gnu.org.

Quote:

Maybe because you have no clue what you are talking about?

I bet you are not able to provide any sane proof for that.

Look at the benckmarks for clang and gcc. Oh wait your in denial just like all BSDtards out there.;)

Quote:

Link to that? I bet you don't have one, except may be some made up stuff, like your antiBSD blog full of lies.

I told you, I can't write such long post. So it's not my blog. I can't even be bothered setting up a blog cause I don't have timw writing long essays

Quote:

Damn it, you are much worse at trolling than I previously thought.

I'm only just trying to awaken people to the danger and unethicallity of nonfree software and BSD (which helps nonfree software). The comment you make about me being a troll actually applies to you.:)

02-07-2013, 09:50 PM

Vim_User

Quote:

Originally Posted by systemd rulez

Go to gnu.org.

Gnu.org does not have an article about writing an AMD driver frontend for gcc. Possibly because gcc does not have Clang/LLVM's modularity and it is simply not possible.

So, you are in the mid-30s, a programmer, an expert in compiler design, but incapable of writing long blog posts?

Fail #3

Quote:

I can't even be bothered setting up a blog cause I don't have timw writing long essays

But you have the time to troll Phoronix and do your "research" on the web to do so?

Fail #4

Quote:

I'm only just trying to awaken people to the danger and unethicallity

You know what unethical means, do you? You realize that lying is unethical, do you? So please provide a link that proves your claim that Apple added surveillance capability to Clang/LLVM, otherwise it is pretty clear who is the unethical person and this would be fail #5. Pretty nice number for only one post.

02-07-2013, 10:47 PM

Anandh

My intention for asking this question is not to know which is better. But Clang-LLVM and Apple-LLVM are all same or it is two different compilers with same back-end(LLVM)?
I got this doubt when i was reading stroustrup's article on Compilers @ http://www.stroustrup.com/compilers.html he has mentioned AppleC++ and ClangC++ as two different compiler..

02-08-2013, 12:40 AM

systemd rulez

Quote:

Originally Posted by Vim_User

Gnu.org does not have an article about writing an AMD driver frontend for gcc. Possibly because gcc does not have Clang/LLVM's modularity and it is simply not possible.

Is it my problem that you can't find it? BTW, Clang's "modularity" is nothing but a myth. it's heavier, a myth and impossible to maintain and the BSDs are willingly excepting it into thier code base making it heavier and less protable. It's the main reason why they don't have a ARM port and never will.

So, you are in the mid-30s, a programmer, an expert in compiler design, but incapable of writing long blog posts?

Writing a big piece of code is very different from writing a boring long essay. So that Fail goes to you.

Quote:

But you have the time to troll Phoronix and do your "research" on the web to do so?

I'm inspired to do that after i see the atrocities of BSD (giving code written by unsuspecting FLOSS devs to evil companies).

Quote:

You know what unethical means, do you? You realize that lying is unethical, do you? So please provide a link that proves your claim that Apple added surveillance capability to Clang/LLVM, otherwise it is pretty clear who is the unethical person and this would be fail #5. Pretty nice number for only one post.

But I'm not lying so I have a clear concisions on that one and I cannot just do nothing while BSD exists to fuel proprietary software cause I have to live with my concisions.

Apple has been known to put tracking capabilities on their hardware and software (see Richard Stallman).
And Clang is no exception.

02-08-2013, 12:57 AM

Vim_User

Quote:

Originally Posted by systemd rulez

Is it my problem that you can't find it? BTW, Clang's "modularity" is nothing but a myth. it's heavier, a myth and impossible to maintain and the BSDs are willingly excepting it into thier code base making it heavier and less protable. It's the main reason why they don't have a ARM port and never will.

Ok, now we have an example of your incapability of understanding benchmarks.

Quote:

Writing a big piece of code is very different from writing a boring long essay. So that Fail goes to you.

Nope, it doesn't, it just shows that you claim to be older than you actually are, since you are not able to write an essay. May I ask how you have passed school without that capability? Oh, wait, I forgot that you still have to.

Quote:

But I'm not lying so I have a clear concisions on that one and I cannot just do nothing while BSD exists to fuel proprietary software cause I have to live with my concisions.

Apple has been known to put tracking capabilities on their hardware and software (see Richard Stallman).
And Clang is no exception.

Since you are not even able to provide a link for your claim, although you are

Quote:

I'm inspired to do that after i see the atrocities of BSD (giving code written by unsuspecting FLOSS devs to evil companies)

we can come only to the conclusion that you you are a blatantly lying troll.

Let's recapitulate:
1. You are a programmer in the mid-30s supporting FLOSS and in favor of the GPL license. Can you show us some of your code? You clearly must have code licensed under GPL that you can show us.
2. Your mission is to show the world the evilness of BSD and anything related, but you are not able to provide a reliable source for your claims of evilness. Does your aversion against BSD licensed software go so far that you refuse to use any software released under a permissive license?
3. In your mission against BSD's "unethical" behavior you blatantly lie, deny facts and post insulting pictures and slogans. Do you know what the word unethical means?