[SLP] Look-ahead operand reordering heuristic.
authorVasileios Porpodas <vasileios.porpodas@intel.com>
Wed, 26 Jun 2019 21:25:24 +0000 (21:25 +0000)
committerVasileios Porpodas <vasileios.porpodas@intel.com>
Wed, 26 Jun 2019 21:25:24 +0000 (21:25 +0000)
commit574cb0eb3a7ac95e62d223a60bef891171dfe321
tree67d843d903e12b5beac057c17c3f6f00048f216d
parentb5999f17d4fc5f909809cf997215f400973a536a
[SLP] Look-ahead operand reordering heuristic.

Summary: This patch introduces a new heuristic for guiding operand reordering. The new "look-ahead" heuristic can look beyond the immediate predecessors. This helps break ties when the immediate predecessors have identical opcodes (see lit test for an example).

Reviewers: RKSimon, ABataev, dtemirbulatov, Ayal, hfinkel, rnk

Reviewed By: RKSimon, dtemirbulatov

Subscribers: rnk, rcorcs, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60897

llvm-svn: 364478
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/lookahead.ll