[LLVMdev] Removing metadata in a pass

Tim Northover t.p.northover at gmail.com
Fri Jul 18 02:30:19 PDT 2014


> 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?

Cheers.

Tim.



More information about the llvm-dev mailing list