Right. LLVM supports the transformation from unsupported vector type to supported vector type or even scalar types.<br>According to the LLVM's documentation, LLVM has two ways of doing the transformation, one is promoting the small vector type to larger vector type, the other is breaking up the large vector type into smaller ones.<br>

But I am wondering, how good the transformation will be in LLVM's implementation.<br><br>In my approach, I use strategies to capture all possible transformation. The transformation are not only just promoting and breaking up, but also other forms of transformation, like the transformation between vector types with same size.<br>

My goal is to make sure the simulation to be as good as possible in terms of the number of instructions, CPU latency, etc. If LLVM has information about the latency information of supported architectures, maybe I can use them to optimize my approach.<br>

<br>Does LLVM have the latency information(such as CPU cycles) of SIMD instructions for each supported architecture?<br><br>Thanks.<br><br><div class="gmail_quote">On Fri, Apr 1, 2011 at 2:30 AM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr" target="_blank">baldrick@free.fr</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Kevin,<br>
<br>
> *Background*<br>
<div>> Almost modern processor families support SIMD instruction sets but the<br>
> instruction set designs for each platform have different combinations of<br>
> operations. The portable SIMD here is to make an uniform system of SIMD<br>
> operations at all power-of-2 field widths.<br>
> For example, for simd_add on SSE2, I want to have all the following operations<br>
> supported, simd<2^x>::add(a, b) for 2<=2^x<=register_size(register_size equals<br>
> 128 in SSE2). However, SSE2 only supports simd_add on field widths of 8, 16, 32,<br>
> or 64. Hence, simulation for simd_add on field widths of 2, 4 and 128 is needed.<br>
</div>> *At mean time, I want the simulation to be as good as possible*.<br>
<br>
LLVM already does this: if you use a vector type that is not natively supported<br>
then operations on it are simulated using either vector operations in another<br>
vector type or scalar operations if no suitable vector type exists.<br>
<br>
Ciao, Duncan.<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br>