Yuxi Chen via llvm-dev
2016-Jul-21 21:02 UTC
[llvm-dev] difference between llvm-gcc and clang
Hi everyone, Both llvm-gcc and clang would use llvm as its backend. Dose everyone know the difference of bitcode generated by llvm-gcc and llvm? Or actually they are same, like if I use the same compiler options, like -O4. Any help is appreciated. Best, Yuxi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160721/0cc27757/attachment.html>
Tim Northover via llvm-dev
2016-Jul-21 21:11 UTC
[llvm-dev] difference between llvm-gcc and clang
On 21 July 2016 at 14:02, Yuxi Chen via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Both llvm-gcc and clang would use llvm as its backend. Dose everyone know > the difference of bitcode generated by llvm-gcc and llvm?llvm-gcc used to be a compiler that used the GCC front-end (C parser etc) to generate LLVM IR and then used the LLVM backends. It's a long-abandoned project now though (not updated past GCC 4.2), with all effort going into Clang (or GCC proper!). You're only even likely to find traces of it on macOS, where /usr/bin/llvm-gcc exists for backwards-compatibility reasons. However, that's not really llvm-gcc any more, it's just another way to run Clang.> Or actually they are same, like if I use the same compiler options, like -O4.You shouldn't be using -O4. At one point I think it was a weird way to trigger LTO (now you'd use -flto), but it's now only accepted for compatibility and means the same thing as -O3. It gives you a warning if you try to use it. Cheers. Tim.
Bruce Hoult via llvm-dev
2016-Jul-21 21:12 UTC
[llvm-dev] difference between llvm-gcc and clang
llvm-gcc is obsolete, It was only an intermediate step to where we are today. On Fri, Jul 22, 2016 at 9:02 AM, Yuxi Chen via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi everyone, > > Both llvm-gcc and clang would use llvm as its backend. Dose everyone know > the difference of bitcode generated by llvm-gcc and llvm? Or actually they > are same, like if I use the same compiler options, like -O4. > > Any help is appreciated. > > Best, > Yuxi > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160722/b94121f9/attachment.html>
Yuxi Chen via llvm-dev
2016-Jul-23 00:20 UTC
[llvm-dev] difference between llvm-gcc and clang
Hi Tim, Thanks for your reply. I know O4 is same as O3 now. I am wondering the bitcodes generated by llvm-gcc and clang are same, or almost same, I mean they are almost same, but maybe some newly-created optimization would exert impact. Best, Yuxi ________________________________________ From: Tim Northover [t.p.northover at gmail.com] Sent: Thursday, July 21, 2016 4:11 PM To: Yuxi Chen Cc: llvmdev at cs.uiuc.edu; llvm-dev at lists.llvm.org; llvmdev-bounces at cs.uiuc.edu Subject: Re: [llvm-dev] difference between llvm-gcc and clang On 21 July 2016 at 14:02, Yuxi Chen via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Both llvm-gcc and clang would use llvm as its backend. Dose everyone know > the difference of bitcode generated by llvm-gcc and llvm?llvm-gcc used to be a compiler that used the GCC front-end (C parser etc) to generate LLVM IR and then used the LLVM backends. It's a long-abandoned project now though (not updated past GCC 4.2), with all effort going into Clang (or GCC proper!). You're only even likely to find traces of it on macOS, where /usr/bin/llvm-gcc exists for backwards-compatibility reasons. However, that's not really llvm-gcc any more, it's just another way to run Clang.> Or actually they are same, like if I use the same compiler options, like -O4.You shouldn't be using -O4. At one point I think it was a weird way to trigger LTO (now you'd use -flto), but it's now only accepted for compatibility and means the same thing as -O3. It gives you a warning if you try to use it. Cheers. Tim.
Yuxi Chen via llvm-dev
2016-Jul-23 00:20 UTC
[llvm-dev] difference between llvm-gcc and clang
Thanks for your reply. Yuxi ________________________________ From: bruce.hoult at gmail.com [bruce.hoult at gmail.com] on behalf of Bruce Hoult [bruce at hoult.org] Sent: Thursday, July 21, 2016 4:12 PM To: Yuxi Chen Cc: llvmdev at cs.uiuc.edu; llvm-dev at lists.llvm.org; llvmdev-bounces at cs.uiuc.edu Subject: Re: [llvm-dev] difference between llvm-gcc and clang llvm-gcc is obsolete, It was only an intermediate step to where we are today. On Fri, Jul 22, 2016 at 9:02 AM, Yuxi Chen via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: Hi everyone, Both llvm-gcc and clang would use llvm as its backend. Dose everyone know the difference of bitcode generated by llvm-gcc and llvm? Or actually they are same, like if I use the same compiler options, like -O4. Any help is appreciated. Best, Yuxi _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160723/377dfe26/attachment.html>