[llvm-commits] [Review request] Natural loop computation speedup

Duncan Sands baldrick at free.fr
Tue Nov 30 12:36:17 PST 2010


Hi Cameron,

>>> This was a 16% speedup running loops on test-suite + SPEC2000.
>>
>> dense map iterators are invalidated when new values are inserted.  Did you
>> audit the code to check that this is not a problem?  If in doubt, you could
>> build LLVM with expensive checks enabled and check that nothing blows up in
>> the testsuite.
>
> There are no iterators actually used for iteration (except in #if 0 code, and that one is fine), only for find() and only internal to LoopInfo, so it should be fine. Are there any expensive checks that invalidated iterators are not being used? I don't see them in DenseMap.h.

my mistake, you are right that expensive checks don't do anything for DenseMap
(though probably they should given the number of times people have been bitten
by the iterator invalidation behaviour).  Thanks for checking the code!

Ciao, Duncan.



More information about the llvm-commits mailing list