[llvm-dev] Memory Consumption and Execution Time static Statistics in LLVM. Can llvm-mca help?

via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 21 07:47:53 PST 2018


Hello,
It seems that you are asking whether LLVM can provide a time- and memory-complexity analysis of the source code, and then estimate how a specific given dataset would be handled by that source code.
It's not the kind of thing that compilers do, and I cannot imagine that LLVM has any way to provide this analysis.  The compiler's task is to create a semantically equivalent transformation of the source code into machine code, it has no need to understand the algorithmic complexity of the input source code.
I don't claim intimate knowledge of llvm-mca, but my understanding is that it looks at relatively small fragments of the compiled code; I'm not aware that it really understands control-flow, and it certainly has no understanding of memory consumption.
Best regards,
--paulr

From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of hameeza ahmed via llvm-dev
Sent: Thursday, December 20, 2018 3:08 PM
To: llvm-dev
Subject: [llvm-dev] Memory Consumption and Execution Time static Statistics in LLVM. Can llvm-mca help?

Hello,
I am PhD student. My work deals with finding the memory (RAM) consumption as indicated by linux RSS output and execution time as indicated by linux time command at compile time using LLVM. How can I do this? Like if i pass dataset size and application to llvm compiler, it should tell the estimated memory consumption and time taken to execute given application with given dataset, but all at compile time? I am trying to avoid profiling here. I wont get accurate values, hence rough estimated values of memory consumption and time are enough...

Can llvm-mca help me in finding these statistics? or I need to write a new compiler analysis pass to find these values?

Please help  how to proceed.

 Thank You
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181221/8d363e68/attachment-0001.html>


More information about the llvm-dev mailing list