File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -940,6 +940,11 @@ module SsaCached {
940940 SsaImpl:: phiHasInputFromBlock ( phi , inp , bb )
941941 }
942942
943+ cached
944+ predicate ssaDefReachesEndOfBlock ( IRBlock bb , Definition def ) {
945+ SsaImpl:: ssaDefReachesEndOfBlock ( bb , def , _)
946+ }
947+
943948 predicate variableRead = SsaInput:: variableRead / 4 ;
944949
945950 predicate variableWrite = SsaInput:: variableWrite / 4 ;
@@ -1176,6 +1181,14 @@ class Definition extends SsaImpl::Definition {
11761181 SsaImpl:: uncertainWriteDefinitionInput ( this , result )
11771182 }
11781183
1184+ /**
1185+ * Holds if this SSA definition is live at the end of basic block `bb`.
1186+ * That is, this definition reaches the end of basic block `bb`, at which
1187+ * point it is still live, without crossing another SSA definition of the
1188+ * same source variable.
1189+ */
1190+ predicate isLiveAtEndOfBlock ( IRBlock bb ) { ssaDefReachesEndOfBlock ( bb , this ) }
1191+
11791192 /**
11801193 * Gets a definition that ultimately defines this SSA definition and is
11811194 * not itself a phi node.
You can’t perform that action at this time.
0 commit comments