[PATCH] D16083: [bugpoint] Teach bugpoint to reduce MDNodes
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 11 14:53:56 PST 2016
> On 2016-Jan-11, at 14:50, Keno Fischer <kfischer at college.harvard.edu> wrote:
>
>
> 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.
Agreed.
> 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.
Agreed. Interested in Adrian's thoughts as well.
> 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?
IIRC, no they don't. But I may be wrong?
More information about the llvm-commits
mailing list