[PATCH] D16083: [bugpoint] Teach bugpoint to reduce MDNodes

Keno Fischer via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 14:50:40 PST 2016


> This is kind of scary, but if we assume the verifier is strong,
> maybe not so bad.
>
> In some places, MDTuple is used like a set and nulls are
> unexpected.  In other places, MDTuple is used like a fixed-size
> array, so changing the size would be pretty unexpected (and
> even here, adding nullptrs might be unexpected).  It's unlikely
> we have proper coverage for this stuff... although making
> bugpoint rely on the verifier might be good motivation to add
> missing coverage.
>

I particularly like the Verifier approach, because making the Verifier
better
is a very worthwhile goal independent of bugpoint. I think we should
consider
a backend assertion due to invalid IR that passed the Verifier a bug.


> BTW, I'd expect a list-reductions on the arrays in DICompileUnit
> to be efficient and fairly easy to implement.  That's independent
> of whether you have the last-resort pass you're suggesting though.
>

Yep, there's various other things you can do, e.g. removing derived types
and replacing
them by the underlying type. I considered doing some of that as well, but I
think having
the general purpose thing in, even if takes longer to converge is very
valuable.


> I'd also be interested in a pass that reduced the @llvm.dbg.*
> intrinsics.


Not really sure what you mean by this. Don't they get removed by the
generic instruction
reducer?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160111/4b7f5cd6/attachment.html>


More information about the llvm-commits mailing list