From 7d8143f0ef35fccc98a624525b4517eb790e2d14 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 9 Apr 2008 20:09:42 +0000 Subject: [PATCH] Make isVectorClearMaskLegal's operand list const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49446 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetLowering.h | 2 +- lib/Target/X86/X86ISelLowering.cpp | 7 ++++--- lib/Target/X86/X86ISelLowering.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 05e2c85da86..719f719846b 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -268,7 +268,7 @@ public: /// used by Targets can use this to indicate if there is a suitable /// VECTOR_SHUFFLE that can be used to replace a VAND with a constant /// pool entry. - virtual bool isVectorClearMaskLegal(std::vector &BVOps, + virtual bool isVectorClearMaskLegal(const std::vector &BVOps, MVT::ValueType EVT, SelectionDAG &DAG) const { return false; diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index a8407caf91a..1ab272781b2 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -5602,9 +5602,10 @@ X86TargetLowering::isShuffleMaskLegal(SDOperand Mask, MVT::ValueType VT) const { X86::isUNPCKH_v_undef_Mask(Mask.Val)); } -bool X86TargetLowering::isVectorClearMaskLegal(std::vector &BVOps, - MVT::ValueType EVT, - SelectionDAG &DAG) const { +bool +X86TargetLowering::isVectorClearMaskLegal(const std::vector &BVOps, + MVT::ValueType EVT, + SelectionDAG &DAG) const { unsigned NumElts = BVOps.size(); // Only do shuffles on 128-bit vector types for now. if (MVT::getSizeInBits(EVT) * NumElts == 64) return false; diff --git a/lib/Target/X86/X86ISelLowering.h b/lib/Target/X86/X86ISelLowering.h index e7cef080bce..d8099506fd6 100644 --- a/lib/Target/X86/X86ISelLowering.h +++ b/lib/Target/X86/X86ISelLowering.h @@ -420,7 +420,7 @@ namespace llvm { /// used by Targets can use this to indicate if there is a suitable /// VECTOR_SHUFFLE that can be used to replace a VAND with a constant /// pool entry. - virtual bool isVectorClearMaskLegal(std::vector &BVOps, + virtual bool isVectorClearMaskLegal(const std::vector &BVOps, MVT::ValueType EVT, SelectionDAG &DAG) const;