[llvm-commits] [llvm] r77499 - /llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp

David A. Greene greened at obbligato.org
Thu Jul 30 11:33:35 PDT 2009


On Wednesday 29 July 2009 19:29, Chris Lattner wrote:

> > +    /// MAX_GROUP_NESTING_LEVEL - The maximum number of group nesting
> > +    /// levels we ever expect to see in an asm operand.
> > +    static const int MAX_GROUP_NESTING_LEVEL = 10;
> > +
> > +    /// GroupLevel - The level of nesting of the current operand
> > +    /// group, such as [reg + (reg + offset)].  -1 means we are not
> > in
> > +    /// a group.
> > +    int GroupLevel;
>
> Again, the groups.  Why are you doing this?  It appears that you are
> trying to infer from the asmstring that you should not be padding
> operands out when they are parenthesized or square-bracketized etc.

Correct.

> I don't see why tblgen should be having to infer this at this level.
> Why not just make tblgen have an extremely trivial heuristic:
>
>    "If there is a \t in the asm string, pad it to a column".

Because then we'd have to go modify all the .td files to insert \t.  And
not everyone wants this kind of padding.  A tab is a bit much for some folks
and that's completely understandable.

                               -Dave




More information about the llvm-commits mailing list