<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 03/14/2013 11:08 AM, Bill Wendling
wrote:<br>
</div>
<blockquote
cite="mid:FA6D7E67-E898-46FF-B758-DE4D380218BF@apple.com"
type="cite">
<pre wrap="">As for whether the method should exist, I'll let Jakob comment.
A few stylistic changes:
You should use:
AvailableRegClasses.clear()
instead of:
while (!AvailableRegClasses.empty())
AvailableRegClasses.pop_back();
You might also want to do this:
memset(RegClassForVT, 0, array_lengthof(RegClassForVT));
-bw</pre>
</blockquote>
<br>
Good points. I'll use clear. <br>
<br>
It seems that if you clear the register classes, you can do a <br>
<pre wrap=""><big>computeRegisterProperties() with impunity after adding new register classes.</big>
That is the main issue between switching back and forth between mips16 and mips32.
The rest is already controlled by predicates in the td files.
</pre>
<blockquote
cite="mid:FA6D7E67-E898-46FF-B758-DE4D380218BF@apple.com"
type="cite">
<pre wrap="">
On Mar 14, 2013, at 12:39 AM, Reed Kotler <a class="moz-txt-link-rfc2396E" href="mailto:rkotler@mips.com"><rkotler@mips.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">
I added one method which clears the list of register classes.
Then there is a change to mips16 code which simulates switching from
mips32 to mips16 mode in the same module. It seems to work fine in that
I can run this version of llvm for mips16 and it works identical to the
one without this code. Beyond the "make check" I have run test-suite
against this version.
We could just putback the change to include/llvm/Target/TargetLowering.h
but by adding the change to
lib/Target/Mips/Mips16ISelLowering.cpp
which is a nop for the mips16 compiler, we are able to test that this
feature works and that doing things this way allows one to change
register sets on a per function basis.
The idea here is to add two of the mips32 register sets (including float
point which should have a big effect on things) and then
computeRegisterProperties() and then revert things to mips16 only
registers and call
computeRegisterProperties() again.
I have several more patches I will need to complete this mips16/nomips16
feature but it's easier to do this in pieces.
In the end I will remove this testing code from
lib/Target/Mips/Mips16ISelLowering.cpp and create a real test case for
this. For now this test code shows how this feature can work for other
ports like Arm than have a similar need.
<mips16_changer.txt>
</pre>
</blockquote>
</blockquote>
<br>
</body>
</html>