[PATCH] Replace custom getNumPreds/etc with PredIteratorCache that does the same thing
Quentin Colombet
qcolombet at apple.com
Thu Apr 30 13:30:23 PDT 2015
Thanks for checking.
I was wondering since the PredIteratorCache seems a bit more complicated.
Q.
> On Apr 30, 2015, at 12:38 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
>
> FWIW, while I did not speed test *this* change, In timings elsewhere,
> i've found that PredIteratorCache is often slower than the pred
> iterator for counting preds
> (because it copies the pred list), and only faster in really
> degenerate cases for walking preds.
>
> So i'm not going to submit this.
>
>
> On Thu, Apr 30, 2015 at 12:01 PM, Quentin Colombet <qcolombet at apple.com> wrote:
>> Hi Daniel,
>>
>> Don’t know either if that makes sense, but LGTM ;).
>>
>> Cheers,
>> -Quentin
>>
>>
>> ================
>> Comment at: lib/Transforms/Utils/PromoteMemoryToRegister.cpp:269
>> @@ -267,3 +268,3 @@
>>
>> - /// Lazily compute the number of predecessors a block has.
>> - DenseMap<const BasicBlock *, unsigned> BBNumPreds;
>> + /// Cache of predecessor info
>> + PredIteratorCache PredCache;
>> ----------------
>> Period at the end of the comment ;).
>>
>> http://reviews.llvm.org/D9167
>>
>> EMAIL PREFERENCES
>> http://reviews.llvm.org/settings/panel/emailpreferences/
>>
>>
More information about the llvm-commits
mailing list