This is an archive of the discontinued LLVM Phabricator instance.

Replace custom getNumPreds/etc with PredIteratorCache that does the same thing
AcceptedPublic

Authored by dberlin on Apr 21 2015, 12:36 PM.

Details

Reviewers
qcolombet
Summary

Replace getting predecessors and predecessor counts with predcache.

Dunno whether it makes sense to be fully lazy, but if we are, we might as well
do it the "standard" way.

Diff Detail

Event Timeline

dberlin retitled this revision from to Replace custom getNumPreds/etc with PredIteratorCache that does the same thing.
dberlin updated this object.
dberlin edited the test plan for this revision. (Show Details)
dberlin added a reviewer: qcolombet.
dberlin added a subscriber: Unknown Object (MLST).
qcolombet accepted this revision.Apr 30 2015, 12:01 PM
qcolombet edited edge metadata.

Hi Daniel,

Don’t know either if that makes sense, but LGTM ;).

Cheers,
-Quentin

lib/Transforms/Utils/PromoteMemoryToRegister.cpp
269

Period at the end of the comment ;).

This revision is now accepted and ready to land.Apr 30 2015, 12:01 PM

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.

Should it be abandoned?