File tree Expand file tree Collapse file tree 6 files changed +40
-0
lines changed
cpp/ql/lib/semmle/code/cpp/ir/implementation Expand file tree Collapse file tree 6 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -58,4 +58,12 @@ class IRFunction extends IRFunctionBase {
5858 * Gets all blocks in this function.
5959 */
6060 final IRBlock getABlock ( ) { result .getEnclosingIRFunction ( ) = this }
61+
62+ /**
63+ * Holds if this function may have incomplete def-use information.
64+ *
65+ * Def-use information may be omitted for a function when it is too expensive
66+ * to compute.
67+ */
68+ final predicate hasIncompleteSsa ( ) { Construction:: hasIncompleteSsa ( this ) }
6169}
Original file line number Diff line number Diff line change @@ -1319,6 +1319,13 @@ predicate canReuseSsaForMemoryResult(Instruction instruction) {
13191319 // We don't support reusing SSA for any location that could create a `Chi` instruction.
13201320}
13211321
1322+ predicate hasIncompleteSsa ( IRFunction f ) {
1323+ exists ( Alias:: MemoryLocation0 defLocation |
1324+ Alias:: isBusyDef ( defLocation ) and
1325+ defLocation .getIRFunction ( ) = f
1326+ )
1327+ }
1328+
13221329/**
13231330 * Expose some of the internal predicates to PrintSSA.qll. We do this by publicly importing those modules in the
13241331 * `DebugSsa` module, which is then imported by PrintSSA.
Original file line number Diff line number Diff line change @@ -58,4 +58,12 @@ class IRFunction extends IRFunctionBase {
5858 * Gets all blocks in this function.
5959 */
6060 final IRBlock getABlock ( ) { result .getEnclosingIRFunction ( ) = this }
61+
62+ /**
63+ * Holds if this function may have incomplete def-use information.
64+ *
65+ * Def-use information may be omitted for a function when it is too expensive
66+ * to compute.
67+ */
68+ final predicate hasIncompleteSsa ( ) { Construction:: hasIncompleteSsa ( this ) }
6169}
Original file line number Diff line number Diff line change @@ -220,6 +220,8 @@ Instruction getMemoryOperandDefinition(
220220 none ( )
221221}
222222
223+ predicate hasIncompleteSsa ( IRFunction f ) { none ( ) }
224+
223225/**
224226 * Holds if the operand totally overlaps with its definition and consumes the
225227 * bit range `[startBitOffset, endBitOffset)`.
Original file line number Diff line number Diff line change @@ -58,4 +58,12 @@ class IRFunction extends IRFunctionBase {
5858 * Gets all blocks in this function.
5959 */
6060 final IRBlock getABlock ( ) { result .getEnclosingIRFunction ( ) = this }
61+
62+ /**
63+ * Holds if this function may have incomplete def-use information.
64+ *
65+ * Def-use information may be omitted for a function when it is too expensive
66+ * to compute.
67+ */
68+ final predicate hasIncompleteSsa ( ) { Construction:: hasIncompleteSsa ( this ) }
6169}
Original file line number Diff line number Diff line change @@ -1319,6 +1319,13 @@ predicate canReuseSsaForMemoryResult(Instruction instruction) {
13191319 // We don't support reusing SSA for any location that could create a `Chi` instruction.
13201320}
13211321
1322+ predicate hasIncompleteSsa ( IRFunction f ) {
1323+ exists ( Alias:: MemoryLocation0 defLocation |
1324+ Alias:: isBusyDef ( defLocation ) and
1325+ defLocation .getIRFunction ( ) = f
1326+ )
1327+ }
1328+
13221329/**
13231330 * Expose some of the internal predicates to PrintSSA.qll. We do this by publicly importing those modules in the
13241331 * `DebugSsa` module, which is then imported by PrintSSA.
You can’t perform that action at this time.
0 commit comments