cache the BasicBlock charpred

This commit is contained in:
Erik Krogh Kristensen
2021-03-11 16:09:47 +01:00
parent 5afb7e05ee
commit 3005439a6a

View File

@@ -119,7 +119,8 @@ private predicate bbIPostDominates(BasicBlock dom, BasicBlock bb) =
* At the database level, a basic block is represented by its first control flow node.
*/
class BasicBlock extends @cfg_node, NodeInStmtContainer {
BasicBlock() { startsBB(this) }
cached
BasicBlock() { Stages::BasicBlocks::ref() and startsBB(this) }
/** Gets a basic block succeeding this one. */
BasicBlock getASuccessor() { succBB(this, result) }