HomePhabricator

[SLPVectorizer] Make the scheduler aware of the TreeEntry operands.

Authored by vporpo on Aug 16 2019, 10:21 AM.

Description

[SLPVectorizer] Make the scheduler aware of the TreeEntry operands.

Summary:
The scheduler's dependence graph gets the use-def dependencies by accessing the operands of the instructions in a bundle. However, buildTree_rec() may change the order of the operands in TreeEntry, and the scheduler is currently not aware of this. This is not causing any functional issues currently, because reordering is restricted to the operands of a single instruction. Once we support operand reordering across multiple TreeEntries, as shown here: http://www.llvm.org/devmtg/2019-04/slides/Poster-Porpodas-Supernode_SLP.pdf , the scheduler will need to get the correct operands from TreeEntry and not from the individual instructions.

In short, this patch:

  • Connects the scheduler's bundle with the corresponding TreeEntry. It introduces new TE and Lane fields in ScheduleData.
  • Moves the location where the operands of the TreeEntry are initialized. This used to take place in newTreeEntry() setting one operand at a time, but is now moved pre-order just before the recursion of buildTree_rec(). This is required because the scheduler needs to access both operands of the TreeEntry in tryScheduleBundle().
  • Updates the scheduler to access the instruction operands through the TreeEntry operands instead of accessing the instruction operands directly.

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

Reviewed By: ABataev

Subscribers: hiraditya, llvm-commits, lebedev.ri, rcorcs

Tags: #llvm

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

llvm-svn: 369131

Details

Committed
vporpoAug 16 2019, 10:21 AM
Reviewer
ABataev
Differential Revision
D62432: [SLPVectorizer] Make the scheduler aware of the TreeEntry operands.
Parents
rG7e106445efdd: [ADT] Remove llvm::make_unique utility.
Branches
Unknown
Tags
Unknown