Merge pull request #12102 from jketema/fix-typos

C++: Fix some typos in the use-use dataflow code
This commit is contained in:
Jeroen Ketema
2023-02-06 16:50:48 +01:00
committed by GitHub
3 changed files with 13 additions and 13 deletions

View File

@@ -404,7 +404,7 @@ private Instruction getANonConversionUse(Operand operand) {
* Gets the operand that represents the first use of the value of `call` following
* a sequence of conversion-like instructions.
*/
predicate operandForfullyConvertedCall(Operand operand, CallInstruction call) {
predicate operandForFullyConvertedCall(Operand operand, CallInstruction call) {
exists(getANonConversionUse(operand)) and
(
operand = getAUse(call)
@@ -420,8 +420,8 @@ predicate operandForfullyConvertedCall(Operand operand, CallInstruction call) {
* This predicate only holds if there is no suitable operand (i.e., no operand of a non-
* conversion instruction) to use to represent the value of `call` after conversions.
*/
predicate instructionForfullyConvertedCall(Instruction instr, CallInstruction call) {
not operandForfullyConvertedCall(_, call) and
predicate instructionForFullyConvertedCall(Instruction instr, CallInstruction call) {
not operandForFullyConvertedCall(_, call) and
(
// If there is no use of the call then we pick the call instruction
not exists(getAUse(call)) and
@@ -436,9 +436,9 @@ predicate instructionForfullyConvertedCall(Instruction instr, CallInstruction ca
/** Holds if `node` represents the output node for `call`. */
private predicate simpleOutNode(Node node, CallInstruction call) {
operandForfullyConvertedCall(node.asOperand(), call)
operandForFullyConvertedCall(node.asOperand(), call)
or
instructionForfullyConvertedCall(node.asInstruction(), call)
instructionForFullyConvertedCall(node.asInstruction(), call)
}
/** A data flow node that represents the output of a call. */

View File

@@ -697,7 +697,7 @@ class IndirectArgumentOutNode extends Node, TIndirectArgumentOutNode, PartialDef
pragma[nomagic]
predicate indirectReturnOutNodeOperand0(CallInstruction call, Operand operand, int indirectionIndex) {
Ssa::hasRawIndirectInstruction(call, indirectionIndex) and
operandForfullyConvertedCall(operand, call)
operandForFullyConvertedCall(operand, call)
}
pragma[nomagic]
@@ -705,7 +705,7 @@ predicate indirectReturnOutNodeInstruction0(
CallInstruction call, Instruction instr, int indirectionIndex
) {
Ssa::hasRawIndirectInstruction(call, indirectionIndex) and
instructionForfullyConvertedCall(instr, call)
instructionForFullyConvertedCall(instr, call)
}
/**
@@ -1392,7 +1392,7 @@ private module Cached {
)
or
// If an operand flows to an instruction, then the indirection of
// the operand also flows to the indirction of the instruction.
// the operand also flows to the indirection of the instruction.
exists(Operand operand, Instruction instr, int indirectionIndex |
simpleInstructionLocalFlowStep(operand, instr) and
hasOperandAndIndex(nodeFrom, operand, pragma[only_bind_into](indirectionIndex)) and
@@ -1539,7 +1539,7 @@ private module ExprFlowCached {
/**
* Holds if `n1.asExpr() = e1` and `n2.asExpr() = e2` and `n2` is the first node
* reacahble from `n1` such that `n2.asExpr()` exists.
* reachable from `n1` such that `n2.asExpr()` exists.
*/
private predicate localExprFlowSingleExprStep(Node n1, Expr e1, Node n2, Expr e2) {
exists(Node mid |

View File

@@ -9,7 +9,7 @@ private import DataFlowPrivate
/**
* Holds if `operand` is an operand that is not used by the dataflow library.
* Ignored operands are not recognizd as uses by SSA, and they don't have a
* Ignored operands are not recognized as uses by SSA, and they don't have a
* corresponding `(Indirect)OperandNode`.
*/
predicate ignoreOperand(Operand operand) {
@@ -208,7 +208,7 @@ private module IteratorIndirections {
override predicate isAdditionalDereference(Instruction deref, Operand address) {
exists(CallInstruction call |
operandForfullyConvertedCall(getAUse(deref), call) and
operandForFullyConvertedCall(getAUse(deref), call) and
this = call.getStaticCallTarget().getClassAndName("operator*") and
address = call.getThisArgumentOperand()
)
@@ -739,7 +739,7 @@ private module Cached {
* Holds if the underlying IR has a suitable instruction to represent a value
* that would otherwise need to be represented by a dedicated `RawIndirectInstruction` value.
*
* Such instruction do not create new `RawIndirectOperand` values, but are
* Such instructions do not create new `RawIndirectOperand` values, but are
* instead associated with the instruction returned by this predicate.
*/
cached
@@ -807,7 +807,7 @@ private module Cached {
}
/**
* Holds if the address computed by `operand` is guarenteed to write
* Holds if the address computed by `operand` is guaranteed to write
* to a specific address.
*/
private predicate isCertainAddress(Operand operand) {