This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Something general (beginner related)


Hi folks.

Maybe the one or another remembers the post I've wrote more than a month ago. I was (and still am) new to the GCC codebase and had the evil plan to add an optimization pass to do byte permutations (capturing all home-brewed bswap things and all the other 23 possible byte-permutations as well).

Well - I had a lot of time to kill during the last weeks, and I had a lot of timeto read into the source. Business trips without internet access are a perfect opportunity to read such stuf...

Anyway, after all this passive read-work, I've been able to add the humble beginnings of my pass. I'm now able to and I've been able to run a code that does a printf as soon as I find an structure in the SSA tree that is a potential candidate for my optimization.

However, approaching this point has been very painfull and I'm far away from chainging anything in the SSA.

Let's get to the point: The documentation sucks. If you want to learn how things work the wiki and the documentation is of little help. You have to read other code, step through other optimizations and do a lot of reverse-engineering and code-reading to understand how all the different things fit and relate to each other.

I think a well commented pseudo-pass (well document as: talk to someone who know C but has no idea about the GCC magic..) that does something stupid but valid like re-inventing the neg-operator by using not and subtraction could act as be a very nice boilerplate code for people like me.

For someone who is into the SSA structures and the gcc internals should be able to write up something within a day or an half.

Just an idea.. And just to let you know how hard it can be: Finding out what GTY means *can* take half a day...

Nils




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]