Hi Vadim, wow quite impressive, does it also contains peep-hole optimisation?
I tried to implement that once, but failed because I never got all the dependencies between opcodes correctly resolved. Rescheduling export instructions and setting the barrier flag of CF instructions correctly can also be quite an improvement. Just a side note in commit "r600g: make some functions in r600_asm.c externally accessible" you make a whole bunch of functions externally accessible, but didn't add a proper prefix like "r600_" to the function name. That could led to a bit confusion when somebody else tries to hack on the code. Regards, Christian. Am Freitag, den 07.10.2011, 18:14 +0400 schrieb Vadim Girlin: > Hi, > > Recently I've been working on the shader optimization for r600g, and now > I have the initial working implementation of simple alu scheduler and > register allocator. It has no piglit regressions, though it's still a > work in progress and there are known issues with some applications. > > I've pushed the working branch to github: > https://github.com/VadimGirlin/mesa/tree/r600_shader_opt > > Currently it supports evergreen only, but I'm planning to make it work > with other chips too. It uses "struct r600_bytecode" as the source, > converting it to SSA-based internal representation. I'm going to > implement some optimization passes at that phase, but currently it's > then doing final steps - register allocation, alu scheduling, and > building new bytecode. > > I'm attaching as an example the dump for one of the shaders in the > glxgears. You could get such dump for all shaders before and after > processing by setting R600_OPT_DUMP environment variable to 2. Setting > this variable to 1 will only print some information for the processed > shaders - size, number of gprs, and number of alu instruction groups. > > Vadim > > > > > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev