[llvm-commits] [llvm] r57442 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Matthijs Kooijman matthijs at stdin.nl
Mon Oct 20 00:55:17 PDT 2008


Hi Duncan,

> > > 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?

Gr.

Matthijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20081020/14b306af/attachment.sig>


More information about the llvm-commits mailing list