[Analysis] Pass RecurrenceDescriptor as const reference. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 11 Jun 2021 09:19:37 +0000 (10:19 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 11 Jun 2021 09:24:14 +0000 (10:24 +0100)
commit5e6bfb661e8b51b440eda04d0be0c9a00b8713e9
tree4d89c7a111b4f83b4a7de6227408af4ec46481e2
parentd789ed11ea01b30a69e8cd9612ebd336398ef3ec
[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
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/include/llvm/Transforms/Utils/LoopUtils.h
llvm/lib/Analysis/TargetTransformInfo.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h
llvm/lib/Transforms/Utils/LoopUtils.cpp
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp