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

Johannes Doerfert doerfert at cs.uni-saarland.de
Tue Sep 30 06:52:08 PDT 2014


Correct, GVN is not a "definitive" user of LoopInfo, thus running GVN and critical edge splitting will remove the loop annotations, however that behaviour is at least well defined. In contrast calling BreakCriticalEdges from another "non LoopInfo user pass" might result in invalid loop annotations in your patch.

If we never want to remove metadata information we shouldn't add LoopInfo to the passes GVN needs, but to the passes BreakCriticalEdges needs. That way we can always rely on LoopInfo to "do the right thing" in BreakCriticalEdges without the need to remove annotations for the lack of information.

http://reviews.llvm.org/D5539






More information about the llvm-commits mailing list