[Mesa-dev] Good compiler literature?

Connor Abbott cwabbott0 at gmail.com
Sun Mar 29 19:17:47 PDT 2015


On Sun, Mar 29, 2015 at 9:51 PM, Connor Abbott <cwabbott0 at gmail.com> wrote:
> On Sun, Mar 29, 2015 at 5:54 PM, Thomas Helland
> <thomashelland90 at gmail.com> wrote:
>> Does anyone have suggestions for good literature on compilers?
>> Since GPU's and CPU's are a bit different there are probably
>> books that are better suited than others for GPUs?
>> I have what is probably Norway's biggest library on the subject to rent
>> books from, so I guess I should be able to find most suggestions there.
>>
>> Regards
>> Thomas
>>
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>
> Hi,
>
> Unfortunately there seems to be a bit of a dearth of books when it
> comes to compiler optimizations and backend things, especially when it
> comes to SSA -- which is the most interesting part! I would skip the
> dragon book unless you're interested in the front-end things (parsing,
> symbol tables, etc.); I haven't read a lot of it myself, but
> apparently the latest edition only has a passing mention of SSA and
> others don't mention it at all. GCC has a list of books:
> https://gcc.gnu.org/wiki/ListOfCompilerBooks and apparently some of
> them are better in that regard. Personally, I learned about a lot of
> this stuff through papers. I have a list of them here:
>
> http://cwabbottdev.blogspot.com/2013/06/compiler-theory-links.html
>
> although it may be a little out of date, and some of the things might
> have been more useful back when I was working on lima. Suggestions for
> adding to the list are very welcome.

Ok, since that page was a little lacking I added a few more links.
Also, as to GPU-specific things... well, there really isn't much of
anything I'm aware of that's out there. There's one paper called
"Divergance Analysis and Optimizations" that's specific to SIMD
machines that run multiple threads execution at once like GPU's, and
we'd like to implement that in the future to give us more precise
information about how we can move derivatives and textures that take
an implicit derivative, since they can't be moved out of uniform
control flow, but other than that there isn't anything I'm aware of.
Most of the other things carry over to both CPU's and GPU's. One other
GPU-specific problem I'm aware of is how to go out of SSA on classic
vector-based architectures like i965 vec4 VS without introducing extra
copies due to writemasked operations, but afaik there isn't a
publically-available description of someone's solution -- the paper
has yet to be written :).


More information about the mesa-dev mailing list