[Hexagon] Replace instruction definitions with auto-generated ones


[Hexagon] Replace instruction definitions with auto-generated ones


kparzyszFeb 10 2017, 7:33 AM
rL294752: Move some error handling down to MCStreamer.

Event Timeline

asb added a subscriber: asb.Feb 11 2017, 10:29 AM

Hi Krzysztof - is the tool that generated these instruction definitions open source, or at least available somewhere? I know that given Hexagon's current development pattern this is more of a theoretical concern than a practical one, but it does seem a barrier to people preparing patches for these .td files.

Hi Alex. When you think of it as a barrier, what do you have in mind? The file that could potentially have any changes is the one that defines instructions (i.e. HexagonDepInstrInfo.td), the other ones are much less likely to ever need modifications. The instruction definition file is actually very simple in its structure---it defines each instruction separately, without using multiclasses, or other cryptic TableGen techniques. In terms of ease of modification it is probably more accessible than the corresponding files from other targets.

asb added a comment.Feb 13 2017, 9:40 PM

I think that, as you point out, it will depend on what sort of changes you're making. The use of multiclasses etc do sometimes make it more difficult to jump in and make a small change, but also give you power to make changes across a large number of definitions at once.

Suppose an autoconf-generated configure.sh script is checked in. Although sometimes it might be easier to edit that generated file than to try to understand autoconf, other times it might involve a lot of wasted time. Plus at some point, someone will have to ensure the change is made to the input file so the change isn't lost next time autoconf is run.

An argument could certainly be made that there is little reason to expect people will want to further edit HexagonDepInstrInfo.td.