Re: [Patch, committed, wwwdocs] Re: Typo in GCC 4.8 release page
On Thu, Mar 28, 2013 at 2:18 PM, Tobias Burnus wrote: > Foone Turing wrote: >> >> This page: http://gcc.gnu.org/gcc-4.8/ >> under "release history" says GCC 4.8 was released on March 22, 2012. >> This should be 2013, not 2012. > > > Thanks for the report! I have corrected it now. Same typo at GCC Timeline page: http://gcc.gnu.org/develop.html#timeline GCC 4.8.0 release (2012-03-22) should be 2013. -- Kartik http://k4rtik.wordpress.com/
Correct way to access predecessors of a gimple statement?
Hi I am trying to implement a GVN algorithm as a plugin for GCC 4.6. With help from GCC IRC channel, internals doc and reading the source, I was able to get a prototype working for the case of a single block. Now, I am trying to handle the case of confluence of multiple edges i.e. obtain redundancy information from multiple paths at a merge point. I am stuck trying to figure out how to access all the immediate predecessors of a statement. I have looked into CFG chapter of internals doc (block and edge), though edge data structure seems to give a hint, I couldn't clearly find out how to leverage it for my purpose. Any hints or code example would be a great help. If it is of any help, the algorithm is at [1] and my code at [2] (*very* naive and not considering performance at all in the first implementation attempt). [1]: http://arxiv.org/abs/1303.1880 [2]: https://github.com/k4rtik/btp-gvn/blob/master/gvn-plugin/plugin.c Thanks -- Kartik http://k4rtik.wordpress.com/
Re: Correct way to access predecessors of a gimple statement?
On Sun, May 5, 2013 at 12:39 PM, Sudakshina Das wrote: > You can use the iterator FOR_EACH_EDGE in this form: > > FOR_EACH_EDGE (e, ei, bb->preds) > > where e is an edge ei is edge iterator bb is a basic block. Oh, I guess this is exactly what I need. Now, I looked it up, basic_block.h has such an example but deep down at ~890th line, no wonder I managed to miss it impatiently. And after obtaining the pred edges, I can get the src block, and through that any of the contained gimple stmt. Looks like problem solved, thanks a lot. -- Kartik http://k4rtik.wordpress.com/
Re: gcc : c++11 : full support : eta?
I have been following this discussion for quite a while now, guess it's the right time to introduce myself as one of the newcomers. I had attended the Abstractions in GCC workshop 2012 by Prof. Uday and his team. It definitely helped me kick start with understanding of GCC and got me interested; so much so that I chose GCC as the framework to implement a global analysis algorithm as my final year project (I am a CSE Undergraduate student in India). Up to now, I have tried to make my foundations strong by learning essential theory by taking courses in Compiler Construction & Compiler Design involving study of optimization techniques and other basics. In the next 2-3 months I plan to study the source code more rigorously and implement the analysis algorithm. I certainly agree about lack of direction and documentation, I found even the Internals document incomplete at many points in satisfying my curiosity about certain questions related to GCC. Good to see there is an effort to change the state of affairs. I would like to volunteer for any kind of contribution I can make in this effort, and I think, as a newcomer, I will have a slightly different perspective of things that might help in solving this problem. Thanks -- Kartik http://k4rtik.wordpress.com/
Re: gcc : c++11 : full support : eta?
On Thu, Jan 24, 2013 at 2:44 PM, Alec Teal wrote: > I am keeping a "diary" of sorts about what I think GCC is and how that > changes, how it does things, so forth. > Please keep one too! Thanks for the suggestion. Will do that from now on. -- Kartik http://k4rtik.wordpress.com/
Global Value Numbering and dependence on SSA in GCC
Hi I am an undergraduate CS student and a beginner to GCC development. I am trying to implement a new algorithm for Global Value Numbering proposed recently in our research group. I have basic experience in implementing simple optimization passes as dynamic plugins in GCC. I have some questions regarding my project, answers to which, I believe, GCC community can help me find: 1. On going through the archives and source code, I didn't find info on any GVN algorithm being used in GCC. Archives mention VanDrunen's GVN-PRE, but not much about GVN in particular. Is there currently no GVN implementation in GCC, if yes, why is that? If no, where should I look for it? 2. I find that GCC switches to SSA form very early after CFG pass for most of the optimizations. The algorithm that I am trying to implement doesn't use SSA (we have found that some redundancies get skipped on introduction of SSA). I could not find information from the GCC Internals document or from archives on whether SSA could be skipped altogether. Is that even possible? If not, could somebody shed some light on how I can work with SSA representation, but ignore its properties. Thanks -- Kartik http://k4rtik.wordpress.com/
Re: Global Value Numbering and dependence on SSA in GCC
Thanks Richard for pointing out tree-ssa-sccvn.c On Wed, Feb 6, 2013 at 8:14 PM, Richard Biener wrote: > > Well, to ignore SSA form simply treat each SSA name as separate variable. > You of course need to handle PHI nodes as copies on CFG edges then. I am not sure if I understood this correctly. Consider the following example: if (...) a_1 = 5; else if (...) a_2 = 2; else a_3 = 13; # a_4 = PHI return a_4; Do you mean that I treat a_1, a_2 and a_3 as 3 different variables? In this approach, I lose the information that they are actually the same variables. Or should I write a mini lexer function to convert the SSA names into original variable names by removing _1, _2, etc. as suffix from each? Regarding PHI nodes, I think you mean, I should treat them as identity functions, but I am not clear exactly how in the first approach above. In second, I can just treat it as a=a. -- Kartik http://k4rtik.wordpress.com/