[PATCH 1/2] TableGen: Generate a function for getting operand indices based on their defined names

Tom Stellard tom at stellard.net
Thu Jun 13 08:16:24 PDT 2013


On Thu, Jun 13, 2013 at 07:41:17AM -0700, Jakob Stoklund Olesen wrote:
> 
> On Jun 7, 2013, at 4:30 PM, Tom Stellard <tom at stellard.net> wrote:
> 
> > On Fri, Jun 07, 2013 at 09:48:55AM -0700, Jakob Stoklund Olesen wrote:
> >> 
> >> The function you’re generating looks like it could get really big. Please use some form of table compression to reduce the size.
> >> 
> > 
> > Hi Jakob,
> > 
> > Here are updated patches that incorporate your comments.
> > 
> > -Tom
> > <0001-TableGen-Generate-a-function-for-getting-operand-ind.patch><0002-R600-Use-new-getNamedOperandIdx-function-generated-b.patch>
> 
> Tom, please include code size numbers, now that we are talking about code size.
> 
> From a quick look at your code, those tables still look pretty big to me.
>

The codesize for libLLVMR600CodeGen.a:

Current ToT:                                 1,576,986
With new table (Patch 1):                    1,610,342 (+33,356) (+2.1%)
New table + old table removed (Patch 1,2)*   1,605,176 (+28,190) (+1.8%)

*The R600 backend had a similar operand table that can be removed with
these patches.

Other targets are not affected since the table is guarded by ifdefs.

What is an acceptable amount of code size increase?

I think I may be able to reduce the table size by adding a
ComputeOperandTable field to the instructions and then only including in the
table the instructions with this field set.  What do you think about this?

-Tom




More information about the llvm-commits mailing list