Hi all,<div><br></div><div>I am trying to do an analysis of a parallelized code using sse optimizations. The problem I am encountering is that I need to do some matching based on the analysis and I would like to extract the names of the functions as is rather than llvm intrinsics with an llvm. representation. Essentially I would like to extract the control flow graph representation with function names (eg. <span class="Apple-style-span" style="font-family: 'Courier New'; ">_mm_cvtsi32_si128<span class="Apple-style-span" style="font-family: arial; ">) instead of the functions being replaced by 'llvm.*'</span></span></div>
<div><br></div><div>Is there anyway to extract these names directly as function calls?</div><div><br></div><div><br></div><div>I have included the sample code below.</div><div><br></div><div>I get the function call names as llvm.x86 something instead of getting function names(eg. <span class="Apple-style-span" style="font-family: 'Courier New'; ">_mm_cvtsi32_si128<span class="Apple-style-span" style="font-family: arial; ">) </span></span></div>

<div><p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">#include</span><span style="font-size:10.0pt;font-family:"Courier New""> <span style="color:maroon"><pmmintrin.h></span></span></p>



<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">#include</span><span style="font-size:10.0pt;font-family:"Courier New";color:maroon"><sys/time.h></span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">#include</span><span style="font-size:10.0pt;font-family:"Courier New";color:maroon"><iostream></span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:maroon"> </span></p>

<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue">void</span><span style="font-size:10.0pt;font-family:"Courier New""> foo_opt(<span style="color:blue">unsigned</span> <span style="color:blue">char</span>
output[64], <span style="color:blue">int</span> Yc[64], <span style="color:blue">int</span> S_BITS)</span></p>

<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New"">{</span></p>

<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""><span>    </span><span style="color:blue">__m128i</span>
XMM1, XMM2, XMM3, XMM4;</span></p>

<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""><span>    </span><span style="color:blue">__m128i</span>
*xmm1 = (<span style="color:blue">__m128i</span>*)Yc;</span></p>

<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""><span>    </span><span style="color:blue">__m128i</span>
XMM5 = _mm_cvtsi32_si128(S_BITS <span style="color:red">+ 3</span>) ;</span></p>

<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""><span>    </span>XMM2 = _mm_set1_epi32(S_BITS <span style="color:red">+ 2</span>);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""><span>    </span><span style="color:blue">for</span> (<span style="color:blue">int</span> l = 0; l < 8; l++) {<span>   </span></span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""><span>        </span>XMM1 = _mm_loadu_si128(xmm1++);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""><span>        </span>XMM3 = _mm_add_epi32(XMM1, XMM2);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""><span>        </span><span style="color:#A6A6A6">XMM1 =
_mm_cmplt_epi32(XMM1, _mm_setzero_si128());</span></span></p>

<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#A6A6A6"><span>        </span>XMM1 = _mm_srli_epi32(XMM1, 31);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#A6A6A6"><span>        </span>XMM3 = _mm_sub_epi32(XMM3, XMM1);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#A6A6A6"><span>     </span><span>   </span>XMM3 = _mm_srl_epi32(XMM3, XMM5);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#A6A6A6"> </span></p>

<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#A6A6A6"><span>        </span>XMM1 = _mm_loadu_si128(xmm1++);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#A6A6A6"><span>        </span>XMM4 = _mm_add_epi32(XMM1, XMM2);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#A6A6A6"><span>        </span>XMM1 = _mm_cmplt_epi32(XMM1,
_mm_setzero_si128());</span></p>

<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#A6A6A6"><span>        </span>XMM1 = _mm_srli_epi32(XMM1, 31);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#A6A6A6"><span>        </span>XMM4 = _mm_sub_epi32(XMM4, XMM1);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#A6A6A6"><span>        </span>XMM4 = _mm_srl_epi32(XMM4, XMM5);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#A6A6A6"> </span></p>

<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#A6A6A6"><span>        </span>XMM3 = _mm_packs_epi32(XMM3, XMM4);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:#A6A6A6"><span>        </span>XMM3 = _mm_packus_epi16(XMM3, XMM3);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""><span>        </span>_mm_storel_epi64((<span style="color:blue">__m128i</span>*)(output+8*l), XMM3);</span></p>


<p style="margin-bottom:0in;margin-bottom:.0001pt;line-height:normal;text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New""><span>    </span>}</span></p>

<p><span style="font-size:10.0pt;line-height:115%;font-family:"Courier New"">}</span></p></div>