[LLVMdev] Convenience methods in ConstantExpr et al

Talin viridia at gmail.com
Wed Feb 9 11:31:38 PST 2011


On Thu, Feb 3, 2011 at 12:53 AM, Duncan Sands <baldrick at free.fr> wrote:

> Hi Talin,
>
> > I find that I call the static methods in ConstantExpr a *lot* without
> going
> > through IRBuilder - hundreds of times in my frontend. My language
> generates a
> > lot of static data - reflection information, trace tables for the garbage
> > collector, dispatch tables, runtime annotations, static object instances,
> and so
> > on. (In fact there's a special helper class "StructBuilder" that
> automates a lot
> > of the work of building constant structs, such as adding the standard
> object
> > header and so on.)
>
> I think it would be better to create a ConstBuilder class rather than add
> stuff
> to ConstantExpr.
>
> Well, it doesn't seem that there's much interest in a ConstBuilder class,
based on the number of replies to my proposal :) So I'm back to the question
as to whether it would be acceptable to add a few extra helper methods to
ConstantExpr, ConstStruct, and so on.


> Ciao, Duncan.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



-- 
-- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110209/ce2fefd5/attachment.html>


More information about the llvm-dev mailing list