[PATCH] D49598: [SystemZ] Use tablegen loops in SchedModels

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 23 08:11:57 PDT 2018


jonpa added a comment.

In https://reviews.llvm.org/D49598#1171580, @javed.absar wrote:

> In https://reviews.llvm.org/D49598#1169672, @jonpa wrote:
>
> > Thanks for helping me out with TableGen coding, Javed!
> >
> > > But you have LSU, LSU2, LSU3, ... . The first one would have to change to LSU1
> >
> > I have sofar tried to avoid LSU1, FXa1, so I did
> >
> >   foreach Num = ["", "2", "3", "4", "5"]
> >
> >
> > , which seems to work. I would think this is ok, or? Only drawback here is that now there are in the subtarget files a separate definition for the "implicit 1\
> >  " in some places. Not sure which is better...
> >
> > Compared to trunk, there are in the tablegen file some extra variants, like FXa5 in z14 file, but that did not seem to matter - it seems that the produced cla\
> >  ng binary is identical to that of trunk.
> >
> > Any suggestions most welcome!
>
>
> Hi Jonas:
>
> To avoid unnecessary defs (for dis-continous ranges), you can use range list like this:
>
> foreach L = {1-3,6-8} in {
>
>   def "WLat"#L : SchedWrite;
>
> }
>
> I tried it out and it works.


Thanks, Javed. Still, it seemed that the clang binary was identically which should mean that any unused entries are simply ignored and left out from the generated tables. So perhaps using combined ranges per above is mostly cosmetical?


https://reviews.llvm.org/D49598





More information about the llvm-commits mailing list