[PATCH] D15272: [Verifier] Verifier that a GlobalValue is only used in this Module
Keno Fischer via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 24 06:38:45 PST 2015
Say you use a global in a function in some other module. If I understand
your patch correctly it would recursively complain about all the
instructions which have some use relation to the one that uses the bad
global as opposed to just the first one.
On Thu, Dec 24, 2015 at 2:57 PM, Rafael Espíndola <
rafael.espindola at gmail.com> wrote:
> I am not sure I follow. Can you provide an example where the patch I
> send produces a bad error message?
> On 24 December 2015 at 01:39, Keno Fischer <kfischer at college.harvard.edu>
> > I'm concerned that that does too much work, because the Function and in
> > Instruction will be checked again elsewhere. Also, the error message
> > be bad, since the problem of which value is used outside the module is
> > actually somewhere else.
> > On Wed, Dec 23, 2015 at 8:33 PM, Rafael Espíndola
> > <rafael.espindola at gmail.com> wrote:
> >> On 23 December 2015 at 13:18, Keno Fischer <
> kfischer at college.harvard.edu>
> >> wrote:
> >> > Somewhere we have to have the logic as to which users we can handle
> >> > (those
> >> > which are embedded in a module). We can have that in the callback
> with a
> >> > boolean flag as to whether we could handle it, or we could have that
> >> > logic
> >> > in the foreach function. The latter seemed cleaner to me, but as I
> >> > no
> >> > strong opinions here.
> >> >
> >> What I am suggesting is that the helper should be a fully generic
> >> "walk every user". What do you think of the attached patch?
> >> Cheers,
> >> Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits