[Analysis] Pass RecurrenceDescriptor as const reference. NFCI.
We were passing the RecurrenceDescriptor by value to most of the reduction analysis methods, despite it being rather bulky with TrackingVH members (that can be costly to copy). In all these cases we're only using the RecurrenceDescriptor for rather basic purposes (access to types/kinds etc.). Differential Revision: https://reviews.llvm.org/D104029
This commit is contained in:
@@ -921,7 +921,7 @@ bool LoopVectorizationLegality::canVectorizeFPMath(
|
||||
// have the isOrdered flag set, which indicates that we can move the
|
||||
// reduction operations in-loop.
|
||||
return (all_of(getReductionVars(), [&](auto &Reduction) -> bool {
|
||||
RecurrenceDescriptor RdxDesc = Reduction.second;
|
||||
const RecurrenceDescriptor &RdxDesc = Reduction.second;
|
||||
return !RdxDesc.hasExactFPMath() || RdxDesc.isOrdered();
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user