[patch][rfc] Asserting that we have all use/users in the getters

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 07:52:43 PST 2015


On 16 December 2015 at 00:35, Vedant Kumar <vsk at apple.com> wrote:
> Brain-o, I meant to say:
>
> Is it OK to get rid of the "*_unchecked" methods and use the assertion-enabled methods for everything?

Unfortunately no. There are a few valid uses:

* When lazy reading functions, we walk the uses of intrinsics that
have to be upgraded. We know that every use we find is in the function
we just materialized.
* When processing use order during bitcode reading we can gracefully
handle not having all uses.

I think the remaining uses of the unchecked version can be removed if
we also remove support for the dematerialize method (I have sent a
patch for that).

Cheers,
Rafael


More information about the llvm-commits mailing list