[LLVMdev] request for tutorial
preston.briggs at gmail.com
Thu Sep 26 09:22:18 PDT 2013
I think y'all underestimate how important documentation can be. There are,
after all, documents out there that purport to be guides to writing a back
end for LLVM. I know of 2 other experienced & motivated compiler writers
who read the available documentation, wrote some code, foundered, gave up,
and wrote their own back end from scratch. So there's three of us that I
know about, and I don't get around much. A friend in the newspaper business
said they had a rule of thumb that said approximately: "One letter from a
reader implies another hundred readers out there who had the same opinion."
On Wed, Sep 25, 2013 at 2:22 PM, Renato Golin <renato.golin at linaro.org>wrote:
> On 25 September 2013 22:13, Preston Briggs <preston.briggs at gmail.com>wrote:
>> A lot of my difficulty in reading other examples is that it's not clear
>> what matters and what doesn't. It's what I hope to get by sitting next to
>> someone and asking questions. Some of this could be addressed in a guide.
>> I'd start with a chapter on planning.
> Another approach, a mix between a dummy back end and Karen's proposal, is
> to not only write documents on how things piece together, but also add
> comments to the code on how important this file/function is, how it fits
> with the rest, and how generic/specific it is.
> Documentations get outdated more often than comments in the code, and LLVM
> is particularly good at generic comments, but not so much at teaching how
> to use the code.
> Patches adding comments are also a good way to learn how something works.
> You send a comment, people say how wrong that is, and in the end, you learn
> by teaching others via your comments.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev