<p dir="ltr"><br>
On Sep 4, 2014 10:45 PM, "Matt Turner" <<a href="mailto:mattst88@gmail.com">mattst88@gmail.com</a>> wrote:<br>
><br>
> On Thu, Sep 4, 2014 at 10:19 PM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
> > This will, eventually, allow us to manage execution widths of instructions<br>
> > in a much more natural way from the fs_visitor level.<br>
> ><br>
> > Signed-off-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>><br>
><br>
> Adding a width field to fs_inst might be fine, but I don't think I<br>
> like adding the parameter to every fs_inst constructor. It seems like<br>
> it's something that's rarely going to be non-default. With other<br>
> things like that we just set them after creating the instruction.</p>
<p dir="ltr">Unfortunately, there's no good way to set a default in fs_inst when the constructor is unaware of the fs_visitor. The default is provided by the fs_visitor::emit functions. This is admittedly a little painful for blorp, but it works out OK for fs_visitor.</p>
<p dir="ltr">I tried making a value of 0 mean "choose a default for me" but that didn't work well either. The only other real option would be to guess based on register widths but that gets us to a chicken-and-egg problem where register width depends on instruction width and vice-versa.</p>
<p dir="ltr">> Also, am I correct that the width field isn't actually hooked up to<br>
> anything at this point?</p>
<p dir="ltr">Yes, that's correct. Hooking it up comes later.<br>
--Jason <br>
</p>