diff --git a/cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll b/cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll index 1f20a2c1677..8cebecae678 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/implementation/aliased_ssa/Operand.qll @@ -35,7 +35,9 @@ private Instruction getNonPhiOperandDef(Instruction instr) { * analyses that assume a cycle-free graph of non-phi operands. Therefore it's * better to remove these operands than to leave cycles in the operand graph. */ +pragma[noopt] private predicate isInCycle(Instruction instr) { + instr instanceof Instruction and getNonPhiOperandDef+(instr) = instr } diff --git a/cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Operand.qll b/cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Operand.qll index 1f20a2c1677..8cebecae678 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Operand.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/implementation/raw/Operand.qll @@ -35,7 +35,9 @@ private Instruction getNonPhiOperandDef(Instruction instr) { * analyses that assume a cycle-free graph of non-phi operands. Therefore it's * better to remove these operands than to leave cycles in the operand graph. */ +pragma[noopt] private predicate isInCycle(Instruction instr) { + instr instanceof Instruction and getNonPhiOperandDef+(instr) = instr } diff --git a/cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/Operand.qll b/cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/Operand.qll index 1f20a2c1677..8cebecae678 100644 --- a/cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/Operand.qll +++ b/cpp/ql/src/semmle/code/cpp/ir/implementation/unaliased_ssa/Operand.qll @@ -35,7 +35,9 @@ private Instruction getNonPhiOperandDef(Instruction instr) { * analyses that assume a cycle-free graph of non-phi operands. Therefore it's * better to remove these operands than to leave cycles in the operand graph. */ +pragma[noopt] private predicate isInCycle(Instruction instr) { + instr instanceof Instruction and getNonPhiOperandDef+(instr) = instr }