[llvm] r203526 - Add helpers for getting scalar sizes of vector value types.

Matt Arsenault Matthew.Arsenault at amd.com
Mon Mar 10 18:38:48 PDT 2014


Author: arsenm
Date: Mon Mar 10 20:38:48 2014
New Revision: 203526

URL: http://llvm.org/viewvc/llvm-project?rev=203526&view=rev
Log:
Add helpers for getting scalar sizes of vector value types.

Modified:
    llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
    llvm/trunk/include/llvm/CodeGen/ValueTypes.h

Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=203526&r1=203525&r2=203526&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Mon Mar 10 20:38:48 2014
@@ -145,6 +145,10 @@ public:
     return getValueType().getSizeInBits();
   }
 
+  unsigned getScalarValueSizeInBits() const {
+    return getValueType().getScalarType().getSizeInBits();
+  }
+
   // Forwarding methods - These forward to the corresponding methods in SDNode.
   inline unsigned getOpcode() const;
   inline unsigned getNumOperands() const;

Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.h?rev=203526&r1=203525&r2=203526&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Mon Mar 10 20:38:48 2014
@@ -434,6 +434,10 @@ namespace llvm {
       }
     }
 
+    unsigned getScalarSizeInBits() const {
+      return getScalarType().getSizeInBits();
+    }
+
     /// getStoreSize - Return the number of bytes overwritten by a store
     /// of the specified value type.
     unsigned getStoreSize() const {
@@ -788,6 +792,10 @@ namespace llvm {
       return getExtendedSizeInBits();
     }
 
+    unsigned getScalarSizeInBits() const {
+      return getScalarType().getSizeInBits();
+    }
+
     /// getStoreSize - Return the number of bytes overwritten by a store
     /// of the specified value type.
     unsigned getStoreSize() const {





More information about the llvm-commits mailing list