[LLVMdev] PATCH: Use size reduction -- wave1 (algorithms)

heisenbug ggreif at gmail.com
Tue Apr 8 06:55:54 PDT 2008


As promised here comes the algorithmic part of the
project.

I have documented the way how the User object can be
recovered from an array of Use objects.

I have included a reference implementation in Haskell,
along with a randomized test suite, which passes.
This is just for those who want to manually
prove the correctness of the C++ algorithm.
If you wish I can remove (or move to another location)
the Haskell part.

A new file, Use.cpp contains the codec for the
bit-encoding. These routines will be called by the
memory allocation routines for User and by Use::getUser().
The interface is not finalized yet, I am thinking of
a User <--> Use friendship to make the new routines
private, and we definitely need some casting to get this
done. I hope to nicely hide the ugliness behind a friendly
facade.

When this part is done and checked in to trunk, I shall
begin to implement the proposed memory layout, but without
the memory reduction for now. Instead the two algorithms
will run in parallel, backing up each other and comparing
the data, asserting on discrepancies.

Here is the review link:

<http://llvm.org/viewvc/llvm-project?view=rev&revision=49380>

Cheers,

   Gabor



More information about the llvm-dev mailing list