[LLVMdev] API design
David Greene
dag at cray.com
Tue Jul 3 08:58:01 PDT 2007
On Tuesday 03 July 2007 00:44, Chris Lattner wrote:
> On Mon, 2 Jul 2007, David A. Greene wrote:
> >>> - Changing the API
> >>> a) Template it to take two iterators. This causes code size bloat.
> >
> > This seems like the right solution to me. Unless llvm is running on
> > extremely limited memory embedded systems, the extra code space
> > shouldn't be an issue.
>
> Code size is always an issue.
To a greater or lesser degree. Context matters.
> Here's a different suggestion that cloning all the code. Instead of doing
> that, why not add a new (templated) CallInst ctor, one which is very
> trivial. Then you could put the conditional code in it (to detect an
> empty range) and call into the non-inline stuff we already have.
>
> It should be fine to only support random access iterators, so you could
> call into the existing stuff that takes a base + size.
That's pretty close to what I was thinking. I think it's a good solution.
-Dave
More information about the llvm-dev
mailing list