[LLVMdev] PATCH: Use size reduction -- wave1

Chris Lattner sabre at nondot.org
Fri Apr 4 11:18:57 PDT 2008

On Thu, 3 Apr 2008, Gabor Greif wrote:
>>  have consistent use of ::Create for all IR classes to make it easier
>>  to learn the API.  That said, a temporary moment of inconsistency is
>>  ok: you could commit this part, then switch the remaining classes over.
> Yeah, this is a wart, but it is only temporary as you say.
> I already have some sed scripts that aid the transition :-)

No problem.

>>  1) Please (eventually) don't make the 'operator new' override be
>>  public.  I'd actually prefer all memory alloc/dealloc stuff to be done
>>  privately to the (vmcore) .cpp files, not exposed through the header.
> Okay. I guess these relpacement 'operator new' will go away in favor of
> Foo::Create methods.


>>  2) Eventually we'll need to make the dtor private as well.
> Okay. So no more 'delete xxx;". But then we must be careful to
> never call the Foo::Destroy() method on a NULL ptr.

I'd suggest making foo::Destroy() be non-virtual.  In the implementation 
it can just check for 'this == null' and return immediately if so.  Doing 
this also helps with the "eliminate the vtable pointer" subproject to 
shrink "Value".

>>  3) Make sure that make check and some reasonable subset of llvm-test
>>  passes with this patch :)
> I have never run llvm-test in the past. Is it just checking it out and
> following a readme?

It's pretty easy, take a look at docs/TestingGuide.html

>>  Finally, please update llvm-gcc 4.2 as well when you commit this.
>>  I'll update clang after you commit.
> Well, I have patches for both (attached). But I am caught between a rock 
> and a hard place, because Xcode 2.4.1-built llvm-gcc ICEs-out on the 
> Release llvm (which is needed as per README-LLVM). So I have a hard time 
> to run those tests. I keep trying. Possibly softlinking the Release dirs 
> to the Debug ones.

This is strange.

>>  When you commit, please email llvmdev/commits with an email that says
>>  "API CHANGE" in the subject line with info on how to upgrade out-of-
>>  tree projects (e.g. vmkit).
> Okay, will include the tcsh scripts I have written.




More information about the llvm-dev mailing list