aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-04 17:21:22 +0000
committerChris Lattner <sabre@nondot.org>2006-04-04 17:21:22 +0000
commitc45420ddd2db5200426fa4d8b9b4edaeffe01cc5 (patch)
tree51576670ccc167b9825b9c0bb5988b580d2be6a1
parent2ffc00a1d5f4de3eb923fa2eb43876c773d19dd4 (diff)
Move isShuffleLegal from TLI to Legalize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27398 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Target/TargetLowering.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index 6035191f5f..67b54484d3 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -191,6 +191,14 @@ public:
legal_fpimm_iterator legal_fpimm_end() const {
return LegalFPImmediates.end();
}
+
+ /// isShuffleMaskLegal - Targets can use this to indicate that they only
+ /// support *some* VECTOR_SHUFFLE operations, those with specific masks.
+ /// By default, if a target supports the VECTOR_SHUFFLE node, all mask values
+ /// are assumed to be legal.
+ virtual bool isShuffleMaskLegal(SDOperand Mask, MVT::ValueType VT) const {
+ return true;
+ }
/// getOperationAction - Return how this operation should be treated: either
/// it is legal, needs to be promoted to a larger size, needs to be
@@ -207,15 +215,6 @@ public:
getOperationAction(Op, VT) == Custom;
}
-
- /// isVectorShuffleLegal - Return true if a vector shuffle is legal with the
- /// specified mask and type. Targets can specify exactly which masks they
- /// support and the code generator is tasked with not creating illegal masks.
- bool isShuffleLegal(MVT::ValueType VT, SDOperand Mask) const {
- return isOperationLegal(ISD::VECTOR_SHUFFLE, VT) &&
- isShuffleMaskLegal(Mask, VT);
- }
-
/// getTypeToPromoteTo - If the action for this operation is to promote, this
/// method returns the ValueType to promote to.
MVT::ValueType getTypeToPromoteTo(unsigned Op, MVT::ValueType VT) const {
@@ -515,14 +514,6 @@ protected:
TargetDAGCombineArray[NT >> 3] |= 1 << (NT&7);
}
- /// isShuffleMaskLegal - Targets can use this to indicate that they only
- /// support *some* VECTOR_SHUFFLE operations, those with specific masks.
- /// By default, if a target supports the VECTOR_SHUFFLE node, all mask values
- /// are assumed to be legal.
- virtual bool isShuffleMaskLegal(SDOperand Mask, MVT::ValueType VT) const {
- return true;
- }
-
public:
//===--------------------------------------------------------------------===//