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
part1.diff
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
