<div>Hi;</div><div><br></div><div>I was planning to implement a profile guided optimization technique in LLVM. In the open source projects list of the LLVM site; I saw "code layout" is a transformation that can be worth looking at as it will use of profiles (possibly path profiles).</div>
<div><br></div><div>So I was thinking of implementing either Pettis-Hansen's (Profile guided code positioning, Pettis & Hansen) or Gloy's (Procedure Placement Using Temporal-Ordering Information, Gloy, Smith) procedure placement algorithm in LLVM because first of all I have not seen any implementation of it in LLVM till** and second, these are the classic procedure placement algorithms.</div>
<div><br></div><div>So I would like to get some advice from the seniors -</div><div><br></div><div>1. Has there been any attempt to implement these before that I don't know about. And what was the success/ failure of that implementation?</div>
<div><br></div><div>2. Gloy's algorithm aims at reducing the I-Cache misses. But how wise would it be to aim at that to optimize performance while the LLVM already does something to reduce I-Cache misses? To rephrase my question, is there really any scope of improvement for I-Cache misses? (I know the answer depends on the kind of application we are trying to compile, but let's say we are using applications which can have a large number of I-Cache conflict misses and have a large Working Set as well e.g gcc, go, postscript etc. I really don't know how well LLVM handles I-Cache misses for these programs. I mentioned them because these are the benchmarks Gloy used to measure performance of his transformation and they have interesting instruction memory behaviour )</div>
<div><br></div><div>3. Is this a good idea in terms of the complexity of implementing it? (To be frank, I will be doing this work for my Master's thesis and I have just more than a year in my hand)</div><div><br></div>
<div>Any comment on my idea (whether it is stupid / wise / can't tell without actually implementing it) would be appreciated. Also any pointers to how I-Cache misses are handled (reduced) by LLVM will be good.</div><div>
<br></div><div>Thank you for your help;</div><div><br></div><div>** - I have seen that there is already PH's Basic Block Placement transformation is implemented in LLVM but not Code Layout.</div>-- <br>Arnamoy Bhattacharyya<br>
Athabasca Hall 143<br>Department of Computing Science - University of Alberta<br>Edmonton, Alberta, Canada, T6G 2E8<br>780-680-7073<br>