Ted Kremenek | 11de5cb | 2007-09-20 21:42:55 +0000 | [diff] [blame] | 1 | //=- LiveVariables.cpp - Live Variable Analysis for Source CFGs -*- C++ --*-==// |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 0bc735f | 2007-12-29 19:59:25 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 7 | // details. |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 8 | // |
| 9 | //===----------------------------------------------------------------------===// |
| 10 | // |
| 11 | // This file implements Live Variables analysis for source-level CFGs. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
Ted Kremenek | cf6e41b | 2007-12-21 21:42:19 +0000 | [diff] [blame] | 15 | #include "clang/Analysis/Analyses/LiveVariables.h" |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 16 | #include "clang/Basic/SourceManager.h" |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 17 | #include "clang/AST/Expr.h" |
| 18 | #include "clang/AST/CFG.h" |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 19 | #include "clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h" |
Ted Kremenek | 1de632b | 2007-09-25 21:00:24 +0000 | [diff] [blame] | 20 | #include "clang/Analysis/FlowSensitive/DataflowSolver.h" |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 21 | #include "llvm/ADT/SmallPtrSet.h" |
Ted Kremenek | c2b51d8 | 2008-01-08 18:19:08 +0000 | [diff] [blame] | 22 | #include "llvm/Support/Compiler.h" |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 23 | |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 24 | #include <string.h> |
| 25 | #include <stdio.h> |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 26 | |
| 27 | using namespace clang; |
| 28 | |
| 29 | //===----------------------------------------------------------------------===// |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 30 | // Dataflow initialization logic. |
| 31 | //===----------------------------------------------------------------------===// |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 32 | |
| 33 | namespace { |
Ted Kremenek | c2b51d8 | 2008-01-08 18:19:08 +0000 | [diff] [blame] | 34 | class VISIBILITY_HIDDEN RegisterDecls |
| 35 | : public CFGRecStmtDeclVisitor<RegisterDecls> { |
| 36 | |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 37 | LiveVariables::AnalysisDataTy& AD; |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 38 | public: |
Ted Kremenek | 11e7218 | 2007-10-01 20:33:52 +0000 | [diff] [blame] | 39 | RegisterDecls(LiveVariables::AnalysisDataTy& ad) : AD(ad) {} |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 40 | void VisitVarDecl(VarDecl* VD) { AD.Register(VD); } |
Ted Kremenek | 9f9141c | 2007-11-20 03:01:58 +0000 | [diff] [blame] | 41 | CFG& getCFG() { return AD.getCFG(); } |
Ted Kremenek | 11e7218 | 2007-10-01 20:33:52 +0000 | [diff] [blame] | 42 | }; |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 43 | } // end anonymous namespace |
| 44 | |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 45 | void LiveVariables::InitializeValues(const CFG& cfg) { |
Ted Kremenek | 11e7218 | 2007-10-01 20:33:52 +0000 | [diff] [blame] | 46 | RegisterDecls R(getAnalysisData()); |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 47 | cfg.VisitBlockStmts(R); |
| 48 | } |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 49 | |
| 50 | //===----------------------------------------------------------------------===// |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 51 | // Transfer functions. |
| 52 | //===----------------------------------------------------------------------===// |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 53 | |
| 54 | namespace { |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 55 | |
| 56 | static const bool Alive = true; |
| 57 | static const bool Dead = false; |
| 58 | |
Ted Kremenek | c2b51d8 | 2008-01-08 18:19:08 +0000 | [diff] [blame] | 59 | class VISIBILITY_HIDDEN TransferFuncs : public CFGRecStmtVisitor<TransferFuncs>{ |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 60 | LiveVariables::AnalysisDataTy& AD; |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 61 | LiveVariables::ValTy LiveState; |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 62 | public: |
Ted Kremenek | 11e7218 | 2007-10-01 20:33:52 +0000 | [diff] [blame] | 63 | TransferFuncs(LiveVariables::AnalysisDataTy& ad) : AD(ad) {} |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 64 | |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 65 | LiveVariables::ValTy& getVal() { return LiveState; } |
Ted Kremenek | 9f9141c | 2007-11-20 03:01:58 +0000 | [diff] [blame] | 66 | CFG& getCFG() { return AD.getCFG(); } |
Ted Kremenek | f175805 | 2007-09-12 19:10:52 +0000 | [diff] [blame] | 67 | |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 68 | void VisitDeclRefExpr(DeclRefExpr* DR); |
| 69 | void VisitBinaryOperator(BinaryOperator* B); |
| 70 | void VisitAssign(BinaryOperator* B); |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 71 | void VisitDeclStmt(DeclStmt* DS); |
| 72 | void VisitUnaryOperator(UnaryOperator* U); |
Ted Kremenek | 11e7218 | 2007-10-01 20:33:52 +0000 | [diff] [blame] | 73 | void Visit(Stmt *S); |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 74 | }; |
Ted Kremenek | 11e7218 | 2007-10-01 20:33:52 +0000 | [diff] [blame] | 75 | |
Ted Kremenek | 11e7218 | 2007-10-01 20:33:52 +0000 | [diff] [blame] | 76 | void TransferFuncs::Visit(Stmt *S) { |
| 77 | if (AD.Observer) |
| 78 | AD.Observer->ObserveStmt(S,AD,LiveState); |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 79 | |
Ted Kremenek | 8694674 | 2008-01-17 20:48:37 +0000 | [diff] [blame] | 80 | if (S == getCurrentBlkStmt()) { |
Ted Kremenek | 8694674 | 2008-01-17 20:48:37 +0000 | [diff] [blame] | 81 | if (getCFG().isBlkExpr(S)) LiveState(S,AD) = Dead; |
Ted Kremenek | 2a9da9c | 2008-01-18 00:40:21 +0000 | [diff] [blame^] | 82 | StmtVisitor<TransferFuncs,void>::Visit(S); |
Ted Kremenek | 8694674 | 2008-01-17 20:48:37 +0000 | [diff] [blame] | 83 | } |
| 84 | else if (!getCFG().isBlkExpr(S)) |
| 85 | StmtVisitor<TransferFuncs,void>::Visit(S); |
| 86 | else |
| 87 | // For block-level expressions, mark that they are live. |
| 88 | LiveState(S,AD) = Alive; |
Ted Kremenek | 11e7218 | 2007-10-01 20:33:52 +0000 | [diff] [blame] | 89 | } |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 90 | |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 91 | void TransferFuncs::VisitDeclRefExpr(DeclRefExpr* DR) { |
| 92 | if (VarDecl* V = dyn_cast<VarDecl>(DR->getDecl())) |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 93 | LiveState(V,AD) = Alive; |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 94 | } |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 95 | |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 96 | void TransferFuncs::VisitBinaryOperator(BinaryOperator* B) { |
Ted Kremenek | f175805 | 2007-09-12 19:10:52 +0000 | [diff] [blame] | 97 | if (B->isAssignmentOp()) VisitAssign(B); |
| 98 | else VisitStmt(B); |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 99 | } |
| 100 | |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 101 | void TransferFuncs::VisitUnaryOperator(UnaryOperator* U) { |
Ted Kremenek | 5e2b609 | 2008-01-17 17:50:49 +0000 | [diff] [blame] | 102 | Expr *E = U->getSubExpr(); |
Ted Kremenek | bcb07d5 | 2007-09-28 21:29:33 +0000 | [diff] [blame] | 103 | |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 104 | switch (U->getOpcode()) { |
Ted Kremenek | 8d9ebae | 2007-12-13 04:47:15 +0000 | [diff] [blame] | 105 | case UnaryOperator::SizeOf: return; |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 106 | case UnaryOperator::PostInc: |
| 107 | case UnaryOperator::PostDec: |
| 108 | case UnaryOperator::PreInc: |
| 109 | case UnaryOperator::PreDec: |
| 110 | case UnaryOperator::AddrOf: |
| 111 | // Walk through the subexpressions, blasting through ParenExprs |
| 112 | // until we either find a DeclRefExpr or some non-DeclRefExpr |
| 113 | // expression. |
Ted Kremenek | 5e2b609 | 2008-01-17 17:50:49 +0000 | [diff] [blame] | 114 | if (DeclRefExpr* DR = dyn_cast<DeclRefExpr>(E->IgnoreParens())) { |
Ted Kremenek | bcb07d5 | 2007-09-28 21:29:33 +0000 | [diff] [blame] | 115 | // Treat the --/++/& operator as a kill. |
| 116 | LiveState(DR->getDecl(),AD) = Dead; |
| 117 | if (AD.Observer) { AD.Observer->ObserverKill(DR); } |
| 118 | return VisitDeclRefExpr(DR); |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 119 | } |
Ted Kremenek | bcb07d5 | 2007-09-28 21:29:33 +0000 | [diff] [blame] | 120 | |
| 121 | // Fall-through. |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 122 | |
| 123 | default: |
Ted Kremenek | 5e2b609 | 2008-01-17 17:50:49 +0000 | [diff] [blame] | 124 | return Visit(E); |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 125 | } |
| 126 | } |
Ted Kremenek | bcb07d5 | 2007-09-28 21:29:33 +0000 | [diff] [blame] | 127 | |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 128 | void TransferFuncs::VisitAssign(BinaryOperator* B) { |
Ted Kremenek | 5e2b609 | 2008-01-17 17:50:49 +0000 | [diff] [blame] | 129 | Expr* LHS = B->getLHS(); |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 130 | |
Ted Kremenek | bcb07d5 | 2007-09-28 21:29:33 +0000 | [diff] [blame] | 131 | // Assigning to a variable? |
Ted Kremenek | 5e2b609 | 2008-01-17 17:50:49 +0000 | [diff] [blame] | 132 | if (DeclRefExpr* DR = dyn_cast<DeclRefExpr>(LHS->IgnoreParens())) { |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 133 | LiveState(DR->getDecl(),AD) = Dead; |
| 134 | if (AD.Observer) { AD.Observer->ObserverKill(DR); } |
| 135 | |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 136 | // Handle things like +=, etc., which also generate "uses" |
| 137 | // of a variable. Do this just by visiting the subexpression. |
Ted Kremenek | bcb07d5 | 2007-09-28 21:29:33 +0000 | [diff] [blame] | 138 | if (B->getOpcode() != BinaryOperator::Assign) |
| 139 | VisitDeclRefExpr(DR); |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 140 | } |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 141 | else // Not assigning to a variable. Process LHS as usual. |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 142 | Visit(LHS); |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 143 | |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 144 | Visit(B->getRHS()); |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 145 | } |
| 146 | |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 147 | void TransferFuncs::VisitDeclStmt(DeclStmt* DS) { |
| 148 | // Declarations effectively "kill" a variable since they cannot |
| 149 | // possibly be live before they are declared. |
Ted Kremenek | 11e7218 | 2007-10-01 20:33:52 +0000 | [diff] [blame] | 150 | for (ScopedDecl* D = DS->getDecl(); D != NULL; D = D->getNextDeclarator()) |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 151 | LiveState(D,AD) = Dead; |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 152 | } |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 153 | |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 154 | } // end anonymous namespace |
| 155 | |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 156 | //===----------------------------------------------------------------------===// |
| 157 | // Merge operator: if something is live on any successor block, it is live |
| 158 | // in the current block (a set union). |
| 159 | //===----------------------------------------------------------------------===// |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 160 | |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 161 | namespace { |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 162 | typedef DeclBitVector_Types::Union Merge; |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 163 | typedef DataflowSolver<LiveVariables,TransferFuncs,Merge> Solver; |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 164 | } // end anonymous namespace |
| 165 | |
| 166 | //===----------------------------------------------------------------------===// |
| 167 | // External interface to run Liveness analysis. |
| 168 | //===----------------------------------------------------------------------===// |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 169 | |
Ted Kremenek | 83c01da | 2008-01-11 00:40:29 +0000 | [diff] [blame] | 170 | void LiveVariables::runOnCFG(CFG& cfg) { |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 171 | Solver S(*this); |
| 172 | S.runOnCFG(cfg); |
| 173 | } |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 174 | |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 175 | void LiveVariables::runOnAllBlocks(const CFG& cfg, |
Ted Kremenek | 79649df | 2008-01-17 18:25:22 +0000 | [diff] [blame] | 176 | LiveVariables::ObserverTy* Obs, |
| 177 | bool recordStmtValues) { |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 178 | Solver S(*this); |
| 179 | ObserverTy* OldObserver = getAnalysisData().Observer; |
Ted Kremenek | 79649df | 2008-01-17 18:25:22 +0000 | [diff] [blame] | 180 | getAnalysisData().Observer = Obs; |
| 181 | S.runOnAllBlocks(cfg, recordStmtValues); |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 182 | getAnalysisData().Observer = OldObserver; |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 183 | } |
| 184 | |
| 185 | //===----------------------------------------------------------------------===// |
| 186 | // liveness queries |
| 187 | // |
| 188 | |
Ted Kremenek | c0576ca | 2007-09-10 17:36:42 +0000 | [diff] [blame] | 189 | bool LiveVariables::isLive(const CFGBlock* B, const VarDecl* D) const { |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 190 | return getBlockData(B)(D,getAnalysisData()); |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 191 | } |
| 192 | |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 193 | bool LiveVariables::isLive(const ValTy& Live, const VarDecl* D) const { |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 194 | return Live(D,getAnalysisData()); |
Ted Kremenek | 055c275 | 2007-09-06 23:00:42 +0000 | [diff] [blame] | 195 | } |
| 196 | |
Ted Kremenek | 8694674 | 2008-01-17 20:48:37 +0000 | [diff] [blame] | 197 | bool LiveVariables::isLive(const Stmt* Loc, const Stmt* StmtVal) const { |
| 198 | return getStmtData(Loc)(StmtVal,getAnalysisData()); |
| 199 | } |
| 200 | |
Ted Kremenek | 2a9da9c | 2008-01-18 00:40:21 +0000 | [diff] [blame^] | 201 | bool LiveVariables::isLive(const Stmt* Loc, const VarDecl* D) const { |
| 202 | return getStmtData(Loc)(D,getAnalysisData()); |
| 203 | } |
| 204 | |
Ted Kremenek | 055c275 | 2007-09-06 23:00:42 +0000 | [diff] [blame] | 205 | //===----------------------------------------------------------------------===// |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 206 | // printing liveness state for debugging |
| 207 | // |
| 208 | |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 209 | void LiveVariables::dumpLiveness(const ValTy& V, SourceManager& SM) const { |
| 210 | const AnalysisDataTy& AD = getAnalysisData(); |
| 211 | |
Ted Kremenek | f63aa45 | 2007-09-28 20:38:59 +0000 | [diff] [blame] | 212 | for (AnalysisDataTy::decl_iterator I = AD.begin_decl(), |
| 213 | E = AD.end_decl(); I!=E; ++I) |
| 214 | if (V.getDeclBit(I->second)) { |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 215 | SourceLocation PhysLoc = SM.getPhysicalLoc(I->first->getLocation()); |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 216 | |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 217 | fprintf(stderr, " %s <%s:%u:%u>\n", |
| 218 | I->first->getIdentifier()->getName(), |
| 219 | SM.getSourceName(PhysLoc), |
| 220 | SM.getLineNumber(PhysLoc), |
| 221 | SM.getColumnNumber(PhysLoc)); |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 222 | } |
Ted Kremenek | e4e6334 | 2007-09-06 00:17:54 +0000 | [diff] [blame] | 223 | } |
| 224 | |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 225 | void LiveVariables::dumpBlockLiveness(SourceManager& M) const { |
Ted Kremenek | fdd225e | 2007-09-25 04:31:27 +0000 | [diff] [blame] | 226 | for (BlockDataMapTy::iterator I = getBlockDataMap().begin(), |
| 227 | E = getBlockDataMap().end(); I!=E; ++I) { |
| 228 | fprintf(stderr, "\n[ B%d (live variables at block exit) ]\n", |
Ted Kremenek | 27b07c5 | 2007-09-06 21:26:58 +0000 | [diff] [blame] | 229 | I->first->getBlockID()); |
| 230 | |
| 231 | dumpLiveness(I->second,M); |
| 232 | } |
Ted Kremenek | c0576ca | 2007-09-10 17:36:42 +0000 | [diff] [blame] | 233 | |
| 234 | fprintf(stderr,"\n"); |
| 235 | } |