>>> + if (getTypeID() == Type::PointerTyID) >>> + return isa<PointerType>(Ty); >>> return false; // Other types have no identity values >>> } >> >> What is Type::canLosslesslyBitCastTo used by now? Can we just >> eliminate it? > > InstCombine.
-raise is now the only pass using it. I added a note to PR1072 so that it is removed when -raise is. >> >> >>> +FunctionType::ParameterAttributes >>> +FunctionType::getParamAttrs(unsigned Idx) const { >>> + if (!ParamAttrs) >>> + return ParameterAttributes(0); >>> + if (Idx > ParamAttrs->size()) >>> + return ParameterAttributes(0); >>> + return (*ParamAttrs)[Idx]; >>> +} >> >> Why does this map an out-of-range index onto attr 0? Shouldn't this >> be an assert? > > No, I'm trying to save space. If you don't set any attributes or don't > set them on all the parameters then it isn't an error, you just get > "none Set". In a subsequent patch I made this clear by returning > NoAttributeSet enum (has value 0). > > This saves space by not requiring the ParamAttrs vector to have an > entry > for each parameter and not requiring it to even be allocated if there > aren't any parameter attributes. Ah, cool! Thanks Reid, -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits