lowering and non legal types in fast-isel

Fast-isel is not equipped in general to deal with non legal types.

It would seem that an llvm assembler pass run after clang but before llvm could do the lowering though.

Any thoughts?


Fastisel should fallback to usual selector in the cases it cannot
handle. So, for illegal types as well.

I understand that but falling back makes the compilation slower.

I'm wondering what could be done to remove this restriction about fast-isel not being able to
handle non legal types.

You can do everything from legalize it yourself, or just add code to select it and legalize it in your backend during instruction selection. fast-isel now has support for completely avoiding the target independent version of the code.


How would you return a pair of registers then?

For example, If I lower 64 bit integer and materialize a constant, i need to return a pair of 32 registers.

Look at how the calling convention code does it when it legalizes :slight_smile: