[patch] Check that we don't try to RAUW a value with a ConstantExpr that uses Value.

Rafael Espíndola rafael.espindola at gmail.com
Mon May 12 16:06:47 PDT 2014


> I wonder if you can make this cheaper, though.  Am I right that all
> sub-exprs of a `ConstantExpr` must also be `ConstantExpr`s?  If so:

No, at the leaves we get other types of constants (like GlobalValues).
The test being added is an example, it is a GEP of a GlobalValue.

What can be done is to make the Cache contain only the ConstantExprs.
What do you think of the attached patch?

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 2060 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140512/639b71e5/attachment.obj>


More information about the llvm-commits mailing list