[llvm] [IR] Use single map in PredIteratorCache (NFC) (PR #101950)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 03:02:51 PDT 2024
================
@@ -25,52 +25,29 @@ namespace llvm {
/// predecessor iterator queries. This is useful for code that repeatedly
/// wants the predecessor list for the same blocks.
class PredIteratorCache {
- /// BlockToPredsMap - Pointer to null-terminated list.
- mutable DenseMap<BasicBlock *, BasicBlock **> BlockToPredsMap;
- mutable DenseMap<BasicBlock *, unsigned> BlockToPredCountMap;
+ /// Cached list of predecessors, allocated in Memory.
+ mutable DenseMap<BasicBlock *, ArrayRef<BasicBlock *>> BlockToPredsMap;
----------------
aengelke wrote:
No `mutable`.
https://github.com/llvm/llvm-project/pull/101950
More information about the llvm-commits
mailing list