[llvm-commits] [llvm] r77499 - /llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
Chris Lattner
clattner at apple.com
Wed Jul 29 17:29:07 PDT 2009
On Jul 29, 2009, at 1:10 PM, David Greene wrote:
> Author: greened
> Date: Wed Jul 29 15:10:24 2009
> New Revision: 77499
>
> URL: http://llvm.org/viewvc/llvm-project?rev=77499&view=rev
> Log:
>
> Re-enable comment and operand padding.
Okay, lets go through this again now that I have a better idea of what
you're trying to do.
>
>
> + /// 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.
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".
This would eliminate a ton of this code, a bunch of complexity, and
make it much more easy to reason about this. This also gives target
authors a very simple and obvious way to control the formatting of
their machine code.
What do you think?
-Chris
More information about the llvm-commits
mailing list