[llvm-commits] [llvm] r57442 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
matthijs at stdin.nl
Mon Oct 20 02:55:17 CDT 2008
> > > can stripPointerCasts be used here somehow?
> > it does actually seem that that method does exactly what getBitCastOperand()
> > does, with the exception that getBitCastOperand() works for non-pointers as
> > well. However, both uses of getBitCastOperand only work with pointers AFAICS,
> > so perhaps getBitCastOperand should just be removed alltogether, then?
> do you mean that getBitCastOperand never actually returns null? In that case,
> I agree that it's best to delete it.
Uh, no. getBitCastOperand returns null in the cast the Value passed in is not
bitcast-like. However, stripPointerCasts just returns the Value itself in that
case, so both function do exactly the same thing. By updating the callers to
use stripPointerCasts instead and checking for the old Value instead of NULL,
getBitCastOperand could be deleted, I think?
Agree to replace them?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20081020/14b306af/attachment.bin
More information about the llvm-commits