[LLVMdev] A "backend" is ... ?

Chandler Carruth chandlerc at google.com
Tue Mar 4 23:44:37 PST 2014


On Tue, Mar 4, 2014 at 11:18 PM, Robinson, Paul <
Paul_Robinson at playstation.sony.com> wrote:

> So we have lots of backends, conjuring up new ones is common
> enough that we desire better documentation for doing it, the
> goal of simplifying these backends is moderately worthy, and..
> "there is only one" backend.
>
> Uh... what?
>

Sorry, it is confusing.

We have a target-independent layer in the backend, and then a large number
of targets.

The target-independent layer makes it possible for all of the targets to
share common code where it makes sense. In fact, a large part of
legalization is shared between the targets. However, it is quite complex,
and there have been lots of efforts over the years to simplify
legalization. So even though this is shared, it is something interesting.

However, this target-independent logic is hooked *extensively* by each
target. And documenting exactly how to do all of this is the thing being
referenced. And simplifying this per-target hooking logic (or reducing,
etc) makes writing a new target in the backend significantly easier.

Hope that helps some.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140304/76a5c164/attachment.html>


More information about the llvm-dev mailing list