[all-commits] [llvm/llvm-project] c7d644: [DAGCombiner][TargetLowering] Pass SDValue by valu...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed Feb 23 12:41:38 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c7d6448d037e2c053bcb19a8398653f1d31ca3de
      https://github.com/llvm/llvm-project/commit/c7d6448d037e2c053bcb19a8398653f1d31ca3de
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-02-23 (Wed, 23 Feb 2022)

  Changed paths:
    M llvm/include/llvm/CodeGen/TargetLowering.h
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.h
    M llvm/lib/Target/ARM/ARMISelLowering.cpp
    M llvm/lib/Target/ARM/ARMISelLowering.h
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/lib/Target/RISCV/RISCVISelLowering.h

  Log Message:
  -----------
  [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




More information about the All-commits mailing list