Announcement

Collapse
No announcement yet.

Apple/LLVM and Clang/LLVM

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Apple/LLVM and Clang/LLVM

    Hello there,

    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

  • #2
    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.

    Comment


    • #3
      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.

      Comment


      • #4
        Originally posted by archibald View Post
        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.

        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.

        Comment


        • #5
          Originally posted by systemd rulez View Post
          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?

          -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.

          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.

          Comment


          • #6
            Originally posted by Vim_User View Post
            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.

            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.

            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

            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.

            Comment


            • #7
              Originally posted by systemd rulez View Post
              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.

              Fail #1

              Look at the benckmarks for clang and gcc.
              Do you mean this one? http://www.phoronix.com/scan.php?pag...32_final&num=1
              The one where Clang/LLVM and GCC are mostly up to par, sometimes GCC faster, sometimes Clang/LLVM?

              Fail #2

              I told you, I can't write such long post. So it's not my blog.
              So, you are in the mid-30s, a programmer, an expert in compiler design, but incapable of writing long blog posts?

              Fail #3

              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

              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.

              Comment


              • #8
                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..

                Comment


                • #9
                  Originally posted by Vim_User View Post
                  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.


                  Do you mean this one? http://www.phoronix.com/scan.php?pag...32_final&num=1
                  The one where Clang/LLVM and GCC are mostly up to par, sometimes GCC faster, sometimes Clang/LLVM?
                  From what I see in that benchmark:


                  Tux as GCC and beastie as CLANG.

                  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.

                  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).


                  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.

                  Comment


                  • #10
                    Originally posted by systemd rulez View Post
                    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.
                    http://www.netbsd.org/ports/arm/

                    Fail #6

                    From what I see in that benchmark:


                    Tux as GCC and beastie as CLANG.
                    Ok, now we have an example of your incapability of understanding benchmarks.

                    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.

                    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
                    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?

                    Comment


                    • #11
                      Hold on Vim_user, systemed rulez.. Instead u both attacking each other.. can anyone ans to my question?

                      Comment


                      • #12
                        Originally posted by Anandh View Post
                        Hold on Vim_user, systemed rulez.. Instead u both attacking each other.. can anyone ans to my question?
                        Of course. It is like Archibald already stated. The frontend, in this case Clang, analyzes the code (checking for syntactical and logical errors) and creates an intermediate code from it. This code then is given to the backend, which translates the intermediate code into actual machine code.
                        This has the advantages that you can replace the parts individually, for example, Clang is a code analyzer for C/C++, but it can be replaced with a code analyzer for Pascal or any other language, as long as the analyzer creates intermediate code that the backend can parse to machine code. On the other hand you can replace the backend if necessary without changing the frontend.

                        Also a nice advantage of this design: You can use the parts apart from another, for example can the Clang frontend be used by IDEs or text editors for syntax highlighting or on-the-fly recognition of syntax and logical errors.

                        Comment


                        • #13
                          Originally posted by Vim_User View Post
                          Of course. It is like Archibald already stated.
                          Don't listen to Archibald cause he tries to tell lies to make apple look good

                          The frontend, in this case Clang, analyzes the code (checking for syntactical and logical errors) and creates an intermediate code from it. This code then is given to the backend, which translates the intermediate code into actual machine code.
                          This has the advantages that you can replace the parts individually, for example, Clang is a code analyzer for C/C++, but it can be replaced with a code analyzer for Pascal or any other language, as long as the analyzer creates intermediate code that the backend can parse to machine code. On the other hand you can replace the backend if necessary without changing the frontend.
                          Same can be said for gcc, (gcc, g++, gcj, gfortran etc. thier all gcc) except that gcc is alot more compact and it produces far more refined binaries then clang.

                          Also a nice advantage of this design: You can use the parts apart from another, for example can the Clang frontend be used by IDEs or text editors for syntax highlighting or on-the-fly recognition of syntax and logical errors.
                          What advantage? They did that to gcc along time ago. But gcc has improved that you don't have to remove or replace anything to used for IDEs or text editors.

                          Comment


                          • #14
                            Systemed rulz, My question is not related anything with GCC or which compiler is best. My question is all about the difference between Clang::LLVM and Apple::LLVM-if there is or both are same. please reply only if you can answer anything relevant to the question of this thread.

                            Comment


                            • #15
                              Originally posted by systemd rulez View Post
                              Don't listen to Archibald cause he tries to tell lies to make apple look good



                              Same can be said for gcc, (gcc, g++, gcj, gfortran etc. thier all gcc) except that gcc is alot more compact and it produces far more refined binaries then clang.



                              What advantage? They did that to gcc along time ago. But gcc has improved that you don't have to remove or replace anything to used for IDEs or text editors.
                              Afraid to answer the questions, but spreading lies instead and not even able to read or understand my post properly. That's what I thought of you, lying unethical troll.

                              @Anandh: There is no such thing as Apple::LLVM. Clang is the frontend for LLVM aimed at C-type languages, the development of Clang/LLVM is supported by Apple, maybe therefore the confusion.

                              Comment

                              Working...
                              X