CFGReachabilityAnalysis.h (219077) | CFGReachabilityAnalysis.h (221345) |
---|---|
1//==- CFGReachabilityAnalysis.h - Basic reachability analysis ----*- C++ -*-==// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 15 unchanged lines hidden (view full) --- 24class CFG; 25class CFGBlock; 26 27// A class that performs reachability queries for CFGBlocks. Several internal 28// checks in this checker require reachability information. The requests all 29// tend to have a common destination, so we lazily do a predecessor search 30// from the destination node and cache the results to prevent work 31// duplication. | 1//==- CFGReachabilityAnalysis.h - Basic reachability analysis ----*- C++ -*-==// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 15 unchanged lines hidden (view full) --- 24class CFG; 25class CFGBlock; 26 27// A class that performs reachability queries for CFGBlocks. Several internal 28// checks in this checker require reachability information. The requests all 29// tend to have a common destination, so we lazily do a predecessor search 30// from the destination node and cache the results to prevent work 31// duplication. |
32class CFGReachabilityAnalysis { | 32class CFGReverseBlockReachabilityAnalysis { |
33 typedef llvm::BitVector ReachableSet; 34 typedef llvm::DenseMap<unsigned, ReachableSet> ReachableMap; 35 ReachableSet analyzed; 36 ReachableMap reachable; 37public: | 33 typedef llvm::BitVector ReachableSet; 34 typedef llvm::DenseMap<unsigned, ReachableSet> ReachableMap; 35 ReachableSet analyzed; 36 ReachableMap reachable; 37public: |
38 CFGReachabilityAnalysis(const CFG &cfg); | 38 CFGReverseBlockReachabilityAnalysis(const CFG &cfg); |
39 40 /// Returns true if the block 'Dst' can be reached from block 'Src'. 41 bool isReachable(const CFGBlock *Src, const CFGBlock *Dst); 42 43private: 44 void mapReachability(const CFGBlock *Dst); 45}; 46 47} 48 49#endif | 39 40 /// Returns true if the block 'Dst' can be reached from block 'Src'. 41 bool isReachable(const CFGBlock *Src, const CFGBlock *Dst); 42 43private: 44 void mapReachability(const CFGBlock *Dst); 45}; 46 47} 48 49#endif |