<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Bump!<br>
<br>
I realize my previous message may have been a bit abrupt, without much proper<br>
explanations, though it is a serious application!<br>
<br>
Currently, the feedback of LLVM regarding the optimizations performed is an<br>
optional list of optimization names, through the detailed pass statistics.<br>
Though of high relevance to a user familiar with optimizing compilers, for<br>
unfamiliar users it might be overwhelming: one will have to "google" every<br>
single name to learn about the different techniques.<br>
<br>
Even for most expert users, which have not had a glimpse at LLVM source code,<br>
it is fairly hard to guest whether some specific sequence of instructions will<br>
be optimized as expected. docs/Passes.html clearly states the behaviour of each<br>
optimization, but nothing guarantees that it will behave as expected. There<br>
should be a closer feedback to was is actually done.<br>
<br>
I am thinking about a user-friendly feedback of the optimizations performed.<br>
It would not be meant as an exhaustive feedback as the detailed pass<br>
statistics, but rather pick one or two optimizations done during the previous<br>
compilation, and explain them.<br>
<br>
As an example:<br>
cc --feedback test.c<br>
test.c:xx:x: info: Value Propagation: All operands being constant, '2560' was directly assigned to 'a'<br>
test.c:xx:x: info: Value Propagation: Impossible to proceed here, because...<br>
test.c:xx:x: info: MemCpy Optimization: The consecutive sequence of 6 stores was merged in a single memcpy<br>
test.c:xx:x: info: Combine redundant instructions: As integers are stored in binary format, '* 8' was replaced by '<< 3'<br>
<br>
As a difference with the pass statistics, here the messages would form a set,<br>
and the system would remember those already displayed and decrease their<br>
frequency of occurence between compilations. All messages would cite the pass<br>
name for search in the docs, explain what triggered the optimization, and<br>
describe the consequence. Actually I think the messages could be a little<br>
lengthier than the example (2-3 lines) to make proper explanations.<br>
<br>
As for the work plan, it would consist in:<br>
_ Enumerating all possible messages in the messages set.<br>
_ Implementing a function receiving feedback from each optimization unit and<br>
  choosing whether to display it: info_printf(enum INFO_INDEX, const char*, ...);<br>
_ Write a formatting guide for adding messages in the set.<br>
<br>
I would very much appreciate you feedback on this proposal!<br>
<br>
Best regards,<br>
Thibault (http://www.csc.kth.se/~traf/)<br>
<br>
<div style="font-family: Times New Roman; color: rgb(0, 0, 0); font-size: 16px;">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF389895"><font color="#000000" face="Tahoma" size="2"><b>From:</b> llvmdev-bounces@cs.uiuc.edu [llvmdev-bounces@cs.uiuc.edu] on behalf of Thibault Raffaillac [traf@kth.se]<br>
<b>Sent:</b> 23 March 2012 01:38<br>
<b>To:</b> llvmdev@cs.uiuc.edu<br>
<b>Subject:</b> [LLVMdev] GSoC on LLVM usability?<br>
</font><br>
</div>
<div></div>
<div>
<div style="direction: ltr; font-family: Tahoma; color: rgb(0, 0, 0); font-size: 10pt;">
Hello all,<br>
<br>
My name is Thibault Raffaillac, degree student at KTH, Stockholm, Sweden (in double-degree partnership with Ecole Centrale Marseille, France).<br>
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.<br>
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).<br>
If this can be of interest (or unclear), please tell me so that I develop further the project application.<br>
<br>
Best regards,<br>
Thibault (http://www.csc.kth.se/~traf/)<br>
<br>
</div>
</div>
</div>
</div>
</body>
</html>