Skip to content

Commit 4e9fcc3

Browse files
committed
C++: Remove hasIncompleteSsa and isBusyDef
They are empty now that aliased SSA has been removed.
1 parent 17753d8 commit 4e9fcc3

File tree

6 files changed

+0
-43
lines changed

6 files changed

+0
-43
lines changed

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/IRFunction.qll

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,4 @@ 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) }
6961
}

cpp/ql/lib/semmle/code/cpp/ir/implementation/raw/internal/IRConstruction.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@ Instruction getMemoryOperandDefinition(
220220
none()
221221
}
222222

223-
predicate hasIncompleteSsa(IRFunction f) { none() }
224-
225223
/**
226224
* Holds if the operand totally overlaps with its definition and consumes the
227225
* bit range `[startBitOffset, endBitOffset)`.

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/IRFunction.qll

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,4 @@ 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) }
6961
}

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SSAConstruction.qll

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -473,20 +473,6 @@ private module Cached {
473473
result = getNewInstruction(oldInstruction)
474474
)
475475
}
476-
477-
/**
478-
* Holds if the def-use information for `f` may have been omitted because it
479-
* was too expensive to compute. This happens if one of the memory allocations
480-
* in `f` is a busy definition (i.e., it has many different overlapping uses).
481-
*/
482-
pragma[nomagic]
483-
cached
484-
predicate hasIncompleteSsa(IRFunction f) {
485-
exists(Alias::MemoryLocation0 defLocation |
486-
Alias::isBusyDef(pragma[only_bind_into](defLocation)) and
487-
defLocation.getIRFunction() = f
488-
)
489-
}
490476
}
491477

492478
private Instruction getNewInstruction(OldInstruction instr) { getOldInstruction(result) = instr }

cpp/ql/lib/semmle/code/cpp/ir/implementation/unaliased_ssa/internal/SimpleSSA.qll

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,3 @@ int getStartBitOffset(MemoryLocation location) { none() }
109109

110110
/** Gets the end bit offset of a `MemoryLocation`, if any. */
111111
int getEndBitOffset(MemoryLocation location) { none() }
112-
113-
/**
114-
* Holds if `def` is a busy definition. That is, it has a large number of
115-
* overlapping uses.
116-
*/
117-
predicate isBusyDef(MemoryLocation def) { none() }

cpp/ql/lib/semmle/code/cpp/rangeanalysis/new/internal/semantic/SemanticExprSpecific.qll

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,6 @@ module SemanticExprConfig {
114114
/** Holds if no range analysis should be performed on the phi edges in `f`. */
115115
private predicate excludeFunction(Cpp::Function f) {
116116
count(f.getEntryPoint()) > 1
117-
or
118-
exists(IR::IRFunction irFunction |
119-
irFunction.getFunction() = f and
120-
irFunction.hasIncompleteSsa()
121-
)
122117
}
123118

124119
SemType getUnknownExprType(Expr expr) { result = getSemanticType(expr.getResultIRType()) }

0 commit comments

Comments
 (0)