diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-09-16 18:44:52 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-09-16 18:44:52 +0000 |
commit | d452758bb6b59340528a26def9ecc24b329d4ecf (patch) | |
tree | 25346308283c18880c7584738c0907dec5968242 /lib/Analysis/GRCoreEngine.cpp | |
parent | 3f61c18dd765c27bf900b22dc3a5f2a68e2364a1 (diff) |
ProgramPoint now takes the space of two pointers instead of one. This change was
motivated because it became clear that the number of subclasses of ProgramPoint
would expand and we ran out of bits to represent a pointer variant. As a plus of
this change, BlockEdge program points can now be represented explicitly without
using a cache of CFGBlock* pairs in CFG.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56245 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRCoreEngine.cpp')
-rw-r--r-- | lib/Analysis/GRCoreEngine.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/Analysis/GRCoreEngine.cpp b/lib/Analysis/GRCoreEngine.cpp index a7e1458e7a..84a8d5522d 100644 --- a/lib/Analysis/GRCoreEngine.cpp +++ b/lib/Analysis/GRCoreEngine.cpp @@ -69,7 +69,7 @@ bool GRCoreEngineImpl::ExecuteWorkList(unsigned Steps) { // Construct an edge representing the // starting location in the function. - BlockEdge StartLoc(getCFG(), Entry, Succ); + BlockEdge StartLoc(Entry, Succ); // Set the current block counter to being empty. WList->setBlockCounter(BCounterFactory.GetEmptyCounter()); @@ -230,7 +230,7 @@ void GRCoreEngineImpl::HandleBlockExit(CFGBlock * B, ExplodedNodeImpl* Pred) { assert (B->succ_size() == 1 && "Blocks with no terminator should have at most 1 successor."); - GenerateNode(BlockEdge(getCFG(),B,*(B->succ_begin())), Pred->State, Pred); + GenerateNode(BlockEdge(B, *(B->succ_begin())), Pred->State, Pred); } void GRCoreEngineImpl::HandleBranch(Expr* Cond, Stmt* Term, CFGBlock * B, @@ -350,8 +350,7 @@ ExplodedNodeImpl* GRBranchNodeBuilderImpl::generateNodeImpl(const void* State, bool IsNew; ExplodedNodeImpl* Succ = - Eng.G->getNodeImpl(BlockEdge(Eng.getCFG(), Src, branch ? DstT : DstF), - State, &IsNew); + Eng.G->getNodeImpl(BlockEdge(Src, branch ? DstT : DstF), State, &IsNew); Succ->addPredecessor(Pred); @@ -382,8 +381,7 @@ GRIndirectGotoNodeBuilderImpl::generateNodeImpl(const Iterator& I, bool IsNew; ExplodedNodeImpl* Succ = - Eng.G->getNodeImpl(BlockEdge(Eng.getCFG(), Src, I.getBlock(), true), - St, &IsNew); + Eng.G->getNodeImpl(BlockEdge(Src, I.getBlock()), St, &IsNew); Succ->addPredecessor(Pred); @@ -407,9 +405,8 @@ GRSwitchNodeBuilderImpl::generateCaseStmtNodeImpl(const Iterator& I, bool IsNew; - ExplodedNodeImpl* Succ = Eng.G->getNodeImpl(BlockEdge(Eng.getCFG(), Src, - I.getBlock()), - St, &IsNew); + ExplodedNodeImpl* Succ = Eng.G->getNodeImpl(BlockEdge(Src, I.getBlock()), + St, &IsNew); Succ->addPredecessor(Pred); if (IsNew) { @@ -431,9 +428,8 @@ GRSwitchNodeBuilderImpl::generateDefaultCaseNodeImpl(const void* St, bool IsNew; - ExplodedNodeImpl* Succ = Eng.G->getNodeImpl(BlockEdge(Eng.getCFG(), Src, - DefaultBlock), - St, &IsNew); + ExplodedNodeImpl* Succ = Eng.G->getNodeImpl(BlockEdge(Src, DefaultBlock), + St, &IsNew); Succ->addPredecessor(Pred); if (IsNew) { |