please review - initial putback for implementing functionality for mips16/nomips16 attributes

Bill Wendling wendling at apple.com
Thu Mar 14 11:08:10 PDT 2013


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

On Mar 14, 2013, at 12:39 AM, Reed Kotler <rkotler at mips.com> wrote:

> 
> 
> 
> 
> 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>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mips16_changer.txt
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130314/b30fbed6/attachment.txt>


More information about the llvm-commits mailing list