[llvm-dev] Is the CppBackend still supported?
James Y Knight via llvm-dev
llvm-dev at lists.llvm.org
Mon May 23 07:01:30 PDT 2016
There was, a long time ago, a backend that actually targetted C. It was
deleted in 2012 at r153307.
On Sun, May 22, 2016 at 8:37 AM, Stefan Gränitz <stefan.graenitz at gmail.com>
wrote:
> after realizing that it wasn't actually a backend that targetted c++
> (which might be useful)
>
> Exact same thing just happened to me.. it's not obvious, especially when
> reading the llc info:
>
> $ llc -version
> Registered Targets:
> arm - ARM
> arm64 - ARM64 (little endian)
> cpp - C++ backend
> x86 - 32-bit X86: Pentium-Pro and above
> x86-64 - 64-bit X86: EM64T and AMD64
> ...
>
> * If not delete it, then at least adjust the description? E.g. "LLVM C++
> API code" following http://ellcc.org/demo/ ? Could also the name change
> to "cppapi"?
>
> * Has there ever been an attempt to implement a real C++ Backend? Without
> having done research in that direction - shouldn't that be quite
> straightforward? Anyone aware of technical difficulties?
>
> Cheers,
> Stefan
>
> -- https://about.me/stefan.graenitz
>
>
> Am 03.05.16 um 22:23 schrieb James Y Knight via llvm-dev:
>
> Yes, it's quite obviously dead and should be deleted.
>
> When I brought this up last time -- after realizing that it wasn't
> actually a backend that targetted c++ (which might be useful), but rather
> just something that emitted IR by calling llvm C++ functions (which really
> isn't IMO) -- someone also pointed out that it also really ought to be
> using IRBuilder...if anyone cared about it.
>
>
> On Tue, May 3, 2016 at 4:14 PM, Sean Silva via llvm-dev <
> <llvm-dev at lists.llvm.org>llvm-dev at lists.llvm.org> wrote:
>
>> AFAICT it is dead.
>>
>> On Tue, May 3, 2016 at 4:04 AM, Stanislav Manilov via llvm-dev <
>> llvm-dev at lists.llvm.org> wrote:
>>
>>> Hello,
>>>
>>> I was trying to compile a simple program with the CppBackend like so:
>>>
>>> $ clang str_arg.c -emit-llvm -S
>>> $ llc -march=cpp str_arg.ll
>>>
>>> It produces a file `str_arg.cpp` as expected, however it doesn't seem
>>> that the resulting file is correct. For once, it includes
>>> `<llvm/Analysis/Verifier.h>` which seems to have been moved to
>>> `llvm/IR/Verifier.h` as far back as 2013.
>>>
>>> My question is this: is the CppBackend supposed to work? If so, what am
>>> I missing?
>>>
>>> Listing of str_arg.c:
>>>
>>> #include <stdio.h>
>>>
>>> void i(unsigned index, char *string) {
>>> printf("%d %s\n", index, string);
>>> }
>>>
>>> int main() {
>>> i(10, "foo");
>>> return 0;
>>> }
>>>
>>> clang version:
>>>
>>> clang version 3.7.1 ( <http://llvm.org/git/clang.git>
>>> http://llvm.org/git/clang.git 0dbefa1b83eb90f7a06b5df5df254ce32be3db4b)
>>> (http://llvm.org/git/llvm.git 33c352b3eda89abc24e7511d9045fa2e499a42e3)
>>> Target: x86_64-unknown-linux-gnu
>>> Thread model: posix
>>>
>>> llc version:
>>>
>>> LLVM ( <http://llvm.org/>http://llvm.org/):
>>> LLVM version 3.7.1
>>> Optimized build.
>>> Built Apr 4 2016 (15:04:44).
>>> Default target: x86_64-unknown-linux-gnu
>>> Host CPU: ivybridge
>>>
>>> Registered Targets:
>>> aarch64 - AArch64 (little endian)
>>> aarch64_be - AArch64 (big endian)
>>> amdgcn - AMD GCN GPUs
>>> arm - ARM
>>> arm64 - ARM64 (little endian)
>>> armeb - ARM (big endian)
>>> bpf - BPF (host endian)
>>> bpfeb - BPF (big endian)
>>> bpfel - BPF (little endian)
>>> cpp - C++ backend
>>> hexagon - Hexagon
>>> mips - Mips
>>> mips64 - Mips64 [experimental]
>>> mips64el - Mips64el [experimental]
>>> mipsel - Mipsel
>>> msp430 - MSP430 [experimental]
>>> nvptx - NVIDIA PTX 32-bit
>>> nvptx64 - NVIDIA PTX 64-bit
>>> ppc32 - PowerPC 32
>>> ppc64 - PowerPC 64
>>> ppc64le - PowerPC 64 LE
>>> r600 - AMD GPUs HD2XXX-HD6XXX
>>> sparc - Sparc
>>> sparcel - Sparc LE
>>> sparcv9 - Sparc V9
>>> systemz - SystemZ
>>> thumb - Thumb
>>> thumbeb - Thumb (big endian)
>>> x86 - 32-bit X86: Pentium-Pro and above
>>> x86-64 - 64-bit X86: EM64T and AMD64
>>> xcore - XCore
>>>
>>> Kind regards,
>>> - Stan
>>>
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> llvm-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>>
>>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> llvm-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>
>>
>
>
> _______________________________________________
> LLVM Developers mailing listllvm-dev at lists.llvm.orghttp://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/20160523/a943c473/attachment-0001.html>
More information about the llvm-dev
mailing list