GSOC 2015 - Binary Size Reduction

47 views
Skip to first unread message

Wajih ul hassan

unread,
Mar 4, 2015, 10:54:04 AM3/4/15
to native-cli...@googlegroups.com
Hi,
My name is Wajih Ul Hassan and I am interest contributing to Portable Native Client for the Google summer of code 2015.I would like to work on Binary Size reduction of LLVM bitcode. I have experience in LLVM bitcodes files and writing optimization passes in LLVM.  In past, I have written passes which uses partial evaluation techniques to make bitcode size smaller by specializing the code with command line arguments. I can share that code with you. Can you give me some pointer that what are the specific requirement for this project?
Thanks
Wajih

JF Bastien

unread,
Mar 4, 2015, 11:31:27 AM3/4/15
to native-cli...@googlegroups.com
Hi Wajih,

Glad you're interested! Partial evaluation seems like an interesting approach, do you think it's something that could be added to LLVM's own codebase easily? One of our goals is for all of this work to occur within LLVM. The general goal is to reduce binary size without hindering performance, so the easiest way to start is to remove code that's unreachable and that LLVM can't prove to be unreachable, which I think partial evaluation would be good at doing. Removing redundancy is a complimentary approach with LLVM's mergefuncs does, but it stands to be improved. We'd like the work performed to be as general as possible: just running LLVM should suffice, no need to do profiling runs or pass special parameters.

Let me know how I can help further!

JF

--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to native-client-di...@googlegroups.com.
To post to this group, send email to native-cli...@googlegroups.com.
Visit this group at http://groups.google.com/group/native-client-discuss.
For more options, visit https://groups.google.com/d/optout.

Wajih ul hassan

unread,
Mar 4, 2015, 12:02:05 PM3/4/15
to native-cli...@googlegroups.com
Yes, it could be easily added to LLVM codebase as loadable passes like "dce" (Dead-code elimination) pass or "mergefunc" pass. Having said that I have required understanding in Partial evaluation, Tree shaking and past projects like Tempo. I have written some passes which do some basic partial evaluation on LLVM bitcode and mark the code which unreachable and remove that code subsequently. I would like to know is this the right approach in the domain of PNaCl and what is the priority of this project? 
Thanks
Wajih

On Wednesday, March 4, 2015 at 9:31:27 PM UTC+5, JF Bastien wrote:
Hi Wajih,

Glad you're interested! Partial evaluation seems like an interesting approach, do you think it's something that could be added to LLVM's own codebase easily? One of our goals is for all of this work to occur within LLVM. The general goal is to reduce binary size without hindering performance, so the easiest way to start is to remove code that's unreachable and that LLVM can't prove to be unreachable, which I think partial evaluation would be good at doing. Removing redundancy is a complimentary approach with LLVM's mergefuncs does, but it stands to be improved. We'd like the work performed to be as general as possible: just running LLVM should suffice, no need to do profiling runs or pass special parameters.

Let me know how I can help further!

JF
On Wed, Mar 4, 2015 at 7:54 AM, Wajih ul hassan <wajih...@gmail.com> wrote:
Hi,
My name is Wajih Ul Hassan and I am interest contributing to Portable Native Client for the Google summer of code 2015.I would like to work on Binary Size reduction of LLVM bitcode. I have experience in LLVM bitcodes files and writing optimization passes in LLVM.  In past, I have written passes which uses partial evaluation techniques to make bitcode size smaller by specializing the code with command line arguments. I can share that code with you. Can you give me some pointer that what are the specific requirement for this project?
Thanks
Wajih

--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to native-client-discuss+unsub...@googlegroups.com.

JF Bastien

unread,
Mar 4, 2015, 12:17:59 PM3/4/15
to native-cli...@googlegroups.com
On Wed, Mar 4, 2015 at 9:02 AM, Wajih ul hassan <wajih...@gmail.com> wrote:
Yes, it could be easily added to LLVM codebase as loadable passes like "dce" (Dead-code elimination) pass or "mergefunc" pass. Having said that I have required understanding in Partial evaluation, Tree shaking and past projects like Tempo. I have written some passes which do some basic partial evaluation on LLVM bitcode and mark the code which unreachable and remove that code subsequently. I would like to know is this the right approach in the domain of PNaCl and what is the priority of this project? 

It may be a good approach, but the devil is in the details! Such work would need a pretty good design to be written and sent to the LLVM mailing list for discussion. We can help you with this, but at the end of the day LLVM won't accept patches that add substantial capabilities to the compiler without having had a healthy discussion about the implementation approach and how this could also be used in other parts of LLVM. We're interested in sponsoring this work for GSoC because shipping native code on the web (for PNaCl and Emscripten) can be improved quite a bit by having less code, but the work is useful for many other users of LLVM (embedded systems, but regular users too).

I recommend looking at what LLVM currently contains, and at previous discussions on the mailing list about partial evaluation. Documenting previous work is a great way to show the GSoC committee that you've "done your homework" and are serious about the work. It'll also be required for a good design document: coming in without looking at what was tried before isn't well seen by the LLVM community! Once you have a good idea of what's been tried/discussed and an early idea of what the design would look like then I think you would have a pretty solid GSoC application!

 
Thanks
Wajih

On Wednesday, March 4, 2015 at 9:31:27 PM UTC+5, JF Bastien wrote:
Hi Wajih,

Glad you're interested! Partial evaluation seems like an interesting approach, do you think it's something that could be added to LLVM's own codebase easily? One of our goals is for all of this work to occur within LLVM. The general goal is to reduce binary size without hindering performance, so the easiest way to start is to remove code that's unreachable and that LLVM can't prove to be unreachable, which I think partial evaluation would be good at doing. Removing redundancy is a complimentary approach with LLVM's mergefuncs does, but it stands to be improved. We'd like the work performed to be as general as possible: just running LLVM should suffice, no need to do profiling runs or pass special parameters.

Let me know how I can help further!

JF

On Wed, Mar 4, 2015 at 7:54 AM, Wajih ul hassan <wajih...@gmail.com> wrote:
Hi,
My name is Wajih Ul Hassan and I am interest contributing to Portable Native Client for the Google summer of code 2015.I would like to work on Binary Size reduction of LLVM bitcode. I have experience in LLVM bitcodes files and writing optimization passes in LLVM.  In past, I have written passes which uses partial evaluation techniques to make bitcode size smaller by specializing the code with command line arguments. I can share that code with you. Can you give me some pointer that what are the specific requirement for this project?
Thanks
Wajih

--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to native-client-discuss+unsub...@googlegroups.com.
To post to this group, send email to native-cli...@googlegroups.com.
Visit this group at http://groups.google.com/group/native-client-discuss.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to native-client-di...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages