[LLVMdev] Convenience methods in ConstantExpr et al
Duncan Sands
baldrick at free.fr
Thu Feb 3 00:53:49 PST 2011
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.
Ciao, Duncan.
More information about the llvm-dev
mailing list