C++: Fix join orders.

This commit is contained in:
Mathias Vorreiter Pedersen
2022-12-14 12:32:09 +00:00
parent cb47bdd9fd
commit 526b913f7d

View File

@@ -1209,15 +1209,16 @@ private module Cached {
// the operand also flows to the indirction of the instruction.
exists(Operand operand, Instruction instr, int indirectionIndex |
simpleInstructionLocalFlowStep(operand, instr) and
hasOperandAndIndex(nodeFrom, operand, indirectionIndex) and
hasInstructionAndIndex(nodeTo, instr, indirectionIndex)
hasOperandAndIndex(nodeFrom, operand, pragma[only_bind_into](indirectionIndex)) and
hasInstructionAndIndex(nodeTo, instr, pragma[only_bind_into](indirectionIndex))
)
or
// If there's indirect flow to an operand, then there's also indirect
// flow to the operand after applying some pointer arithmetic.
exists(PointerArithmeticInstruction pointerArith, int indirectionIndex |
hasOperandAndIndex(nodeFrom, pointerArith.getAnOperand(), indirectionIndex) and
hasInstructionAndIndex(nodeTo, pointerArith, indirectionIndex)
hasOperandAndIndex(nodeFrom, pointerArith.getAnOperand(),
pragma[only_bind_into](indirectionIndex)) and
hasInstructionAndIndex(nodeTo, pointerArith, pragma[only_bind_into](indirectionIndex))
)
}
@@ -1229,8 +1230,8 @@ private module Cached {
exists(Operand operand, Instruction instr, int indirectionIndex |
simpleOperandLocalFlowStep(pragma[only_bind_into](instr), pragma[only_bind_into](operand))
|
hasOperandAndIndex(nodeTo, operand, indirectionIndex) and
hasInstructionAndIndex(nodeFrom, instr, indirectionIndex)
hasOperandAndIndex(nodeTo, operand, pragma[only_bind_into](indirectionIndex)) and
hasInstructionAndIndex(nodeFrom, instr, pragma[only_bind_into](indirectionIndex))
)
}