<div dir="ltr">I used your code and it works fine. Once I increase the number of variable it uses the extra registers which I added. I have another problem.<div><br></div><div>To generate the assembly file for new ARM machine with extra registers,I follow these steps:</div>

<div><br></div><div>1) clang -emit-llvm main.ll main.c</div><div>2) llc -march=arm -o main.s main.bc</div><div><br></div><div>In this case it doesn't use the registers which I added to the architecture. Do you have any ideas?</div>

<div><br></div><div>As far as I know, the generated ll code doesn't depend on the target (right?), but I see this line in the ll code : target triple = "x86_64-unknown-linux-gnu"</div><div>Could it be the problem?</div>

<div><br></div><div>I really appreciate if anybody can help.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">Best Regards,<br>

A. Yazdanbakhsh<br><br><span style="color:rgb(102,102,102)">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>></span><br style="color:rgb(102,102,102)">

<br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">PhD. Student</span><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">School of Electrical and Computer Engineering</span><br style="color:rgb(102,102,102)">

<span style="color:rgb(102,102,102)">University of Wisconsin-Madison</span><span style="color:rgb(102,102,102)"></span><span style="color:rgb(102,102,102)"></span><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)">E-mail:     </span><a style="color:rgb(102,102,102)" href="mailto:yazdanbakhsh@wisc.edu" target="_blank">yazdanbakhsh@wisc.edu</a><br>

<br><br style="color:rgb(102,102,102)"><span style="color:rgb(102,102,102)"><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</span></div>

</div><br>
<br><br><div class="gmail_quote">On Sun, Dec 9, 2012 at 4:17 PM, Tim Northover <span dir="ltr"><<a href="mailto:t.p.northover@gmail.com" target="_blank">t.p.northover@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Sun, Dec 9, 2012 at 7:48 PM, Evan Cheng <<a href="mailto:evan.cheng@apple.com">evan.cheng@apple.com</a>> wrote:<br>
> Sound like you are not enabling optimization. Try with -O3.<br>
<br>
</div>Ah, of course! I'd forgotten about the extra allocas produced by clang.<br>
<br>
To expand a little, the spills you're seeing are (probably)<br>
specifically created by clang (it creates a shadow variable for each<br>
local with alloca). "llc" on its own can't get rid of these, so you'll<br>
either want to give clang "-O3" or run the LLVM bitcode through "opt"<br>
before "llc".<br>
<span class="HOEnZb"><font color="#888888"><br>
Tim.<br>
</font></span></blockquote></div><br></div>