C++: IR: InstructionSanity::duplicateOperand perf

The `InstructionSanity::duplicateOperand` predicate used `count` instead
of `strictcount`. The 0-case of this `count` was as large as the
Cartesian product of `Instruction` and `OperandTag`, which made
`duplicateOperand` take forever to compute on large snapshots.
This commit is contained in:
Jonas Jensen
2018-09-11 12:00:42 +02:00
parent b6b3581e7c
commit ecfc53668f
3 changed files with 3 additions and 3 deletions

View File

@@ -63,7 +63,7 @@ module InstructionSanity {
* Holds if instruction `instr` has multiple operands with tag `tag`.
*/
query predicate duplicateOperand(Instruction instr, OperandTag tag) {
count(instr.getOperand(tag)) > 1 and
strictcount(instr.getOperand(tag)) > 1 and
not tag instanceof UnmodeledUseOperand
}

View File

@@ -63,7 +63,7 @@ module InstructionSanity {
* Holds if instruction `instr` has multiple operands with tag `tag`.
*/
query predicate duplicateOperand(Instruction instr, OperandTag tag) {
count(instr.getOperand(tag)) > 1 and
strictcount(instr.getOperand(tag)) > 1 and
not tag instanceof UnmodeledUseOperand
}

View File

@@ -63,7 +63,7 @@ module InstructionSanity {
* Holds if instruction `instr` has multiple operands with tag `tag`.
*/
query predicate duplicateOperand(Instruction instr, OperandTag tag) {
count(instr.getOperand(tag)) > 1 and
strictcount(instr.getOperand(tag)) > 1 and
not tag instanceof UnmodeledUseOperand
}