[LLVMdev] Type Legalizer Question.
eli.friedman at gmail.com
Thu Oct 2 10:38:00 CDT 2008
On Thu, Oct 2, 2008 at 7:34 AM, Evan Cheng <evan.cheng at apple.com> wrote:
> On Oct 2, 2008, at 2:01 AM, sanjiv gupta wrote:
>>> So you have a i16 register class which makes the type legal. You can
>>> make loads and stores legal (can you?). But you will have to custom
>>> lower all other i16 operations. This will work, but it requires a lot
>>> of target specific code.
>> True. If we add the i16 reg class we will need to write a lot of
>> target specific code.
>> To avoid that our idea was not to tell the legalizer about the i16
>> regclass and let it expand everything but ignore the pointers.
> You can try just marking all i16 operations, other than load and
> store, as "expand". Would that work?
Won't work; LLVM expects at least some basic operations, like add, to
be legal in legal register types.
More information about the LLVMdev