[cfe-commits] [Patch 1 of 5] Proposed fix for PR12850

Andy Gibbs andyg1001 at hotmail.co.uk
Wed Aug 22 09:28:40 PDT 2012


Hi,

Attached here is the first of five patches for review and comment and (I
hope) eventual committal which seek to solve (or part solve) bug report
#12850 (http://llvm.org/bugs/show_bug.cgi?id=12850) where clang will
take an inordinate amount of time to compile certain constexpr functions.

This is the latest incarnation of a patch which I started back in June but
then promptly got pushed to the back of the list while other things (more
important!) took over.  I hope I can still remember how it works!

In summary, the approach I have taken is to cache (or "memoize" in other
people's jargon) previous evaluations, but I will explain this more fully
in the posts attached to the appropriate patches.

The patches are laid out as follows:

Patch 1: Add getMemorySize() function to APValue which will be used in
         determining memory consumption of the cache (this patch is
         attached to this post).

Patch 2: Adds a FunctionCache class which does all the interesting
         stuff.

Patch 3: Wires FunctionCache into HandleFunctionCall in ExprConstant.cpp

Patch 4: Adapts VerifyDiagnosticConsumer to provide performance info to
         test cases

Patch 5: Contains the actual test-cases.

Thanks,
Andy


-------------- next part --------------
A non-text attachment was scrubbed...
Name: part1.diff
Type: application/octet-stream
Size: 3510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120822/5c7b3199/attachment.obj>


More information about the cfe-commits mailing list