[LLVMdev] To APR Or Not To APR. That is the question.

Vikram Adve vadve at cs.uiuc.edu
Sun Sep 12 20:08:52 PDT 2004


On Sep 12, 2004, at 9:52 PM, Vikram Adve wrote:

> I think we should be careful to isolate APR behind a "complete" 
> lib/System interface, i.e., not use it directly anywhere.  If we do 
> that, it becomes strictly an implementation convenience and the 
> dependence is limited to that one part of the system.
>
> One concern I have with APR is their use of pool allocation for memory 
> management.  It seems to pervade many of their APIs.  Does anyone know 
> (a) whether their pool allocators are optional or required, and (b) if 
> it has be used for the library side, does it also have to be used on 
> the client side?  I think we should stay away from any pool allocation 
> within LLVM.  We're about to have a whole Ph.D. thesis showing why 
> it's a bad idea :-)
>
> Aside from this issue, I'm in favor of using it directly and not 
> wasting effort maintaining partial, and quite likely imperfect, 
> lib/System implementations of our own on multiple platforms.  I 
> believe exploiting reasonable, mature, and long-lived external 
> technology is the right thing to do any time it saves us significant 
> development effort.


I should also add that (I think) we should only use software that can 
be redistributed freely by us in any form (so that LLVM continues to 
work "out-of-the-box"), and which has a license roughly as liberal as 
LLVM does.  In particular, we can't include any GPL software directly 
within the LLVM distribution.  I looked through the Apache license and 
I think it's ok on these two issues:
	http://www.apache.org/licenses/LICENSE-2.0.html

--Vikram
http://www.cs.uiuc.edu/~vadve
http://llvm.cs.uiuc.edu/




More information about the llvm-dev mailing list