Instead of instantiating the MipsFastISel class and checking if the
target is supported in the overriden methods, we should perform that
check before creating the class. This allows us to enable FastISel *only*
for targets that truly support it, ie. MIPS32 to MIPS32R5.
Details
Diff Detail
Event Timeline
Comments inlined.
lib/Target/Mips/MipsISelLowering.cpp | ||
---|---|---|
464–465 | I find this comment strange given the block beneath. I think this should be: // FastISel is supported only for [MIPS32,MIPS32R5] ISAs. bool UseFastISel = TM.Options.EnableFastISel && Subtarget.hasMips32() && !Subtarget.hasMips32r6()); | |
467–469 | With my comment above, I think this should check for inMicroMips(), with the comment reflecting that we don't support compressed instruction sets. Aside, I've barely looked but is mips16e rejected at a higher level for FastISel? |
LTGM, with one comment nit, inlined.
lib/Target/Mips/MipsISelLowering.cpp | ||
---|---|---|
464–465 | My request here is that the comment on what ISAs we support doesn't mention MIPS32R6. So that comment should be: // We support only the standard encoding [MIPS32,MIPS32R5] ISAs. Otherwise the comments don't quite match the code. IMHO. |
lib/Target/Mips/MipsISelLowering.cpp | ||
---|---|---|
464–465 | Sorry, I didn't understand you initial comment. I updated the review before committing the patch and replaced the MIPS32R6 bit with the MIPS32R5 ISA. |
I find this comment strange given the block beneath. I think this should be: