add an accessor method, patch by John McCall!
[oota-llvm.git] / include / llvm / Analysis / SparsePropagation.h
index 1e2114840ad4f08327d1a44f70f11afbc26187be..c75531a7e6e0f11dd82eaaa5f6d66ca6597fb117 100644 (file)
@@ -163,6 +163,13 @@ public:
   /// lattice, not when querying it.
   bool isEdgeFeasible(BasicBlock *From, BasicBlock *To,
                       bool AggressiveUndef = false);
+
+  /// isBlockExecutable - Return true if there are any known feasible
+  /// edges into the basic block.  This is generally only useful when
+  /// querying the lattice.
+  bool isBlockExecutable(BasicBlock *BB) const {
+    return BBExecutable.count(BB);
+  }
   
 private:
   /// UpdateState - When the state for some instruction is potentially updated,