On Dec 13, 2006, at 9:20 AM, Reid Spencer wrote: >>> +static Value *InsertCastToIntPtrTy(Value *V, const Type *DTy, >>> + Instruction *InsertPoint, >>> + InstCombiner *IC) { >> >> Why did you rename this? > > Because the name doesn't match its action. SExt is only one > possibility. > The type of Value* can be larger, smaller, or equal in size to DTy > so it > can be SExt, Trunc, or BitCast. I figured > InsertSignExtendOrTruncateOrBitCastToPtrTy was a bit long. > >> The previous name was better (indicated >> sign extension). > > The previous name is misleading. It doesn't always do a SExt. > Consider > long GEP index on a 32-bit platform. The cast needed is a Trunc. >
Ok. -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits