[llvm-dev] zero-size arrays

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 17 10:18:13 PDT 2018


Hi,

On Wed, 17 Oct 2018 at 10:07, m m via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> My understanding is that those arrays are auto-generated from the .td files but I do not know why they are empty.

I think you populate them by instantiating SubtargetFeature in your
.td files. Most real targets have at least some variation in permitted
configurations that these represent: variation in the instruction set
the CPU supports or which instructions are fast on a particular CPU,
or even soft vs hard-float.

If yours doesn't have such variation yet you might need to add a dummy
feature for now. It'll probably also need to be put into ABCSubtarget,
but the new and interesting error messages should guide you on that
front.

Cheers.

Tim.


More information about the llvm-dev mailing list