<div class="gmail_quote">On Wed, Sep 28, 2011 at 2:07 PM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com">rjmccall@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sep 28, 2011, at 1:40 PM, Anton Korobeynikov wrote:<br>
>> We can, but they were quite easy to lay out by hand. It's not clear to me<br>
>> that its worth the effort to teach tablegen about them unless we want to<br>
>> move all the architectures over, and expect the whole thing to grow a lot...<br>
> Well... we can just autogenerate all those switches, etc. and reduce<br>
</div>> the "weight" of the source file….<br>
<br>
On general principle, please try macro-metaprogramming before adding yet another tblgen mode.  If it's not worth a macro-metaprogram, it's definitely not worth tblgen.</blockquote></div><br><div>I completely agree. Currently, I don't think it's worth that. If I go in to modify a bunch of stuff again, I could look at this, but I'm not sure it will really help much.</div>
<div><br></div><div>In particular, the switches are hard to hide. They include a lot of one-off and quirky behavior in order to correctly model GCC's behavior on old chips. (For example, see the k6, k6-2, and k6-3 silliness...)</div>