[PATCH] [OPENMP] llvm.loop.vectorize.enable metadata are lost after critical edge splitting

Andrew Trick atrick at apple.com
Tue Sep 30 14:29:08 PDT 2014


Is it incorrect to leave the loop metadata on the original branch when splitting the edge?

GVN already requires DomTree, so no change to the pipeline is needed if you use it.

In splitCriticalEdges, if LoopInfo is available you can use it. Otherwise you can use the DomTree. If the DomTree check fails (ie. both targets dominate the latch) then just invalidate the metadata.

I think there is a fundamental problem with the metadata design--it's ridiculous to assume that any pass that splits critical edges has LoopInfo--but that should at least workaround your problem.

http://reviews.llvm.org/D5539






More information about the llvm-commits mailing list