<div>1. In implementing vector and __vector, which is better?:</div>
<div> </div>
<div>A. Don't make it a keyword, but if LangOptions::AltiVec is set and a kw_identifier with the name "vector" or "__vector" is followed by a numeric type keyword, make the type a vector type.</div>
<div> </div>
<div>B. Make vector and __vector a keyword if LangOptions::AltiVec is set, and if not followed by a numeric type keyword, treat it as an identifier.<br clear="all"></div>
<div>My guess is that A is better as it involves less fixing up of cases where an identifier with the name of "vector" can occur.</div>
<div> </div>
<div>2. Regarding the typing, I'm thinking internally it would be treated just as if __attribute__((vector_size(16)) were applied to the type, right?</div>
<div> </div>
<div>3. With __attribute__((vector_size(16)), does the Clang code generation already output everything LLVM needs to support the Altivec vectors?</div>
<div> </div>
<div>For example, in looking at the code generated for some code using an "__attribute__((vector_size(16)) float" variable or return type, the .ll file uses "<4 x float>". On a PowerPC platform supporting Altivec, does LLVM automatically know to map that to a vector register?</div>
<div> </div>
<div>4. I'm guessing the Altivec functions can be implemented as Clang built-in functions that map to calls to LLVM's altivec intrinsic functions, right? I haven't researched this much yet.</div>
<div> </div>
<div>5. Any suggestions or other things I ought to know at this early point?</div>
<div> </div>
<div>Thanks.</div>
<div> </div>
<div>-John</div>
<div><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br><br></div>