[PATCH] Small refactor on VectorizerHint for deduplication

Renato Golin renato.golin at linaro.org
Thu Aug 14 13:47:52 PDT 2014


Hi nadav, aschwaighofer,

Previously, the hint mechanism relied on clean up passes to remove redundant
metadata, which still showed up if running opt at low levels of optimization.
That also has shown that multiple nodes of the same type, but with different
values could still coexist, even if temporary, and cause confusion if the
next pass got the wrong value.

This patch makes sure that, if metadata already exists in a loop, the hint
mechanism will never append a new node, but always replace the existing one.
It also enhances the algorithm to cope with more metadata types in the future
by just adding a new type, not a lot of code.

Fixes PR20655.

http://reviews.llvm.org/D4913

Files:
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/duplicated-metadata.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4913.12524.patch
Type: text/x-patch
Size: 11719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140814/c9c189f2/attachment.bin>


More information about the llvm-commits mailing list