[LLVMdev] C embedded extensions and LLVM

Christopher Lamb christopher.lamb at gmail.com
Wed Jan 30 21:58:54 PST 2008


Alireza,

I have added full support for embedded C address spaces to the LLVM  
IR (see http://llvm.org/docs/LangRef.html#t_pointer). I have not  
added any support for the fractional types and their operators,  
though I think this would simply require adding the necessary  
intrinsics, which is one of the easier things to add to LLVM. Given  
that LLVM takes the approach of modeling these kinds of type  
differences as differing operations rather than different types in  
it's type system it should be fairly straight forward to add them if  
needed.

As far as front-end support goes, I do have changes to my local clang  
tree which add attributes for address spaces which have been working  
for my purposes. However since my initial work my free time has  
become more scarce and I haven't had the opportunity to clean up the  
patches and submit them back to the tree.

The lack of a public back end with which to consume the generated IR  
with embedded C extensions and validate the front end is also a  
problem. Without such a platform it will be difficult for the LLVM  
project to guarantee that the functionality stays working going forward.

Do you mind sharing more details about your project, particularly how  
soon you need the front end support and if you would be able to  
provide a way (ideally contributed back to LLVM) to regress these  
features going forward?

--
Christopher Lamb

On Jan 30, 2008, at 9:53 AM, <Alireza.Moshtaghi at microchip.com>  
<Alireza.Moshtaghi at microchip.com> wrote:

> Thank you Chris,
> That is great news...
> So his modifications are in llvm-2.2?
> How has Christopher tested them? Are there attributes or intrinsics  
> that
> I can also use?
>
> A.
>
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Chris Lattner
> Sent: Tuesday, January 29, 2008 9:23 PM
> To: LLVM Developers Mailing List
> Subject: Re: [LLVMdev] C embedded extensions and LLVM
>
> On Jan 29, 2008, at 9:56 AM, <Alireza.Moshtaghi at microchip.com>
> <Alireza.Moshtaghi at microchip.com
>> wrote:
>> Christopher,
>> It has been a while since we last talked about C embedded extensions
>> in
>> LLVM, I was moving back and froth from project to project and didn't
>> get
>> a chance to follow up. I was wondering if you have made any  
>> changes to
>> LLVM IR and if so what has been added. And how can I contribute?
>
> My understanding is that Christopher's patches have all landed in
> llvm, so the IR is capable of capturing and propagating the address
> space information.  However, we have no front-end that correctly
> generates this.  My understanding is that Christopher has patches in
> progress to add this to clang, but I'm not sure what the state of
> these is.  It would be great to get have help getting this into clang.
>
> -Chris
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080130/061fbd92/attachment.html>


More information about the llvm-dev mailing list