[llvm-commits] [llvm] r112582 - /llvm/trunk/lib/Transforms/IPO/MergeFunctions.cpp
Chris Lattner
clattner at apple.com
Tue Aug 31 10:00:30 PDT 2010
On Aug 30, 2010, at 10:53 PM, Nick Lewycky wrote:
> Author: nicholas
> Date: Tue Aug 31 00:53:05 2010
> New Revision: 112582
>
> URL: http://llvm.org/viewvc/llvm-project?rev=112582&view=rev
> Log:
> Switch to DenseSet, simplifying much more code. We now have a single iteration
> where we hash, compare and fold, instead of one iteration where we build up
> the hash buckets and a second one to fold.
Looks great. I'd suggest changing:
> + typedef DenseSet<ComparableFunction *, MergeFunctionsEqualityInfo> FnSetType;
> + FnSetType FnSet;
to:
> + typedef DenseSet<ComparableFunction> FnSetType;
> + FnSetType FnSet;
Storing them by-value prevents having to separately new/delete them, and means you can define the hashing stuff as a trait instead of having to name it.
-Chris
More information about the llvm-commits
mailing list