Hi all, 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. _mm_cvtsi32_si128) instead of the functions being replaced by 'llvm.*' Is there anyway to extract these names directly as function calls? I have included the sample code below. I get the function call names as llvm.x86 something instead of getting function names(eg. _mm_cvtsi32_si128) #include <pmmintrin.h> #include<sys/time.h> #include<iostream> void foo_opt(unsigned char output[64], int Yc[64], int S_BITS) { __m128i XMM1, XMM2, XMM3, XMM4; __m128i *xmm1 = (__m128i*)Yc; __m128i XMM5 = _mm_cvtsi32_si128(S_BITS + 3) ; XMM2 = _mm_set1_epi32(S_BITS + 2); for (int l = 0; l < 8; l++) { XMM1 = _mm_loadu_si128(xmm1++); XMM3 = _mm_add_epi32(XMM1, XMM2); XMM1 = _mm_cmplt_epi32(XMM1, _mm_setzero_si128()); XMM1 = _mm_srli_epi32(XMM1, 31); XMM3 = _mm_sub_epi32(XMM3, XMM1); XMM3 = _mm_srl_epi32(XMM3, XMM5); XMM1 = _mm_loadu_si128(xmm1++); XMM4 = _mm_add_epi32(XMM1, XMM2); XMM1 = _mm_cmplt_epi32(XMM1, _mm_setzero_si128()); XMM1 = _mm_srli_epi32(XMM1, 31); XMM4 = _mm_sub_epi32(XMM4, XMM1); XMM4 = _mm_srl_epi32(XMM4, XMM5); XMM3 = _mm_packs_epi32(XMM3, XMM4); XMM3 = _mm_packus_epi16(XMM3, XMM3); _mm_storel_epi64((__m128i*)(output+8*l), XMM3); } } -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090130/01e86b9e/attachment.html>
On Fri, Jan 30, 2009 at 7:10 PM, Nipun Arora <nipun2512 at gmail.com> wrote:> Essentially I would like to extract the control flow graph representation > with function names (eg. _mm_cvtsi32_si128) instead of the functions being > replaced by 'llvm.*' > Is there anyway to extract these names directly as function calls?The names disappear in an unrecoverable way once the first inlining pass runs to take care of always_inline. You might be able to hack the code to sneak in before then, though. -Eli
Hii, Thanks for the response, yes I couldn't find any way to extract the names through any of the passes. Where could I potentially insert a hack so that any function call to intrinsic functions or library functions can be retrieved? Could you gimme any ideas for the start? -Nipun On Fri, Jan 30, 2009 at 10:39 PM, Eli Friedman <eli.friedman at gmail.com>wrote:> On Fri, Jan 30, 2009 at 7:10 PM, Nipun Arora <nipun2512 at gmail.com> wrote: > > Essentially I would like to extract the control flow graph representation > > with function names (eg. _mm_cvtsi32_si128) instead of the functions > being > > replaced by 'llvm.*' > > Is there anyway to extract these names directly as function calls? > > The names disappear in an unrecoverable way once the first inlining > pass runs to take care of always_inline. You might be able to hack > the code to sneak in before then, though. > > -Eli > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090131/e6fa45fc/attachment.html>