Move copyKillDeadInfo out-of-line. Add findRegisterUseOperand().
[oota-llvm.git] / include / llvm / Type.h
index 20a3e35d0c25181957e300a0833b7825acecdb51..a69e751f784825be115dc5c4b6eb0b3948d38928 100644 (file)
@@ -14,6 +14,7 @@
 #include "llvm/AbstractTypeUser.h"
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/DataTypes.h"
+#include "llvm/Support/Streams.h"
 #include "llvm/ADT/GraphTraits.h"
 #include "llvm/ADT/iterator"
 #include <string>
@@ -135,6 +136,9 @@ protected:
   ///
   mutable std::vector<AbstractTypeUser *> AbstractTypeUsers;
 public:
+  void print(llvm_ostream &O) const {
+    if (O.stream()) print(*O.stream());
+  }
   void print(std::ostream &O) const;
 
   /// @brief Debugging support: print to stderr
@@ -185,15 +189,21 @@ public:
   /// types
   bool isFloatingPoint() const { return ID == FloatTyID || ID == DoubleTyID; }
 
+  /// isFPOrFPVector - Return true if this is a FP type or a vector of FP types.
+  ///
+  bool isFPOrFPVector() const;
+  
   /// isAbstract - True if the type is either an Opaque type, or is a derived
   /// type that includes an opaque type somewhere in it.
   ///
   inline bool isAbstract() const { return Abstract; }
 
-  /// isLosslesslyConvertibleTo - Return true if this type can be converted to
-  /// 'Ty' without any reinterpretation of bits.  For example, uint to int.
-  ///
-  bool isLosslesslyConvertibleTo(const Type *Ty) const;
+  /// canLosslesslyBitCastTo - Return true if this type could be converted 
+  /// with a lossless BitCast to type 'Ty'. For example, uint to int. BitCasts 
+  /// are valid for types of the same size only where no re-interpretation of 
+  /// the bits is done.
+  /// @brief Determine if this type could be losslessly bitcast to Ty
+  bool canLosslesslyBitCastTo(const Type *Ty) const;
 
 
   /// Here are some useful little methods to query what type derived types are
@@ -347,11 +357,6 @@ public:
   ///
   void removeAbstractTypeUser(AbstractTypeUser *U) const;
 
-  /// clearAllTypeMaps - This method frees all internal memory used by the
-  /// type subsystem, which can be used in environments where this memory is
-  /// otherwise reported as a leak.
-  static void clearAllTypeMaps();
-
 private:
   /// isSizedDerivedType - Derived types like structures and arrays are sized
   /// iff all of the members of the type are sized as well.  Since asking for