MachineBasicBlock has {pred,succ}_{size,empty}, and it would be nice to
have a version that operated on BasicBlock. While at it, add
implementations for use_, user_.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I'm not sure how much utility this adds -- what is a situation where you could profitably use these?
Comment Actions
I designed this specifically for http://reviews.llvm.org/D6830 -- I imagine there must be many other instances?
Comment Actions
I imagine there must be many other instances?
The case for this patch would be much stronger if you find a few of those instances and refactor them to use these *_size functions.
Comment Actions
Drop .size() functions, because they don't make any sense; it's
cheaper to do std::distance(.begin(), .end()). Put in a bunch of
usecases to support the .empty().
This is needlessly expensive when there are preds. How about checking for _end directly? (same for succ)