[PATCH] Implement floating point to integer conversion in mips fast-isel

Daniel Sanders Daniel.Sanders at imgtec.com
Wed Oct 8 09:17:30 PDT 2014


> > Comment at: lib/Target/Mips/MipsFastISel.cpp:51-53
> > @@ -50,3 +50,5 @@
> >     bool TargetSupported;
> > -
> > +  bool UnsupportedFPMode; // To allow fast-isel to proceed and just not
> handle
> > +  // floating point but not reject doing fast-isel in other
> > +  // situations
> >   public:
> > ----------------
> > This comment needs some clarification. It's only 64-bit FPU's you're
> guarding against but the comment suggests that it's floating point in general.
> >
> > Also, indentation.
> I handled it this way because what the patch is really doing is to allow
> fast-isel to work even in the context
> of an unsupported fp mode; i.e. to let all other code be handled by
> fast-isel and not disable the whole pass for that reason.
> 
> At this time, isFP64Bit is the only such mode but there can be others in
> the future and the patch is not specific even to
> fp64Bit but to the general problem of an unsupported fp mode.
> 
> The plan is even to support this new mode very soon.

I'm only commenting on the confusing wording of the comment. Perhaps it should say something like 'Used to disable floating point operations when in an unsupported FPU mode without affecting other operations'. Alternatively, we could delete the comment since 'UnsupportedFPMode' is quite self-explanatory.




More information about the llvm-commits mailing list