[LLVMdev] TableGen related question for the Hexagon backend

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Aug 3 10:02:06 PDT 2012


On Aug 2, 2012, at 11:24 PM, Sebastian Pop <spop at codeaurora.org> wrote:

> On Thu, Aug 2, 2012 at 5:23 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>> The problem is, this isn't really any better than having a large switch statement. You just moved the table into the .td file.
>> 
>> You should be taking advantage of the instruction multiclasses so you don't have to maintain a full table of opcodes.
> 
> We wouldn't need to "maintain" this table of opcodes, as this table is
> extracted from a higher level representation of the instruction set.
> In particular, this table would not need to be modified at all for the
> existing supported processors, and any new version of processors will
> have its table automatically generated by us.
> 
> Why wouldn't it be acceptable for the *.td files defining the instructions
> and the relations between them to be generated and not written by hand?

Because it defeats the purpose of open source.

It would be impossible to improve the way Hexagon models instructions without changing these tables, and if they are just intermediate build products generated from secret 'real' sources, it is much more difficult.

This is supposed to be a collaboration that makes LLVM better for everybody. If you are just working around deficiencies in LLVM's tools instead of trying to improve them, there is really no point in sharing that work.

/jakob




More information about the llvm-dev mailing list