<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>
<blockquote type="cite">after realizing that it wasn't actually a
backend that targetted c++ (which might be useful)</blockquote>
</p>
Exact same thing just happened to me.. it's not obvious, especially
when reading the llc info:<br>
<tt><br>
$ llc -version</tt><tt><br>
</tt><tt> Registered Targets:</tt><tt><br>
arm - ARM<br>
arm64 - ARM64 (little endian)<br>
cpp - C++ backend<br>
x86 - 32-bit X86: Pentium-Pro and above<br>
x86-64 - 64-bit X86: EM64T and AMD64</tt><tt><br>
</tt><tt> ...</tt><br>
<br>
* If not delete it, then at least adjust the description? E.g. "LLVM
C++ API code" following <a class="moz-txt-link-freetext" href="http://ellcc.org/demo/">http://ellcc.org/demo/</a> ? Could also the name
change to "cppapi"?<br>
<br>
* 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?<br>
<br>
Cheers,<br>
Stefan<br>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="https://about.me/stefan.graenitz">https://about.me/stefan.graenitz</a></pre>
<br>
<div class="moz-cite-prefix">Am 03.05.16 um 22:23 schrieb James Y
Knight via llvm-dev:<br>
</div>
<blockquote
cite="mid:CAA2zVHqfN7QLw87wF4+2cam0nL1Co5rO+BdfOqronkEBA09g2Q@mail.gmail.com"
type="cite">
<div dir="ltr">Yes, it's quite obviously dead and should be
deleted.
<div><br>
</div>
<div>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.
<div><br>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, May 3, 2016 at 4:14
PM, Sean Silva via llvm-dev <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:llvm-dev@lists.llvm.org"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">AFAICT it is dead.</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">
<div>
<div class="h5">On Tue, May 3, 2016 at 4:04
AM, Stanislav Manilov via llvm-dev <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:llvm-dev@lists.llvm.org"
target="_blank">llvm-dev@lists.llvm.org</a>></span>
wrote:<br>
</div>
</div>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">
<div>
<div class="h5">
<div dir="ltr">Hello,
<div><br>
</div>
<div>I was trying to compile a simple
program with the CppBackend like so:</div>
<div><br>
</div>
<div>$ clang str_arg.c -emit-llvm -S</div>
<div>$ llc -march=cpp str_arg.ll</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>My question is this: is the
CppBackend supposed to work? If so,
what am I missing?</div>
<div><br>
</div>
<div>Listing of str_arg.c:</div>
<div><br>
</div>
<div>
<div> #include <stdio.h></div>
<div> </div>
<div> void i(unsigned index, char
*string) {</div>
<div> printf("%d %s\n", index,
string);</div>
<div> }</div>
<div> <br>
</div>
<div> int main() {</div>
<div> i(10, "foo");</div>
<div> return 0;</div>
<div> }</div>
</div>
<div><br>
</div>
<div>clang version:</div>
<div><br>
</div>
<div>
<div> clang version 3.7.1 (<a
moz-do-not-send="true"
href="http://llvm.org/git/clang.git"
target="_blank"><a class="moz-txt-link-freetext" href="http://llvm.org/git/clang.git">http://llvm.org/git/clang.git</a></a>
0dbefa1b83eb90f7a06b5df5df254ce32be3db4b) (<a moz-do-not-send="true"
href="http://llvm.org/git/llvm.git"
target="_blank">http://llvm.org/git/llvm.git</a>
33c352b3eda89abc24e7511d9045fa2e499a42e3)</div>
<div> Target:
x86_64-unknown-linux-gnu</div>
<div> Thread model: posix</div>
</div>
<div><br>
</div>
<div>llc version:</div>
<div><br>
</div>
<div>
<div> LLVM (<a
moz-do-not-send="true"
href="http://llvm.org/"
target="_blank"><a class="moz-txt-link-freetext" href="http://llvm.org/">http://llvm.org/</a></a>):</div>
<div> LLVM version 3.7.1</div>
<div> Optimized build.</div>
<div> Built Apr 4 2016
(15:04:44).</div>
<div> Default target:
x86_64-unknown-linux-gnu</div>
<div> Host CPU: ivybridge</div>
<div> <br>
</div>
<div> Registered Targets:</div>
<div> aarch64 - AArch64
(little endian)</div>
<div> aarch64_be - AArch64
(big endian)</div>
<div> amdgcn - AMD GCN
GPUs</div>
<div> arm - ARM</div>
<div> arm64 - ARM64
(little endian)</div>
<div> armeb - ARM (big
endian)</div>
<div> bpf - BPF (host
endian)</div>
<div> bpfeb - BPF (big
endian)</div>
<div> bpfel - BPF
(little endian)</div>
<div> cpp - C++
backend</div>
<div> hexagon - Hexagon</div>
<div> mips - Mips</div>
<div> mips64 - Mips64
[experimental]</div>
<div> mips64el - Mips64el
[experimental]</div>
<div> mipsel - Mipsel</div>
<div> msp430 - MSP430
[experimental]</div>
<div> nvptx - NVIDIA PTX
32-bit</div>
<div> nvptx64 - NVIDIA PTX
64-bit</div>
<div> ppc32 - PowerPC 32</div>
<div> ppc64 - PowerPC 64</div>
<div> ppc64le - PowerPC 64
LE</div>
<div> r600 - AMD GPUs
HD2XXX-HD6XXX</div>
<div> sparc - Sparc</div>
<div> sparcel - Sparc LE</div>
<div> sparcv9 - Sparc V9</div>
<div> systemz - SystemZ</div>
<div> thumb - Thumb</div>
<div> thumbeb - Thumb (big
endian)</div>
<div> x86 - 32-bit
X86: Pentium-Pro and above</div>
<div> x86-64 - 64-bit
X86: EM64T and AMD64</div>
<div> xcore - XCore</div>
</div>
<div><br>
</div>
<div>Kind regards,</div>
<div> - Stan</div>
<div><br>
</div>
</div>
<br>
</div>
</div>
<span class="">_______________________________________________<br>
LLVM Developers mailing list<br>
<a moz-do-not-send="true"
href="mailto:llvm-dev@lists.llvm.org"
target="_blank">llvm-dev@lists.llvm.org</a><br>
<a moz-do-not-send="true"
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev"
rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
</span></blockquote>
</div>
<br>
</div>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a moz-do-not-send="true"
href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a moz-do-not-send="true"
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev"
rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
</body>
</html>