[LLVMdev] tablegen multiple inheritance question

reed kotler rkotler at mips.com
Mon Jul 2 16:55:20 PDT 2012


class one {
   int i = 0;
}

class two {
   int i = 1;
}

class multiple: one, two;

This causes the first i to be ignored and the second i to replace it.

This is a useful property if you want to specialize classes.

But I don't know if it was intended to work that way or not.

For example, if you have an instruction class with no patterns, you can 
merge it with one that defines the pattern and maybe other instruction 
components by building a derived class.

Anybody know if this is intended behavior in tablegen?



More information about the llvm-dev mailing list