<div dir="ltr">On Mon, Feb 11, 2013 at 6:32 PM,  <span dir="ltr"><<a href="mailto:nkavv@physics.auth.gr" target="_blank">nkavv@physics.auth.gr</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Justin and all,<br>
<br>
you've mentioned that you used an easy "trick" for defining an infinite register file in the backend.<br></blockquote><div><br></div><div style>The original PTX back-end just didn't perform register allocation.  All registers emitted in the assembly were virtual registers, mapped to a consecutive range.  E.g., %vreg7, %vreg13, and %vreg72 might be emitted as %r0, %r1, %r2.  Just before machine code emission, we scanned the function to determine this range.  Unfortunately, during the switch to the NVPTX back-end, some changes were made in LLVM that prevented this from working in some cases.  Basically, some post-regalloc passes were requiring physical registers and choked when they saw virtual registers.  Because of this, the newer NVPTX back-end uses a large physical register file and performs register allocation.  It's not ideal, but I haven't had the time to identify and fix every case where virtual registers won't work yet.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Does this involve defining a single dummy register, and then adding this dummy reg to each register class? Is anything more needed? I refer to the RegisterInfo.td file, as e.g: llvm-3.0.src/lib/Target/PTX/<u></u>PTXRegisterInfo.td<br>
</blockquote><div><br></div><div style>You can define one dummy register, or one for each register class.  You only need to define the register classes that you support, and the way tablegen generates code leads to compiler warnings about empty arrays if you do not add at least one register to each register class.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I'm (just starting) implementing an LLVM target that bares some similarities to PTX. One of these is the notion of infinite registers, since my target too is a kind of virtual/universal machine.<br></blockquote><div>
<br></div><div style>It's a bit of an uphill battle since there are places in LLVM that make assumptions about targeting a "real" architecture, to varying degrees.  One thing to keep in mind is that the PTX back-end from 3.1 may be a better example to use than the NVPTX back-end in 3.2 and TOT.  The original PTX back-end supported less (and is therefore a bit simpler), and it also doesn't suffer from as much backwards-compatibility cruft.  NVPTX has evolved over many LLVM revisions, and sometimes uses old techniques.  I'm working on getting it up to date.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
My target will not emit object files, so there i would prefer not to define a very larget register file and mess with formats. A bit-level format will at some point be defined but i don't want to fix it from now.<br>

<br>
So your approach seems highly relevant.<br>
<br>
Best regards<br>
Nikolaos Kavvadias<br>
<br>
<br>
Quoting Justin Holewinski <<a href="mailto:justin.holewinski@gmail.com" target="_blank">justin.holewinski@gmail.com</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
configure:12131: $? = 0<br>
configure:12145: result: yes<br>
configure:12157: checking tool compatibility<br>
configure:12180: error: g++|clang++|icc required but not found<br>
<br>
configure can't find a c++ compiler.  On Ubuntu, please install g++ (sudo<br>
apt-get install g++).<br>
<br>
This error should have been written to your console when you ran configure.<br>
<br>
<br>
<br>
On Sun, Feb 10, 2013 at 8:35 AM, Manoj C <<a href="mailto:manoj.chinthala@gmail.com" target="_blank">manoj.chinthala@gmail.com</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
hello sir,<br>
          i am using llvm compiler for my project.i an doing llvm<br>
installation.i followed all the steps in the llvm website but after running<br>
this command<br>
<br>
../llvm/configure --enable-targets=host-only  it executed but it didnt<br>
create any make file in build directory ,only config.log file is appeared<br>
after running this command.<br>
<br>
after running the later command it is showing like this<br>
manoj@ubuntu:~/Desktop/LLVM/<br>
build$ make -j 4<br>
make: *** No targets specified and no makefile found.  Stop<br>
<br>
please help me to finish installation. i am running installation in<br>
ubuntu os.<br>
<br>
here is the config.log file ...<br>
<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
<br>
<br>
</blockquote>
<br><span class="HOEnZb"><font color="#888888">
<br>
--<br>
<br>
Thanks,<br>
<br>
Justin Holewinski<br>
<br>
</font></span></blockquote>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><br><div>Thanks,</div><div><br></div><div>Justin Holewinski</div>
</div></div>