[llvm-commits] [PATCH] Add a !mul operator

dag at cray.com dag at cray.com
Wed Jan 16 06:51:28 PST 2013


Sean Silva <silvas at purdue.edu> writes:

> On Tue, Jan 15, 2013 at 11:02 PM,  <greened at obbligato.org> wrote:
>> I'm about to send a set of patches that implement a simple memory model
>> for LLVM targets.  One of the things you would like to do with such a
>> model is specify sizes.  Since these sizes tend to be multiples of
>> powers of 2, it's more readable to talk about  12 * 1M, for example
>> rather than 12582912.
>
> `!mul(12, 1M)` isn't particularly readable either.

It's better than 12582912, isn't it?

I'm open to suggestions on how to make this better, but TableGen doesn't
support infix expressions.

                            -David



More information about the llvm-commits mailing list