[LLVMdev] Adding a new ARM RegisterClass

Tim Northover t.p.northover at gmail.com
Tue Jun 25 07:32:50 PDT 2013


Hi Daniel,

> So, since I’m fairly new to LLVM, my question is, am I approaching this
> correctly? Is adding a new RegisterClass something that is highly
> discouraged?

I'd say it's OK. There are often good reasons to add a register class
and that's far better than hacking regalloc for particular
instructions. We don't want to do it frivolously, but that applies to
anything really.

> Should explicit references to dynamically generated classes be done?

I'm neutral on that, personally. I'd say that if the dynamically
generated name makes sense it's OK.

But perhaps the best solution to this particular problem *would* be
adding an rGPRPair RegisterClass and using that instead. It would
probably make the code clearer and the class exists anyway.

Cheers.

Tim.




More information about the llvm-dev mailing list