Skip to content

Commit 628d7b9

Browse files
authored
Merge pull request #178 from jbj/ir-duplicateOperand-perf
C++: IR: InstructionSanity::duplicateOperand perf
2 parents 3c3cc2e + ecfc536 commit 628d7b9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Instruction.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module InstructionSanity {
6363
* Holds if instruction `instr` has multiple operands with tag `tag`.
6464
*/
6565
query predicate duplicateOperand(Instruction instr, OperandTag tag) {
66-
count(instr.getOperand(tag)) > 1 and
66+
strictcount(instr.getOperand(tag)) > 1 and
6767
not tag instanceof UnmodeledUseOperand
6868
}
6969

cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Instruction.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module InstructionSanity {
6363
* Holds if instruction `instr` has multiple operands with tag `tag`.
6464
*/
6565
query predicate duplicateOperand(Instruction instr, OperandTag tag) {
66-
count(instr.getOperand(tag)) > 1 and
66+
strictcount(instr.getOperand(tag)) > 1 and
6767
not tag instanceof UnmodeledUseOperand
6868
}
6969

cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/Instruction.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module InstructionSanity {
6363
* Holds if instruction `instr` has multiple operands with tag `tag`.
6464
*/
6565
query predicate duplicateOperand(Instruction instr, OperandTag tag) {
66-
count(instr.getOperand(tag)) > 1 and
66+
strictcount(instr.getOperand(tag)) > 1 and
6767
not tag instanceof UnmodeledUseOperand
6868
}
6969

0 commit comments

Comments
 (0)