[llvm-commits] Review request: dominance frontier computation speedup
Tobias Grosser
grosser at fim.uni-passau.de
Sun Nov 28 18:25:12 PST 2010
On 11/28/2010 08:50 PM, Cameron Zwarich wrote:
> On Nov 28, 2010, at 3:04 PM, Chris Lattner wrote:
>
>> Jakob's right, SmallPtrSet was really intended to be a stack object. Typically if you overflow a stack object, it is because you're in the "large" case, and you might as well go for one big allocation to avoid the reallocation.
>>
>> However, I guess it does make sense for "small" objects to be used in (already expensive) node-based containers like std::map. I wouldn't be opposed to adding a template argument to control this, and have it get passed down as a bool to grow().
>
> Would you be opposed to adding a template parameter to SmallPtrSetImpl for this? It kind of sucks to have multiple compiled versions of the code, but the alternative would be passing a parameter into SmallPtrSetImpl::insert().
>
>> Another concern: does anything depend on iteration over DF sets being in pointer order? SmallPtrSet doesn't provide stable iteration.
>
> The IDF algorithm doesn't, and I am pretty sure that RegionInfo wouldn't need it either.
Correct, I do no see any reason RegionInfo would need it.
@Cameron:
Thank you for working on this speedup project.
Cheers
Tobi
More information about the llvm-commits
mailing list