[LLVMdev] GSoC on LLVM usability?

Thibault Raffaillac traf at kth.se
Wed Mar 28 02:20:22 PDT 2012


Bump!

I realize my previous message may have been a bit abrupt, without much proper
explanations, though it is a serious application!

Currently, the feedback of LLVM regarding the optimizations performed is an
optional list of optimization names, through the detailed pass statistics.
Though of high relevance to a user familiar with optimizing compilers, for
unfamiliar users it might be overwhelming: one will have to "google" every
single name to learn about the different techniques.

Even for most expert users, which have not had a glimpse at LLVM source code,
it is fairly hard to guest whether some specific sequence of instructions will
be optimized as expected. docs/Passes.html clearly states the behaviour of each
optimization, but nothing guarantees that it will behave as expected. There
should be a closer feedback to was is actually done.

I am thinking about a user-friendly feedback of the optimizations performed.
It would not be meant as an exhaustive feedback as the detailed pass
statistics, but rather pick one or two optimizations done during the previous
compilation, and explain them.

As an example:
cc --feedback test.c
test.c:xx:x: info: Value Propagation: All operands being constant, '2560' was directly assigned to 'a'
test.c:xx:x: info: Value Propagation: Impossible to proceed here, because...
test.c:xx:x: info: MemCpy Optimization: The consecutive sequence of 6 stores was merged in a single memcpy
test.c:xx:x: info: Combine redundant instructions: As integers are stored in binary format, '* 8' was replaced by '<< 3'

As a difference with the pass statistics, here the messages would form a set,
and the system would remember those already displayed and decrease their
frequency of occurence between compilations. All messages would cite the pass
name for search in the docs, explain what triggered the optimization, and
describe the consequence. Actually I think the messages could be a little
lengthier than the example (2-3 lines) to make proper explanations.

As for the work plan, it would consist in:
_ Enumerating all possible messages in the messages set.
_ Implementing a function receiving feedback from each optimization unit and
  choosing whether to display it: info_printf(enum INFO_INDEX, const char*, ...);
_ Write a formatting guide for adding messages in the set.

I would very much appreciate you feedback on this proposal!

Best regards,
Thibault (http://www.csc.kth.se/~traf/)

________________________________
From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Thibault Raffaillac [traf at kth.se]
Sent: 23 March 2012 01:38
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] GSoC on LLVM usability?

Hello all,

My name is Thibault Raffaillac, degree student at KTH, Stockholm, Sweden (in double-degree partnership with Ecole Centrale Marseille, France).
I am currently carrying my degree thesis on the usability of compilers, and as such would be very much interested in contributing to LLVM through a Google Summer of Code.
The task I would like to propose is implementing the work from my thesis: a user-friendly feedback of the optimizations performed (http://www.csc.kth.se/~traf/traf-sketch.pdf).
If this can be of interest (or unclear), please tell me so that I develop further the project application.

Best regards,
Thibault (http://www.csc.kth.se/~traf/)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120328/d84e13a1/attachment.html>


More information about the llvm-dev mailing list