<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 12/21/2015 07:40 PM, Rail Shafigulin
via llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:CAOLNbFbfxWGvgF4h64L3i-5-5y8fPTnw0OM1oG8XiqJ3Gpm7dA@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">Does anyone know if there is a way to reserve a
register set not to be used by a compiler? For example there are
64 available registers and the compiler can use only registers
0-31 and 40-45, and the others should be left alone.
<div><br>
</div>
<div>I know that the simplest solution is to simply change
number registers in one of the .td files, but what I'm looking
is an option to use at run time. I need this to research
various register combinations. Recompiling and running tests
takes some time. If I could compile my code with say 128
registers and thn tell compiler to use only a certain set (say
0-32) at run time then this would significantly speed up my
testing. I would be able to see what the code is doing for the
same test with a 32 registers vs 64 vs 96 vs any number up to
128. </div>
<div><br>
</div>
<div>Does anyone know if there is a way to do it? Any help is
appreciated.<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>Rail Shafigulin<br>
</div>
Software Engineer <br>
Esencia Technologies<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>
You can override TargetRegisterInfo::getReservedRegs and reserve any
registers you do not want allocated.<br>
<br>
-Matt<br>
</body>
</html>