support for addressing units which are not 8 bits

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

support for addressing units which are not 8 bits

Boris Boesler
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-this states 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.

 And what means "a lot of code in the backend" in the link above? Which other parts are involved?

Thanks,
Boris


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: support for addressing units which are not 8 bits

Eli Friedman-2
On Thu, Jun 20, 2013 at 6:14 AM, Boris Boesler <[hidden email]> 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-this states 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


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: support for addressing units which are not 8 bits

Boris Boesler
Am 20.06.2013 um 18:51 schrieb Eli Friedman:

> On Thu, Jun 20, 2013 at 6:14 AM, Boris Boesler <[hidden email]> wrote:
> Hi!
>
>  I want to write a LLVM back-end for a bit addressing target architecture.
...
>  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).

 Finally I had some time to give it a try. I can't apply the patches to llvm 3.2 because the files include/llvm/Target/TargetData.h and lib/Target/TargetData.cpp don't exist anymore. Probably they have been split into multiple new files. But applying the patches to the new files by hand should not be to hard.

 Anyway, are there plans to add this kind of feature to the trunk? Isn't there some demand?

Boris


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev