<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><div><div></div><br><blockquote type="cite"><div style="font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br><br><br>-  Elena<br><br><br>-----Original Message-----<br>From: Adam Nemet [<a href="mailto:anemet@apple.com">mailto:anemet@apple.com</a>]<span class="Apple-converted-space"> </span><br>Sent: Monday, August 18, 2014 09:17<br>To: Demikhovsky, Elena; Khasanov, Robert<br>Cc: llvm-commits<br>Subject: [PATCH][AVX512] Add class to group common template arguments related to vector type<br><br>Hi,<br><br>We discussed the issue of generality vs. readability of the AVX512 classes recently.  I proposed this approach to try to hide and centralize the mappings we commonly perform based on the vector type.  A new class X86VectorVTInfo captures these.<br><br>The idea is to pass an instance of this class to classes/multiclasses instead of the corresponding ValueType.  Then the class/multiclass can use its field for things that derive from the type rather than passing all those as separate arguments.<br><br>I modified avx512_valign to demonstrate this new approach.  As you can see instead of 7 related template parameters we now have one.  The downside is that we have to refer to fields for the derived values.  I named the argument '_' in order to make this as invisible as possible.  Please let me know if you absolutely hate this.  (Also once we allow local initializations in multiclasses we can recover the original version by assigning the fields to local variables.)<br><br>Another possible use-case for this class is to directly map things, e.g.:<br><br> RegisterClass KRC = X86VectorVTInfo<32, i16>.KRC<br><br>Please let me know if it looks good.<br><br>Adam<br><br>---------------------------------------------------------------------<br>Intel Israel (74) Limited<br><br>This e-mail and any attachments may contain confidential material for<br>the sole use of the intended recipient(s). Any review or distribution<br>by others is strictly prohibited. If you are not the intended<br>recipient, please contact the sender and delete all copies.</div></blockquote></div><br></div></body></html>