Skip to content

Commit ffe12bd

Browse files
committed
Update doc for getScaledReductions
1 parent 9caf1f7 commit ffe12bd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ class VPRecipeBuilder {
139139

140140
/// Examines reduction operations to see if the target can use a cheaper
141141
/// operation with a wider per-iteration input VF and narrower PHI VF.
142-
/// Returns null if no scaled reduction was found, otherwise a pair with a
143-
/// struct containing reduction information and the scaling factor between the
144-
/// number of elements in the input and output.
142+
/// Recursively calls itself to identify chained scaled reductions.
143+
/// Returns true if this invocation added an entry to Chains, otherwise false.
144+
/// i.e. returns false in the case that a subcall adds an entry to Chains,
145+
/// but the top-level call does not.
145146
bool getScaledReductions(
146147
Instruction *PHI, Instruction *RdxExitInstr, VFRange &Range,
147148
SmallVector<std::pair<PartialReductionChain, unsigned>> &Chains);

0 commit comments

Comments
 (0)