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

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 16:59:14 PST 2015


Would it be intolerably slow to add the asserts into the non-`*_unchecked` methods?

I suspect that users of the `_unchecked` methods would break more often than their guarded cousins.

vedant

> On Dec 15, 2015, at 4:02 PM, Rafael EspĂ­ndola via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> An error that is pretty easy to make is to use the lazy bitcode reader
> and then do something like
> 
> if (V.use_empty())
> 
> The problem is that uses in unmaterialized functions are not accounted for.
> 
> The attached patch adds asserts that all uses are known. I think it
> can be reduced a bit by dropping support for dematerializing, which
> seems dead. I will send a patch for that, but I just wanted to ask if
> this looks like a good idea.
> 
> Cheers,
> Rafael
> <t.diff>_______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list