struct VLOperands::OperandData
Declaration
struct VLOperands::OperandData { /* full declaration omitted */ };
Description
For each operand we need (i) the value, and (ii) the opcode that it would be attached to if the expression was in a left-linearized form. This is required to avoid illegal operand reordering. For example: Value Op1 is attached to a '+' operation, and Op2 to a '-'. Another way to think of this is to track all the operations across the path from the operand all the way to the root of the tree and to calculate the operation that corresponds to this path. For example, the path from Op2 to the root crosses the RHS of the '-', therefore the corresponding operation is a '-' (which matches the one in the linearized tree, as shown above). For lack of a better term, we refer to this operation as Accumulated Path Operation (APO).
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:726
Member Variables
- public llvm::Value* V = nullptr
- The operand value.
- public bool APO = false
- TreeEntries only allow a single opcode, or an alternate sequence of them (e.g, +, -). Therefore, we can safely use a boolean value for the APO. It is set to 'true' if 'V' is attached to an inverse operation in the left-linearized form (e.g., Sub/Div), and 'false' otherwise (e.g., Add/Mul)
- public bool IsUsed = false
- Helper data for the reordering function.
Method Overview
- public OperandData()
- public OperandData(llvm::Value * V, bool APO, bool IsUsed)
Methods
¶OperandData()
OperandData()
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:727
¶OperandData(llvm::Value* V, bool APO, bool IsUsed)
OperandData(llvm::Value* V, bool APO, bool IsUsed)
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:728
Parameters
- llvm::Value* V
- bool APO
- bool IsUsed