X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FInstrTypes.h;h=6715416afa1cd59656117a9cf836e51ce8defe3c;hb=cdfad36b401be6fc709ea4051f9de58e1a30bcc9;hp=49cdd6a04e396d335f5075df4c3a79f052051449;hpb=42cefa1ea34bfe01b3073d27a1e78f1c1d75cedc;p=oota-llvm.git diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index 49cdd6a04e3..6715416afa1 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -612,7 +612,7 @@ public: /// A lossless cast is one that does not alter the basic value. It implies /// a no-op cast but is more stringent, preventing things like int->float, - /// long->double, int->ptr, or vector->anything. + /// long->double, or int->ptr. /// @returns true iff the cast is lossless. /// @brief Determine if this is a lossless cast. bool isLosslessCast() const; @@ -625,6 +625,14 @@ public: /// platform. Generally, the result of TargetData::getIntPtrType() should be /// passed in. If that's not available, use Type::Int64Ty, which will make /// the isNoopCast call conservative. + /// @brief Determine if the described cast is a no-op cast. + static bool isNoopCast( + Instruction::CastOps Opcode, ///< Opcode of cast + const Type *SrcTy, ///< SrcTy of cast + const Type *DstTy, ///< DstTy of cast + const Type *IntPtrTy ///< Integer type corresponding to Ptr types, or null + ); + /// @brief Determine if this cast is a no-op cast. bool isNoopCast( const Type *IntPtrTy ///< Integer type corresponding to pointer