[LLVMdev] support for addressing units which are not 8 bits

Eli Friedman eli.friedman at gmail.com
Thu Jun 20 09:51:19 PDT 2013


On Thu, Jun 20, 2013 at 6:14 AM, Boris Boesler <baembel at gmx.de> wrote:

> Hi!
>
>  I want to write a LLVM back-end for a bit addressing target architecture.
>
> http://llvm.org/docs/GetElementPtr.html#i-m-writing-a-backend-for-a-target-which-needs-custom-lowering-for-gep-how-do-i-do-thisstates quite clearly that some additional work must be done for this sort
> of architecture. Is this still true? Is there a project/branch to make it
> more flexible? Support for any memory addressing?
>
>  I had a short look at SelectionDAGBuilder::visitGetElementPtr(const User
> &I) and either this method handles it properly already or customization
> with some target attributes should not be difficult.
>

Yes, you're right.


>
>  And what means "a lot of code in the backend" in the link above? Which
> other parts are involved?
>
>
>
The tricky part here isn't addressing, it's that is that each address
points at 32 bits, so you have to track down every single place LLVM
hardcodes "i8" and fix it.

CC'ing Philipp Brüschweiler, who had a patch series a while back (see
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120702/146050.html).


-Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130620/ae7af187/attachment.html>


More information about the llvm-dev mailing list