[DAGCombiner][TargetLowering] Pass SDValue by value to isMulAddWithConstProfitable.
authorCraig Topper <craig.topper@sifive.com>
Wed, 23 Feb 2022 20:35:06 +0000 (12:35 -0800)
committerCraig Topper <craig.topper@sifive.com>
Wed, 23 Feb 2022 20:40:45 +0000 (12:40 -0800)
commitc7d6448d037e2c053bcb19a8398653f1d31ca3de
tree3ddd13931e7da76c88599fbcc5e55093673855a3
parentafdaa86b771f9fa7bcf3ac273ae6f9637943c0d1
[DAGCombiner][TargetLowering] Pass SDValue by value to isMulAddWithConstProfitable.

Internally to DAGCombiner the SDValues were passed by non-const
reference despite not being modified. They were then passed by
const reference to TLI.

This patch passes them by value which is consistent with the vast
majority of code.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D120420
llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.h
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.h
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h