Hi all,
My name is Fahad Nayyar. I am an undergraduate student from India.
I am interested to participate in GSOC under the project “Improve inter-procedural analyses and optimizations”.
I have been using LLVM for the past 8 months. I have written various intra-procedural analysis in LLVM as FunctionPass for my course projects and research projects. But I’ve not contributed to the LLVM community yet. I am very excited to contribute to LLVM!
I am not too familiar with the inter-procedural analysis infrastructure of LLVM. I have written small toy inter-procedural dataflow analysis (like taint analysis, reaching definitions, etc) for JAVA programs using SOOT tool [5]. I am familiar with the theory of inter-procedural analysis (I’ve read some chapters of [1], [2] and [3] for this).
I am trying to understand the LLVM’s Attributor framework. I am interested in these 3 aspects:
-
How Attributor can help for standard inter-procedural and intra-procedural analysis passes of LLVm. I’ve seen the tutorial [4]. I would like to discuss ways of improving other optimization passes similarly (or some examples which have already been implemented).
-
Improve dynamic memory related capabilities of Attributor. For example Improve HeapToStackConversions. Maybe such deductions can help safety (dis)provers. For example, can we improve the use-after-free bug detection using some attributes?
-
Improve Liveness related capabilities of Attributor. Again I want to consider whether some attribute deduction can help liveness (dis)provers. For example NoReturn, WillReturn can be improved. I am sure these 2 attributes do not cover all the cases as it is an undecidable problem. But I was wondering whether there is room for improvement in their deduction mechanism.
-
Can we optimize the attribute deduction algorithm to reduce compile time?
-
Is there any attribute that tells whether a function has side-effects (does it always gives the same output for the same input? Or does it affect some global variable directly or indirectly?)?
It would be great if Johannes can provide me some TODOs before submitting my proposal. Also please tell some specific IPO improvement goals which you have in mind for this project. I would be most interested in memory-related attributes, liveness deductions from attributes and measurable better IPO using attribute deduction.
Thanks and Regards.
References:
[1] Principles of Program Analysis.
[2] Data Flow Analysis: Theory and Practice.
[4] 2019 LLVM Developers’ Meeting: J. Doerfert “The Attributor: A Versatile Inter-procedural Fixpoint…"