This week I continued to look into tree dump files in the effort to find out the data passed to the plugin event. Honestly as I have posted before, information on analysing dump files are really hard to find online. Most of the information available are about the basic information about dump files but not how to analyse them. After searching for quite some time online, I have found only one resource so far from GCC Resource Centre, IIT Bombay that explains a bit more about dump files content. It explains quite a lot about GIMPLE pass but not much on RTL passes. Probably because “RTL is almost incompressible and requires a great understanding over that dialect” from online resource. Before this, I remember seeing a posted that said analysing GIMPLE is more preferable over RTL intuitively, as RTL is really too low level to be analysed.

In total I got a lot of tree dump files by running the command -fdump-tree-all. However, I have read online that not all dump files are important. There are some change from the original code (like if with goto), To make things easier is to dump the pass that is needed. Most of the time the following passes are analysed:

-fdump-tree-lower

-fdump-tree-cfg

-fdump-tree-ssa

-fdump-tree-optimized (the last pass before going into rtl passes)

From some of the information I have found that GIMPLE dump files have some types of the designated GIMPLE statements such as assignment and etc. It is as though GIMPLE files has their own language of writing, which shows that GIMPLE files cannot be understood easily without understanding their statements.

That’s why, so far I have done mostly on reading and trying to study dump files. Recently I found out that there are not many people who are in the field of developing plugin in GCC, maybe more people will use GCC in compilation, but only a handful of them use it to build plugin, so let alone to find people who are expert in GCC plugin.. I have slowly realised that this journey of a GCC plugin building for the specific purpose here is not an easy one. What’s even more challenging is that there is only a very limited time frame to finish it, if possible. As even the more experienced GCC plugin developer reckon building this plugin requires quite a lot of time and effort, which in my case, time is not something that I can afford to have more even if I have money or other resources. I believe I have really chosen the road less taken.