[PATCH] [Tablegen] Attempt to add support for patterns containing nodes with multiple results.

hfinkel at anl.gov hfinkel at anl.gov
Wed Mar 18 10:11:44 PDT 2015


In http://reviews.llvm.org/D8373#142779, @craig.topper wrote:

> But it's not really ignored. At the end of isel we have an SDNode with 2 results and those results need types.
>
> Today that IMPLICIT_DEF got a type of i1 because this code triggered
>
>   if (!IterateInference && InferredAllPatternTypes &&
>       !InferredAllResultTypes)
>     IterateInference =
>         ForceArbitraryInstResultType(Result.getTree(0), Result);
>   
>
> but based on the comment above that code I don't think this case was what that code was intended for. I guess this part of that comment applies for this case "output patterns should have register classes, not MVTs". Maybe I should force an arbitrary result type on extra results that don't show up in the original pattern?


Yes, I actually think that would be better. While we do need a type at the SDAG level, all that really matters in the end is that we end up with a register from the correct register class. There's no need for the user to pick a type for a result that is not really used aside from its affect during register allocation.


http://reviews.llvm.org/D8373

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list