[LLVMdev] Removing metadata in a pass

Eli Bendersky eliben at google.com
Fri Jul 18 06:04:36 PDT 2014


On Fri, Jul 18, 2014 at 2:30 AM, Tim Northover <t.p.northover at gmail.com>
wrote:

> > An alternative implementation to deleting nodes would be to just add a
> > "llvm.loop.unroll.enable false" metadata node after unrolling.  It's a
> > little funny because you could then have, say, both
> "llvm.loop.unroll.enable
> > false" and "llvm.loop.unroll.enable true" attached to a loop which is a
> bit
> > funny.  Yet another alternative is to make up some new metadata node type
> > like "llvm.loop.unroll.already_unrolled" and add it to the loop.
>
> What about dividing the unroll hint by the unroll count and dropping
> it if that's <= 1?
>

This is a destructive change very similar to Mark's original in the patch.
My issue with destructive changes is that they may make things more
difficult to debug by "deleting the audit trail", so to say. But this isn't
a strong objection, so if others feel it's appropriate in this case, I'm
fine with that.

Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140718/70e46722/attachment.html>


More information about the llvm-dev mailing list